episodic-memory  by obra

Semantic search for AI coding conversations

Created 4 months ago
265 stars

Top 96.6% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

Episodic Memory addresses the challenge of statelessness in AI coding assistants by enabling semantic search and recall of past conversations. It allows developers to leverage historical context, decisions, and reasoning, transforming AI collaborators from transient tools into persistent partners. This significantly accelerates problem-solving, enhances continuity across sessions, and leads to more informed AI suggestions by preserving the "why" behind technical choices.

How It Works

The system syncs conversations from Claude Code, parses them into exchanges, and generates vector embeddings locally using Transformers.js. These embeddings are indexed in an SQLite database with sqlite-vec for efficient semantic similarity and exact text search. An integrated Model Context Protocol (MCP) server exposes search and conversation retrieval tools, facilitating seamless integration with AI environments like Claude Code.

Quick Start & Requirements

  • Installation:
    • Claude Code Plugin (Recommended): Install via the Claude Code plugin manager: /plugin install episodic-memory@superpowers-marketplace. This enables automatic session-end indexing and MCP integration.
    • npm Package: npm install episodic-memory.
  • Prerequisites: Node.js/npm for package installation. No specific hardware requirements beyond standard development machine capabilities are listed.
  • Links:
    • Claude Code Plugin: /plugin install episodic-memory@superpowers-marketplace
    • npm: npm install episodic-memory
    • CLI Usage: episodic-memory sync, episodic-memory search "query", episodic-memory show path/to/conversation.jsonl, episodic-memory stats

Highlighted Details

  • Semantic search captures the meaning and reasoning behind discussions, not just keyword matches.
  • Local, offline embedding generation via Transformers.js ensures data privacy and reduces external dependencies.
  • SQLite with sqlite-vec provides a performant, local database solution for indexing and searching.
  • An exclusion mechanism (<INSTRUCTIONS-TO-EPISODIC-MEMORY>DO NOT INDEX THIS CHAT</INSTRUCTIONS-TO-EPISODIC-MEMORY>) allows users to opt-out specific conversations from indexing.
  • MCP server integration enables programmatic access to search and conversation viewing tools.

Maintenance & Community

The provided README does not detail specific contributors, sponsorships, or community channels (e.g., Discord, Slack). Development appears active with distinct CLI commands and an MCP server component.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: The MIT license is permissive and generally compatible with commercial use and closed-source projects. Embeddings and search are local, minimizing external service dependencies.

Limitations & Caveats

Conversations intended to be excluded from the search index must contain a specific marker (<INSTRUCTIONS-TO-EPISODIC-MEMORY>DO NOT INDEX THIS CHAT</INSTRUCTIONS-TO-EPISODIC-MEMORY>). Summarization features may optionally route through custom Anthropic-compatible endpoints or models, but core embedding and search functionalities remain local.

Health Check
Last Commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
6
Issues (30d)
8
Star History
47 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.