Memory
What an agent recalls between sessions — facts, events, and procedures.
Sessions end. Memory does not. An agent with memory starts the next conversation knowing what it learned in the last one.
Memory is for what the agent worked out. For reference material you author, use a knowledge space; for a paragraph of standing context, use the agent's knowledge base.
Types
| Type | Holds | Example |
|---|---|---|
semantic | Facts | "Alex works in product management and prefers bullet points." |
episodic | Events | "On 5 April, Alex asked for the Q1 revenue breakdown." |
procedural | How-to | "To build the weekly report: fetch → aggregate → format → send." |
Write a memory
summary is the short label shown in listings; content is what gets
embedded. importanceScore (0–1) biases retrieval when several memories are similarly
relevant. Reserve the high end for things that should almost always surface.
Retrieve
Retrieval is semantic — content is embedded on write and matched by meaning, not keywords.
Browse and prune
A memory that was true and is not any more is worse than no memory. Update or delete stale entries rather than adding a contradiction and hoping retrieval picks the newer one.
Shared scopes
A shared scope is one attributed pool several agents draw on — useful when a team of agents should learn from each other's work rather than each rediscovering the same fact.
Entries stay attributed to the agent that wrote them, so a wrong fact can be traced back to where it came from.
Practical notes
- Write few, specific memories. "Prefers bullet points" retrieves well; a transcript does not.
- One fact per entry. Two facts in one entry retrieve as a compromise between them.
- Tag by subject, so you can list and prune a topic later.
- Do not store secrets. Memory is retrieved into prompts by design.
- Prune on a schedule. A task that reviews memories monthly keeps the pool honest.
