Permanent memory for AI agents. Store, search, and organize knowledge across conversations.
Memory Engine gives AI coding agents a persistent memory layer they can read from and write to via MCP. Memories are organized with tree paths, tagged with metadata, and searchable by meaning (semantic), keywords (BM25), or both (hybrid via Reciprocal Rank Fusion).
curl -fsSL https://install.memory.build | shAlternative install methods:
brew install timescale/tap/menpm i -g @memory.build/cli# Authenticate
me login
# Install the integration for your coding agent (once, user scope)
me claude install # or: me opencode install / me codex install# Turn on capture for a project and choose where its memories livecd~/code/your-project
me init . \
--capture-server https://api.memory.build \
--capture-space <space> \
--capture-tree /share/projects/your-project \
--capture-harness claudeme claude install installs the Claude Code plugin (hooks + slash commands +
MCP), dormant — it never logs in or turns anything on. me init is
machine-local: it enables session capture and points it at a server, space, and
tree (captures default privately to ~/projects/<repo>). Backfill past
sessions and git history with me import claude / me import git, and inspect
what applies to a directory with me doctor.
# Store a memory
me memory create "Auth uses bcrypt with cost 12" --tree share.design.auth
# Search by meaning + keywords
me memory search "how does authentication work"# Import memories, agent sessions, and git history
me import memories notes.md # md / yaml / json / ndjson records
me import claude # all Claude Code sessions on this machine
me import git # a repo's commit history# Connect other AI tools (Claude Code uses `me claude install`)
me opencode install
me codex installMemory Engine runs as an MCP server that AI agents connect to over stdio. Each agent gets 10 tools for creating, searching, and managing memories. All data lives in PostgreSQL, using native extensions for search:
- pgvector for semantic (vector) search
- pg_textsearch for BM25 keyword search
- ltree for hierarchical tree paths
- JSONB + GIN for metadata filtering
- tstzrange for temporal queries
- Tree-scoped access grants evaluated in the search SQL (no RLS)
Want to run your own Memory Engine backend? See Self-Hosting
— a Docker Compose stack (server + PostgreSQL), built from a tagged release,
plus building the me CLI from source to connect to it.
- Getting Started -- install, login, first memory
- Core Concepts -- memories, tree paths, metadata, search modes
- Access Control -- users, roles, grants, ownership
- Memory Packs -- pre-built knowledge collections
- MCP Integration -- connecting AI agents
- CLI Commands -- full command reference
- MCP Tools -- full MCP tool reference