Skip to main content

Local, persistent memory for AI development workflows

Project description

Engram

Local, persistent memory for AI development workflows.

Your AI assistant finally remembers your entire codebase.


The Problem

  • Cursor forgets your codebase after 5 minutes
  • Claude loses context mid-conversation
  • Copilot suggests code that conflicts with your architecture
  • You keep re-explaining the same things

The Solution

Engram creates a persistent memory layer that any AI can access via MCP.

# Index your project
engram init ~/my-project

# Configure Claude/Cursor
engram setup

# Done. Your AI now remembers everything.

Features

  • Local-first — Your code never leaves your machine
  • GPU accelerated — Fast indexing with MPS (Mac) or CUDA
  • MCP native — Works with Claude Desktop, Cursor, and any MCP client
  • Incremental updates — Only re-indexes what changed
  • Crash-proof — Saves progress, resumes if interrupted
  • Portable — Copy your "memory cartridge" anywhere

Supported Files

Type Extensions
Code .py .js .ts .tsx .go .rs .java .rb .php .swift .c .cpp
Docs .pdf .txt .md .rst
Config .json .yaml .yml .toml
Images .png .jpg .jpeg (OCR)

Quick Start

Install

# Clone and setup
git clone https://github.com/Tobbiloba/engram.git
cd engram
python3 -m venv venv
source venv/bin/activate
pip install -e .

Or one-liner (coming soon):

curl -sSL https://engram.dev/install | bash

Index Your Project

# Index current folder
engram init

# Index specific folder
engram init ~/projects/my-app

# Custom output name
engram init ~/projects/my-app -o my_brain

Configure MCP

engram setup

This auto-detects Claude Desktop and Cursor, and configures them.

Query From Terminal

engram query "how does authentication work"

Watch for Changes

engram watch ~/projects/my-app

Runs in background, auto-updates index when files change.


How It Works

┌─────────────┐     ┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Files     │────▶│   Chunks    │────▶│  Vectors    │────▶│   FAISS     │
│  Code/Docs  │     │ 1000 chars  │     │ 384 dims    │     │   Index     │
└─────────────┘     └─────────────┘     └─────────────┘     └─────────────┘
                                                                   │
                                                                   ▼
┌─────────────┐     ┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│     AI      │◀────│   Results   │◀────│  Semantic   │◀────│ MCP Server  │
│   Claude    │     │  Top 5      │     │   Search    │     │             │
└─────────────┘     └─────────────┘     └─────────────┘     └─────────────┘
  1. Index — Engram scans your files and creates chunks
  2. Embed — Each chunk becomes a 384-dimension vector (local model, no API)
  3. Store — Vectors saved to FAISS index (fast similarity search)
  4. Query — MCP server exposes query_memory tool to AI assistants
  5. Search — AI asks questions, gets relevant code/docs back

CLI Commands

Command Description
engram init [folder] Index a folder
engram query "..." Search from terminal
engram watch [folder] Start background watcher
engram status Show index stats
engram setup Auto-configure MCP

Manual MCP Configuration

If engram setup doesn't work, add manually:

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "engram": {
      "command": "/path/to/engram/venv/bin/python",
      "args": ["/path/to/engram/server.py", "/path/to/your_engram"]
    }
  }
}

Cursor

Edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "engram": {
      "command": "/path/to/engram/venv/bin/python",
      "args": ["/path/to/engram/server.py", "/path/to/your_engram"]
    }
  }
}

Requirements

  • Python 3.9+
  • ~2GB disk space (for model + index)
  • For OCR: brew install tesseract poppler

Tech Stack

  • Embeddings: sentence-transformers/all-MiniLM-L6-v2 (runs locally)
  • Vector Store: FAISS
  • GPU: MPS (Apple Silicon) / CUDA (NVIDIA) / CPU fallback
  • Protocol: MCP (Model Context Protocol)

Roadmap

  • Local vector indexing
  • MCP server
  • GPU acceleration
  • Incremental updates
  • Background watcher
  • Temporal memory (what changed recently?)
  • Git-aware context
  • Architecture insights
  • Desktop app

See ROADMAP.md for details.


Contributing

PRs welcome! See CONTRIBUTING.md for guidelines.


License

MIT — Use freely, modify freely, share freely.


Built for developers who are tired of re-explaining their codebase.

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

engram_dev-0.1.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

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

engram_dev-0.1.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for engram_dev-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7c5005e4476e12415bb11b2e121087d74ef4c2c250f5ac28c57c8b389d75db91
MD5 6a846c77ccd8158585186a0db8755d2b
BLAKE2b-256 fa3749e5938644f8e3523fa8c191d21dd552a12cdfdd0c005143e6b8a12c7be5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for engram_dev-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d7e8baf1ba049b09b12a443f03694d894aa21944a0472e48947db2c839e0733
MD5 61d06b9f0bb6b3f29f8c7edb55a312a3
BLAKE2b-256 644a8b82c38cbd18b5ea4f87bd012719f5cdef7f37c63a8198656d25e67f8e37

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