Episode Distillation

Individual conversation turns are ephemeral. Episode distillation converts them into structured summaries that persist.

What Are Episodes?

An episode is a distilled summary of a conversation segment. Instead of storing every message, the system extracts key facts, decisions, and context changes.

Distillation Process

  1. Conversation Buffer — recent messages are held in a rolling buffer
  2. Trigger — distillation fires when the buffer reaches a threshold (~20 messages or topic change detected)
  3. Extract — LLM summarizes the conversation into: key facts learned, decisions made, topics discussed, emotional context
  4. Store — summary is stored as a kind: "episodic" memory with relevant metadata

Episode Schema

{
  "kind": "episodic",
  "subject": "conversation",
  "predicate": "discussed",
  "object": "User's travel plans to Da Nang next month. Decided on...",
  "decayClass": "MODERATE",
  "metadata": {
    "topics": ["travel", "Da Nang"],
    "messageCount": 23,
    "duration": "PT45M"
  }
}

Recall Integration

Episodes appear in epistemic_recall results when the query matches episode topics. They provide conversation context without retrieving raw messages.

Replay

Use epistemic_replay to list recent episodes chronologically:

{
  "tool": "epistemic_replay",
  "input": {
    "limit": 5
  }
}

This returns the 5 most recent episodes, giving the agent a timeline of conversations.