Memory & context
Long-term memory
Remember across sessions — facts, preferences, past work.
N agentsAdvanced
How it works
- 1Decide what's worth persisting — durable facts, not transient chatter.
- 2Write those to a store, keyed for retrieval.
- 3On a new session, retrieve relevant memories into context.
- 4Periodically prune or update stale or contradicted memories.
Use it when
Assistants that should recall user preferences, prior decisions, or accumulated knowledge between separate conversations.
Reach for something else when
One-off tasks. Persistent memory adds storage, retrieval, and staleness/privacy concerns.
Where you stay in the loop
You decide what is worth remembering and what should be forgotten; the agent persists and recalls. Review stored memories for staleness and privacy — durable memory is a responsibility, not just a feature.
In the wild
A coding assistant remembers your stack and conventions so you don't restate them each session.
Hand this to your agent
Act with long-term memory. At the END of each task, output a MEMORY block of durable facts worth keeping about me or the project (preferences, decisions, conventions) — concise, no transient details. At the START, I'll paste the saved MEMORY; use it as context and tell me which memories you applied. Flag anything that now looks outdated. First task: <...>
Replace the <…> placeholders, paste it into your agent, and it'll scaffold the workflow with you.