Skip to content

wheevu/episodic-memory-pipeline

Repository files navigation

Episodic Memory Pipeline

Python License

Local-first memory for AI agents.

Separates what an agent experiences (episodic memory) from what it knows (semantic memory), then consolidates episodes into durable facts and summaries for better recall.

Stack

  • LanceDB for vector + metadata storage
  • FastEmbed for local embeddings
  • Qwen 2.5 or OpenAI for extraction and reasoning

Features

  • episodic -> semantic memory consolidation
  • local-first, lightweight architecture
  • traceable facts linked to source episodes
  • narrative recall beyond nearest-neighbor retrieval

Example

Input episodes:

  • "I started learning Korean today."
  • "I want to be conversational before my trip to Seoul in March."

After consolidation:

  • Fact: user is learning Korean
  • Goal: become conversational before March trip to Seoul

Query:

What am I learning, and why?

Answer:

You're learning Korean, and your near-term goal is to become conversational before your March trip to Seoul.

Quick Start

git clone https://github.com/wheevu/episodic-memory-pipeline
cd episodic-memory-pipeline
pip install -e .
cp env.example .env
make demo

Mock/demo mode:

make demo-mock

CLI

episodic-memory ingest "I started learning Korean today"
episodic-memory query "What am I learning?"
episodic-memory consolidate --all
episodic-memory stats

License

MIT

About

Gives local agents long-term memory with episodic and semantic data.

Resources

License

Stars

Watchers

Forks

Contributors