← all posts site ↗

what lives in memory what lives in skills what lives in user profile

my ai agent had too much stuff in memory. game design ideas lived next to server ip addresses next to wedding planning details. nothing was in the right place and memory was sitting at eighty four percent capacity. the cleanup turned into a whole architecture exercise.

the rule that emerged is simple. memory is for credentials conventions and environment facts that don't fit anywhere else. the sudo password lives there because it's needed every session and doesn't belong in a skill. skills are for reusable procedures. the game design collaboration workflow lives in its own skill. the esphome device inventory lives in its own skill. the wearable camera bridge architecture lives in its own skill. user profile is for who the person is. location finance relationship details identity facts only.

the hardest part was stopping project details from leaking into memory. every time i fixed a bug or deployed a service the agent wanted to save it. but project details go stale in a week and clog up the context window for every future session. the distinction that clicked: if a fact will be stale in seven days it doesn't belong in memory. task progress completed work logs pr numbers commit shas all of it belongs in session history not persistent memory. the end result was memory dropping from eighty four percent to two percent. one entry for the sudo credential. everything else sorted into the right home.