Skip to main content

Persistent memory layer for AI coding assistants. Every conversation remembered, every decision searchable.

Project description

🔍 MemoTrail

Every AI coding conversation you've ever had — searchable and remembered.

MemoTrail is a persistent memory layer for AI coding assistants. It automatically records your sessions, indexes them semantically, and surfaces the most relevant past context in every new session.

"Why did we switch from Postgres to Redis 3 months ago?" → MemoTrail finds the exact conversation where you decided that.

The Problem

Every time you start a new Claude Code session, it's a blank slate. Your AI doesn't remember that you spent 3 hours yesterday debugging that auth flow, or that you decided to use Redis instead of Memcached, or that you tried approach X and it failed.

You repeat yourself. Every. Single. Day.

The Solution

MemoTrail runs as an MCP server that gives your AI coding assistant a real memory:

  • 🔍 Search past conversations — "What did we discuss about authentication?"
  • 🧠 Automatic indexing — Every session is recorded and searchable
  • 📝 Decision tracking — Important choices are preserved
  • 🔒 100% local — Your data never leaves your machine
  • 5 min setup — One install, one command

Quick Start

# Install
pip install memotrail

# Index your existing Claude Code history
memotrail index

# Add to Claude Code
claude mcp add memotrail -- memotrail serve

That's it. Start a new Claude Code session and ask:

"What did we work on last week?"

How It Works

You code with Claude Code
        ↓
MemoTrail records the conversation
        ↓
Messages are chunked and embedded
        ↓
Stored locally (ChromaDB + SQLite)
        ↓
    Next session...
        ↓
Claude Code calls MemoTrail tools
        ↓
Relevant past context surfaces automatically

Available Tools

Once connected, Claude Code can use these tools:

Tool What it does
search_chats Search past conversations semantically
get_decisions List recorded architectural decisions
get_recent_sessions See what you worked on recently
get_session_detail Deep dive into a specific session
save_memory Manually save important facts
memory_stats See how much is indexed

CLI Commands

# Index existing Claude Code history
memotrail index

# Search from terminal
memotrail search "redis caching decision"

# View stats
memotrail stats

# Run MCP server (usually called by Claude Code)
memotrail serve

Architecture

~/.memotrail/
├── chroma/          # Vector embeddings (semantic search)
└── memotrail.db     # Session metadata (SQLite)

Everything runs locally. No cloud, no accounts, no API keys needed.

  • Embedding model: all-MiniLM-L6-v2 (~80MB, runs on CPU)
  • Vector DB: ChromaDB (persistent, local)
  • Metadata: SQLite (single file)

Roadmap

  • Claude Code session indexing
  • Semantic search across conversations
  • MCP server with 6 tools
  • CLI for indexing and searching
  • Automatic decision extraction
  • Session summarization
  • Cursor collector
  • Copilot collector
  • VS Code extension
  • Cloud sync (Pro)
  • Team memory (Team)

Development

# Clone
git clone https://github.com/melihhopa/memotrail.git
cd memotrail

# Install in dev mode
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check src/

Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

Good first issues:

  • Add Cursor session collector
  • Add Copilot session collector
  • Improve chunking strategy
  • Add BM25 keyword search alongside semantic search

License

MIT — see LICENSE


Built by Halil Hopa | memotrail.ai

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memotrail-0.1.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memotrail-0.1.0-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file memotrail-0.1.0.tar.gz.

File metadata

  • Download URL: memotrail-0.1.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for memotrail-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e7c235e61230132ce850683e8fa211f00ff3abba7eae4ba5dbca3e7b0d0f7c87
MD5 ab46ee28b250195bf5ccee7bb18924f9
BLAKE2b-256 214a12ce50030e1b294fc1fc5a0ac441161471ed0194c585aad5c5ef4a0c9c01

See more details on using hashes here.

File details

Details for the file memotrail-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: memotrail-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for memotrail-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 77ff3dd5004f69ad0d751f30abeef69b02950eb13f27ee3accdabac95668f754
MD5 b6a5abf7fd7e04a7ef547d3a96108578
BLAKE2b-256 7db4f1f92d2cd3e0e50d5a4e191832860de4865bf070acdb2f133091e4aed322

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page