MCP ConfigsApr 6, 2026·2 min read

Engram — Persistent Memory System for AI Agents

Agent-agnostic persistent memory system with SQLite full-text search. Ships as MCP server, HTTP API, CLI, and TUI. Gives any AI coding agent long-term memory across sessions. 2,300+ stars.

TL;DR
Agent-agnostic persistent memory with SQLite search, shipping as MCP server, HTTP API, CLI, and TUI.
§01

What it is

Engram is a persistent memory system designed for AI coding agents. It stores memories in SQLite with full-text search and ships four interfaces: an MCP server, an HTTP API, a CLI, and a TUI (terminal UI). Any AI agent that supports MCP or HTTP can use Engram to remember information across sessions without external dependencies.

This tool targets developers who use AI coding agents daily and lose context between sessions. Engram gives any agent long-term memory, whether it is Claude Code, Cursor, Cline, or a custom agent pipeline. The token_estimate for this workflow is approximately 2,800 tokens.

§02

How it saves time or tokens

Without persistent memory, developers re-explain project context, coding conventions, and past decisions at the start of every AI session. Engram lets the agent store and retrieve this information automatically, saving the tokens spent on repeated context-setting. The SQLite backend ensures fast retrieval without the overhead of running a vector database.

§03

How to use

  1. Install Engram via go install or download the binary
  2. Add the MCP server configuration to your agent's .mcp.json
  3. The agent can now store and retrieve memories across sessions
§04

Example

{
  "mcpServers": {
    "engram": {
      "command": "engram",
      "args": ["mcp"]
    }
  }
}
# Install
go install github.com/GentlemanHu/engram@latest

# CLI usage
engram store 'Project uses Go-Zero for backend, Nuxt 3 for frontend'
engram search 'what framework does the project use'

# TUI mode
engram tui
§05

Related on TokRepo

§06

Common pitfalls

  • Memory quality depends on what the agent stores; configure clear storage prompts to avoid noisy or low-value memories
  • SQLite full-text search works well for keyword matching but lacks semantic similarity search for fuzzy queries
  • The MCP server must be running for the agent to access memories; restart it if the agent reports connection errors

Frequently Asked Questions

Which AI agents work with Engram?+

Any agent that supports MCP (Model Context Protocol) can use Engram as a memory server. This includes Claude Code, Cursor, Cline, and custom agents. The HTTP API and CLI provide alternative integration paths for agents without MCP support.

Does Engram require a vector database?+

No. Engram uses SQLite with built-in full-text search (FTS5). There is no need to run a separate vector database, embedding model, or external search service. Everything runs in a single binary.

How does Engram store memories?+

Memories are stored as text entries in a SQLite database with full-text search indexing. Each memory has a timestamp and optional tags. The agent can store, search, and retrieve memories through any of the four interfaces.

Can I use Engram without MCP?+

Yes. Engram provides an HTTP API, a CLI, and a TUI in addition to the MCP server. You can integrate it into any workflow that can make HTTP requests or shell commands.

Is Engram suitable for team use?+

Engram is designed for individual agent sessions. Each instance maintains its own SQLite database. For team use, each developer would run their own Engram instance. There is no built-in multi-user synchronization.

Citations (3)
🙏

Source & Thanks

Created by Gentleman Programming. Licensed under MIT.

engram — ⭐ 2,300+

Thanks to the Gentleman Programming community for solving the AI amnesia problem.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.