Skip to content

Memory strategies

Each agent has a memory strategy that decides what conversation history it sees on each turn. Memory is scoped per (agent, session), so an agent resumes with the right history when it runs again in the same chat or graph run.

StrategyWhat it does
NoneNo memory — every turn starts fresh.
WindowKeep only the last N messages.
Full transcriptStore and replay the entire conversation.
SummarizedKeep a rolling summary, refreshed every N messages by a chosen model.
EpisodicRetrieve relevant past messages from a vector collection (top_k, threshold).
SemanticExtract structured facts (via an extractor prompt) before storing them.
CompositeStack several strategies as ordered layers, consulted and written in order.
  • Agent default: every agent definition carries a memory_strategy (default None).
  • Per-slot override: an Agent (SubAgent) node can set a memory_override for that one slot in the graph.

The effective strategy is memory_override.unwrap_or(agent.memory_strategy) — the node-level override wins for that slot, otherwise the agent’s own default applies.

  • Episodic and Semantic rely on embeddings — configure your embedding model first.
  • Memory writes happen automatically as the agent records each message; you don’t manage storage.
  • The canonical definition is MemoryStrategy in backend/src/agents/memory/mod.rs.