MyBotBoxMyBotBox

Episodic Memory

The Episodic Memory block maintains sequential conversation history and temporal context, enabling agents to reference recent interactions and maintain conversational coherence.

Overview

Episodic Memory captures the sequential flow of interactions, creating a temporal record of conversations, decisions, and events. This enables agents to maintain context within conversations and reference recent history when making decisions.

Sequence Tracking: Record messages and events in chronological order

Context Window: Maintain relevant recent history within token limits

Memory Summarization: Compress older interactions while preserving key information

Temporal Querying: Retrieve interactions from specific time periods or conversation turns

How It Works

graph LR
    A[New Message] --> B[Add to Sequence]
    B --> C[Context Window Check]
    C --> D{Exceeds Limit?}
    D -->|No| E[Update Memory]
    D -->|Yes| F[Summarize Old Messages]
    F --> G[Compress History]
    G --> E
    E --> H[Available for Retrieval]

Configuration

Conversation ID

Unique identifier for the conversation thread. Messages with the same ID are grouped together in sequence.

Context Window Size

Maximum number of recent messages to keep in full detail before summarization:

  • Small: 10-20 messages (fast, limited context)
  • Medium: 50-100 messages (balanced)
  • Large: 200-500 messages (comprehensive but slower)

Summarization Strategy

How older messages are compressed:

  • Extractive: Keep the most important full messages
  • Abstractive: Generate summaries of conversation chunks
  • Hybrid: Combine both approaches for optimal compression

Memory Triggers

Events that create new episodic memories:

  • All Messages: Store every interaction
  • Significant Events: Only important decisions or outcomes
  • User Requests: When users explicitly ask to remember something

Use Cases

  • Chat Assistants: Maintaining conversation flow and referencing earlier topics
  • Meeting Bots: Tracking discussion progress and following up on action items
  • Support Agents: Understanding the full context of customer interactions

Example Workflow

[User Message] → [Episodic Memory Retrieval] → [Agent] → [Episodic Memory Update] → [Response]

A multi-turn customer support conversation:

Turn 1:

  • User: "My order hasn't arrived yet"
  • Store: Customer has shipping concern for order

Turn 2:

  • User: "It was supposed to be here yesterday"
  • Context: Previous shipping concern + new timing information
  • Store: Order expected yesterday, still missing

Turn 3:

  • User: "Can you check the tracking?"
  • Context: Full conversation about delayed order
  • Agent response leverages full context for personalized help

Turn 15: Earlier messages summarized as "Customer reported delayed order #12345, expected delivery was missed, tracking requested"

Best Practice: Use conversation IDs consistently to maintain thread continuity. Set context windows based on typical conversation length to balance context and performance.

When to Use This vs Other Blocks

BlockWhen to Use
Episodic MemorySequential conversation history and recent temporal context
Persistent MemoryLong-term knowledge that survives across different conversations
VariablesTemporary data within a single workflow execution