Why does agent memory matter?
Without memory, users must repeat preferences, account context, and past decisions in every session. Without clear boundaries on memory, however, agents can repeat outdated mistakes or leak personal data across users.
Short-term memory is the conversation so far, kept in the agent’s context. Long-term memory carries facts and preferences across separate conversations, usually by storing notes and retrieving the relevant ones later.
Long-term memory is powerful and risky: a remembered mistake repeats, and remembered personal data needs the same care as any stored data. Good systems let people see, correct and remove what an agent remembers.
Key characteristics of agent memory
- Short-term memory lives in the active session context and resets when a new conversation starts.
- Long-term memory persists facts, preferences, or summaries in storage scoped to a user, tenant, or agent.
- Inspectable memory lets operators or end users audit, edit, and delete stored facts.
- Strict tenant isolation prevents one customer’s remembered data from appearing in another customer’s run.
How agent memory works step by step
- 1. New requestIdentify customer space and session
- 2. Retrieve notesPull relevant scoped memories
- 3. Assemble contextMerge with current turn history
- 4. Update storeSave or edit explicit facts
Short-term vs. long-term agent memory
| Dimension | Short-term memory | Long-term memory |
|---|---|---|
| Scope | Single active conversation | Multiple sessions over days or months |
| Storage | Model context window | External store retrieved on demand |
| Lifespan | Ends or truncates with the session | Persists until updated or deleted |
| Primary risk | Exceeding token limits or losing early turns | Stale facts or cross-tenant data leaks |
Example in practice
How Norilu handles agent memory
Frequently asked questions
- Is agent memory the same as the context window?
- No. The context window holds everything passed to one model call, whereas agent memory is the broader system that decides which past facts are saved and loaded back into that window.
- What should never be stored in long-term agent memory?
- Never store secrets, passwords, payment credentials, or unverified temporary statuses like an invoice balance that should always be fetched fresh from a tool.