Episodic memory

Episodic memory is the agent's record of specific past events. Unlike structured facts ("user likes Python") or general knowledge, episodic memory captures whole interactions or trajectories the agent can reference.

What it enables

Reference to specific prior episodes makes the agent feel less amnesic and more like a long-term collaborator.

Implementation

Store full session transcripts (or distilled summaries) keyed by timestamp and topic. At the start of a new session, retrieve episodes relevant to the current task.

Typical structure:

{
  "episode_id": "session_2026_04_19_abc",
  "timestamp": "2026-04-19T14:30:00Z",
  "user": "user_123",
  "topic_tags": ["debugging", "python", "database"],
  "summary": "User had a database timeout issue. We traced it to missing index, added one.",
  "artifacts": [...],  // code changes, docs created
  "outcome": "resolved"
}

Retrieval

At session start, query episodic memory:

The summarization step

Raw session transcripts are too long. Distill each session into a brief episode record at session end. Agent can expand into the full transcript only if needed.

Privacy considerations

Episodes contain sensitive information. Respect retention limits, access controls, and user deletion rights.