Why Memory Management Is Important for Your AI Agent
How we turned our lazy AI assistant into a Type A person.
Our agent used to “remember” things the way a tired colleague takes notes — scribble something down, lose the notebook, write the same thing again somewhere else, and confidently cite the wrong version a week later.
Memory felt like a feature. In practice it was clutter. Every conversation left fingerprints in agent files, scratch pads, and half-updated context windows. The assistant was lazy about where it stored things, which meant it was expensive about finding them.
We fixed that with memory management — not more memory, but rules for how memory gets written, updated, and referenced. The agent did not get smarter. It got organized.
The lazy assistant problem
Ungoverned memory fails in predictable ways. The agent duplicates facts across files. It caches preferences that changed three days ago. It treats a Slack aside and a signed contract with the same urgency. It updates its own scratch space because that is the path of least resistance, even when the canonical answer lives somewhere the rest of the team can see.
Lazy memory also rots quietly. Nobody notices until someone asks “why does the bot think I still work on Project X?” and the answer is: because it wrote that once in a file only the agent reads.
Type A memory is the opposite. One source of truth. Explicit update rules. References instead of copies. A pause before every write.
| Lazy memory | Managed memory |
|---|---|
| Facts duplicated across agent files | Facts live once in wiki, agents store references |
| Preferences drift silently | user.md keyed by Slack ID stays canonical |
| Updates happen on autopilot | Every write pauses for classification and destination check |
The goal is not more memory. The goal is less contradiction.
Memory lives in the Masse Wiki
We connected agent memory to the Masse Wiki — our shared knowledge base, not a private model diary. If a fact should outlive a single thread, it belongs in the wiki. Agent files hold pointers, not paragraphs.
That split matters. The wiki is where humans audit, edit, and disagree. Agent memory is a index card that says where to look. When the wiki changes, the agent stays correct because it was never storing the essay — just the link.
Human-editable wiki pages hold facts; agent state files hold pointers.
user.md — one file per person, keyed by Slack ID
People are the hardest thing to remember well. Preferences shift. Workstyles are subtle. Current tasks go stale by Tuesday.
Every teammate gets a user.md in the wiki, referenced by
Slack ID so the agent can resolve “who said this” without
guessing. Each file holds:
- General info — role, timezone, how they show up in Slack
- Preferences — communication style, tools, pet peeves
- Workstyle — async vs. live, how they like tasks broken down
- Current tasks — what they are actively carrying, with dates
- Wiki references — links to deeper docs, not inline copies
The agent reads user.md to personalize. It does not
treat the file as a junk drawer. If something belongs in a client doc
or a project page, it goes there — and user.md gets a
reference line.
Stop, analyze, then store
The biggest behavioral change: the agent is not allowed to update memory on autopilot. Every time it wants to persist something, it stops and runs a short analysis first.
- What is this? Fact, preference, task, temporary context, or noise?
- How long should it live? Session-only, until a date, or permanent?
-
Where does it belong? Wiki page,
user.md, project doc, or nowhere? - Does something already exist? Update in place — do not append a second version.
- What gets a reference only? Agent memory files, sub-agent configs, session context.
That pause is the Type A part. The lazy assistant wrote first and sorted later. The disciplined one decides the filing system before touching the filing cabinet.
Instructions the agent actually follows
These rules live in the agent spec — not as suggestions, as steps:
BEFORE WRITING MEMORY:
1. Quote the new information in one sentence.
2. Name the canonical destination (wiki path or "none").
3. If a wiki page exists → update the wiki.
4. If agent memory needs it → write ONLY a reference:
ref: wiki/clients/acme/billing.md#contacts
5. Never store the same fact in two places.
6. If uncertain → ask once, then store in wiki under /inbox/ with date.
If this checklist is not copyable, people stop using it.
Most updates land in the LLM wiki. Memory files, agent configs, and sub-agent context get reference lines — path, anchor, last verified date. The agent’s private files stay thin. The wiki stays thick.
References beat copies
Think of agent memory like a bibliography, not a notebook. When someone says “I prefer bullet points in status updates,” the workflow is:
- Update their
user.mdpreferences section in the wiki - Add or refresh a reference in the agent’s user index
- Do not paste the preference into five other agent files
Copies feel fast. References stay true. When preferences change, you edit one wiki page — not a scavenger hunt through agent state.
What changed in practice
Fewer contradictions. Faster lookups because the agent knows where to look before it searches. Onboarding a new sub-agent got easier — point it at the same wiki references instead of re-seeding facts.
The assistant also got quieter in a good way. It stopped announcing that it “remembered” things. It just acted like someone who had read the wiki — because it had, and it knew not to fork the wiki into a private shadow copy.
Memory management is not glamorous work. It is filing. But agents
without filing discipline become confident liars with good recall
for the wrong version. Give yours a wiki, a user.md
per person, a mandatory pause before every write, and permission to
be boring about references.
Lazy assistants hoard. Type A assistants index. Your team will notice the difference before your model benchmark does.