Examples
Episodic Memory
Simulate the ability to remember 'that time we talked about X' with temporal event tracking.
Core Module
Scenario: Tracking Emma's conversations
When to Use
Use episodic memory when you need to store distinct interaction events or "episodes" that happen at a specific point in time. Perfect for:
- Chat logs and conversation history
- User actions (e.g., "User clicked buy", "User started workout")
- Events that need to be recalled by "when" they happened
Key Operations
create()Store a new event/episode
search()Find episodes by semantic meaning
get_by_session()Retrieve full history of a session
Code Example
In this example, we store a conversation about Emma's job as an episode, then search for it later using a natural language query.
Key Takeaways
- Episodic memory is temporal - it preserves the timeline of events.
- It supports semantic search, allowing you to find events based on their meaning ("sad moments") rather than just keywords.
- Episodes are grouped by
session_id, making it easy to reconstruct a full conversation thread.