Skip to main content

Memory Stores

Each memory subsystem is a separate store that handles one type of information. This page is the at-a-glance index. For a full “what it is, when to use it, and how to configure it” guide, follow the dedicated page for each store. The sections below summarize each store inline.

Summaries

Long-term conversation memory. When session history overflows, the overflow messages are summarized by an LLM and stored.

User Facts

Extracts and stores discrete facts about users: preferences, background, interests.
Example extracted facts:
  • “Prefers dark mode”
  • “Lives in Mumbai”
  • “Works on logistics software”
The memory system automatically extracts facts from conversations:
User facts are deduplicated automatically — if the user says “I’m in Mumbai” twice, only one fact is stored.

User Profile

Structured user data — name, role, company, timezone, language, custom fields.
Injected as structured context:

Entity Memory

Tracks companies, people, projects, and products mentioned in conversations. Every entity is scoped to the user that created it — two users never see each other’s entities, even if they reference the same external company.
Provides tools: search_entities, create_entity. Both auto-inject the current ctx.userId, so the agent can never accidentally read or write another user’s entities. Entities are automatically extracted from conversations:

Direct access requires a userId

When you bypass the auto-exposed tools and call the store directly, you must pass the userId:
The same pattern applies to GraphMemory and ProcedureMemory. Calling listEntities() without a userId is a TypeScript error — there is no “global” read path.

Decision Log

Audit trail of agent decisions — what was decided, why, and what happened.
Provides tools: log_decision, record_outcome, search_decisions. Decisions are logged with context for audit trails:

Learned Knowledge

Vector-backed insights from conversations. Requires a VectorStore.
Auto-injects relevant learnings into context AND exposes save_learning / search_learnings tools.

Scope hierarchy (v2.3+)

Learnings carry an explicit scope so genuinely shared knowledge isn’t trapped in one user’s silo: Reads are the union. When alice chatting with the invoice-recon agent at tenant acme searches for learnings, she sees her personal ones plus the agent-shared ones plus the tenant policies plus global defaults — but never another user’s personal scope or another agent’s shared scope. Writes pick one. The LLM (or your code) chooses the scope when saving:
If you call the store directly:
Auto-extracted learnings always save as "user" — the framework never auto- promotes an LLM-extracted insight to a shared scope.

How Learnings Work

The agent now proactively checks customs status before approving refunds — even though it learned this from a completely different conversation, and even when serving a completely different customer. See Multi-User Isolation for the full scope contract.

Correction Capture

Structured records of humans correcting agent output — field-level (originalValuecorrectedValue, reason, entityKey), embedded into a vector store, and retrieved on future relevant runs so the same mistake is not repeated. Requires a VectorStore.
Corrections can be recorded three ways: the POST /agents/:name/corrections HTTP endpoint, agent.memory.recordCorrection(), or the auto-exposed record_correction tool. Corrections default to agent scope — a fix to an agent’s output is workflow knowledge that benefits every user. See Correction Capture for full documentation.

Graph Memory

Knowledge graph with entity-relationship tracking. Unlike flat entity memory, graph memory builds a traversable graph of nodes and edges with temporal metadata.
See Graph Memory for full documentation.

Procedure Memory

Records and reuses successful multi-step tool-call workflows.
See Procedural Memory for full documentation.

Temporal Awareness

All fact-based stores (User Facts, Entity Memory) now support temporal fields:
  • validFrom — when the fact became valid
  • invalidatedAt — when a newer fact superseded it
The LLM extraction prompts detect contradictions and mark old facts as superseded rather than keeping duplicates. See Temporal Awareness for full documentation.

All Auto-Exposed Tools

When memory stores are enabled, these tools become available to the agent: These tools are automatically added to the agent’s tool set — no manual registration needed.