Context, Sessions, and Memory
Separate context, sessions, memory, and business records to design agent memory that can be traced and corrected.
“Agent Basics for Product Managers” part four
Previous: How Agent Runs Work · Series home · Next: Agents, Skills, Tools, and MCP
“Remember everything about the user” sounds like a capability. It is actually an unbounded data requirement. It says nothing about what to keep, how long it remains valid, when it may be used, or how an error can be corrected.
Three different concepts
- Context is what the model sees in one call.
- Session is the record of messages, tool calls, approvals, and state transitions in one task.
- Memory is information selected from the past because it may still be useful later.
Models do not automatically remember a previous session. The application stores information outside the model and selectively puts it back into future context.
A session records what happened. Memory records what remains useful. Context contains only what the current decision needs.
Context is a workbench, not a warehouse
Context has capacity, cost, and attention limits. Loading all history hides important information, increases latency, introduces stale conflicts, expands privacy exposure, and makes conclusions difficult to trace.
“Connect the knowledge base” is not a complete requirement. The product must define retrieval scope, source priority, freshness, conflict handling, and citation behavior.
Memory needs layers
Stable, confirmed user preferences belong in a user profile. Project rules belong in reviewed instructions. Current goals belong in working memory. Sourced facts may become semantic memory. Past tasks may become episodic memory. Reusable methods belong in skills.
Customers, PRD versions, approvals, and permissions belong in a business database. Memory may help reasoning; it should not become the only source of truth.
Promotion and forgetting
Raw session → summary → memory candidate
→ deduplicate, verify, and attach evidence → confirmed memory → selective recallImportant memories need evidence, confidence, status, scope, and a review date. They also need update, deprecation, and deletion paths. Never forgetting is not intelligence; it is accumulating risk.
Product exercise
List ten things an agent should “remember.” Classify each as business data, session history, project rules, user memory, or information that should not be stored. Add a source, expiration, and deletion method.
Good memory is not about retaining more. It is about using a small amount of trusted information for the correct user, task, and time.