Memory that separates what happened from what matters.
Most agent runtimes flatten memory into one bucket. Tandem treats knowledge, run state, and governance as distinct first-class layers — so agents stay inspectable, resumable, and auditable at scale.
Inspectable
Prompt context and execution state stay separate.
Resumable
Replay picks up from checkpoints, not an overwritten transcript.
Auditable
Provenance and partitions make writes traceable.
Layered by design
Seven layers, one runtime.
Working memory = prompt context
Session memory = chat and step history
Persistent memory = governed knowledge
Semantic memory = retrieval by meaning
Artifact memory = durable outputs
Execution memory = replay and resume
Derived memory = rebuildable speedups
The core idea is simple: what the agent remembers should not be confused with what the agent did.
Agent memory architecture
The problem with flat memory
Most agent systems conflate conversation history, durable knowledge, execution state, and artifacts into one memory concept. That is fine for a demo, but it breaks the moment you need to replay a run, audit who saw what, resume after a crash, or scale beyond one user.
Tandem keeps those concerns distinct so the agent memory architecture stays legible. The runtime can answer from explicit knowledge, pause when governance requires it, and recover execution state without rewriting its beliefs.
Agent memory architecture taxonomy
The seven layers of agent memory
This taxonomy is useful even outside Tandem. It gives architecture teams a shared vocabulary for separating prompt context, durable knowledge, and replayable execution state before the system gets large enough to blur them together.
Working memory
In-flight prompt context, scratchpad, and active tool state that exist only for the current turn.
Example: The current turn's assembled prompt.
Session memory
Conversation and step history tied to a single run or session.
Example: The message log of one chat.
Persistent long-term memory
Cross-session saved knowledge the agent is expected to recall.
Example: User preferences and project facts.
Semantic memory
Embeddings and retrieval systems that recall by meaning rather than location.
Example: Vector search over past notes.
Artifact memory
Files, outputs, and documents that persist as inspectable artifacts.
Example: A generated report saved to disk.
Execution memory
Checkpoints, run state, and replay state needed to resume work.
Example: The snapshot needed to resume a crashed workflow.
Cache / derived memory
Cached outputs and snapshots that accelerate retrieval but are not the source of truth.
Example: An embedding cache.
Implementation details
How Tandem implements each layer
Each layer gets the same treatment: a short summary for fast reading, then a collapsed technical detail for operators who want schema, code paths, and storage layout.
Working memory
In Tandem, working memory is prompt context only — assembled per turn, never persisted. That keeps run artifacts clean and auditable.
Implementation details
Session memory
Session transcripts and step history live separately from long-term memory, so what happened in the chat never silently becomes what the agent believes.
Implementation details
Persistent long-term memory
Durable, governed memory records carry provenance, classification, and partitions instead of collapsing into one flat bucket of notes.
Implementation details
Semantic memory
Tandem uses built-in sqlite-vec plus FTS5 for hybrid keyword and vector retrieval, so teams do not need an external provider just to search by meaning.
Implementation details
Artifact memory
Outputs are first-class artifacts with durable references, not blobs mixed into the transcript.
Implementation details
Execution memory
Run state and blackboard data live in dedicated context_runs storage, separate from knowledge memory. That split is what makes replay and resume actually work.
Implementation details
Cache / derived memory
Embedding caches, FTS indexes, and derived snapshots speed retrieval, but they remain rebuildable rather than authoritative.
Implementation details
Why the separation matters
Replay, governance, and scale need typed memory
Replay and resume only work when execution state lives separately from knowledge memory. Tandem can replay a run without corrupting durable beliefs, and it can resume a crashed workflow without rewriting the reasoning trail that led there.
Governance depends on typed memory. Partitions, capability tokens, classifications, and provenance only make sense when the runtime knows whether a record is session-scoped, project-scoped, or global. Flat memory cannot be governed because you cannot audit what you cannot distinguish.
Multi-tenant systems need clear boundaries. Session memory, project memory, and global memory must stay isolated or data will leak across users as the system grows beyond one person and one prompt.
Governance and audit
Controls that make memory governable
Implementation details
Partitions by scope. Session, project, and global partitions keep memory records in the right boundary so a single agent can operate across multiple tenants without accidental bleed-through.
Capability tokens. Read and write access is granted explicitly, which gives operators a narrow control plane instead of a flat database credential that can touch everything.
Classifications. Records can be marked by sensitivity or purpose so policy can treat operational notes, customer facts, and shared knowledge differently.
Provenance. Every record carries where it came from and when it was written, which makes later inspection possible without guessing how the memory entered the system.
Audit trail. Writes are logged across the runtime, which makes replay, review, and incident investigation possible even when memory changes over time.
Further reading
Keep exploring the runtime.
Looking for the hosted community agent product? Explore Tandem Agents.