Open-source cross-agent memory layer for coding agents.
Compatible with Cursor, Claude Code, Codex, Windsurf, Gemini CLI, GitHub Copilot, Kiro, OpenCode, Antigravity, and Trae through MCP.
Git Memory | Reasoning Memory | Cross-Agent Recall | Control Plane Dashboard
简体中文 | Quick Start | Supported Clients | Core Workflows | Documentation | Setup Guide
If you are using an AI coding agent to install or operate Memorix, have it read the Agent Operator Playbook first.
That playbook is the canonical AI-facing guide for:
- installation and runtime-mode selection
- Git/project binding rules
- stdio vs HTTP control-plane setup
- per-agent integration and hooks
- generated dot-directory behavior
- troubleshooting and safe operating rules
Most coding agents remember only the current thread. Memorix gives them a shared, persistent memory layer across IDEs, sessions, and projects.
What makes Memorix different:
- Git Memory: turn
git commitinto searchable engineering memory with noise filtering and commit provenance. - Reasoning Memory: store why a decision was made, not just what changed.
- Cross-Agent Local Recall: multiple IDEs and agents can read the same local memory base instead of living in isolated silos.
- Memory Quality Pipeline: formation, compaction, retention, and source-aware retrieval work together instead of acting like isolated tools.
Memorix is built for one job: let multiple coding agents share the same durable project memory through MCP without giving up Git truth, reasoning history, or local control.
Memorix currently ships first-class integrations for:
- Cursor
- Claude Code
- Codex
- Windsurf
- Gemini CLI
- GitHub Copilot
- Kiro
- OpenCode
- Antigravity
- Trae
If a client can speak MCP and launch a local command or HTTP endpoint, it can usually connect to Memorix even if it is not in the list above yet.
Install globally:
npm install -g memorixInitialize Memorix config:
memorix initmemorix init lets you choose between Global defaults and Project config.
Memorix uses two files with two roles:
memorix.ymlfor behavior and project settings.envfor secrets such as API keys
Then pick the path that matches what you want to do:
| You want | Run | Best for |
|---|---|---|
| Quick MCP setup inside one IDE | memorix serve |
Cursor, Claude Code, Codex, Windsurf, Gemini CLI, and other stdio MCP clients |
| Dashboard + long-lived HTTP MCP in the background | memorix background start |
Daily use, multiple agents, collaboration, dashboard |
| Foreground HTTP mode for debugging or a custom port | memorix serve-http --port 3211 |
Manual supervision, debugging, custom launch control |
Most users should choose one of the first two options:
memorix serveif you just want Memorix available inside your IDE as fast as possiblememorix background startif you want the dashboard and a shared HTTP control plane running in the background
Optional local UI:
memorixUse bare memorix only when you want the interactive local workbench in a TTY. It is not the main setup path for most users.
Companion commands:
memorix background status
memorix background logs
memorix background stopIf you need the HTTP control plane in the foreground for debugging, manual supervision, or a custom port, use:
memorix serve-http --port 3211If you are using the HTTP control plane across multiple workspaces or agents, make sure each session binds with memorix_session_start(projectRoot=...).
The deeper details around startup root selection, project binding, config precedence, and agent/operator workflows live in docs/SETUP.md and the Agent Operator Playbook.
Add Memorix to your MCP client:
{
"mcpServers": {
"memorix": {
"command": "memorix",
"args": ["serve"]
}
}
}{
"mcpServers": {
"memorix": {
"transport": "http",
"url": "http://localhost:3211/mcp"
}
}
}If you use the HTTP control plane across multiple workspaces or agents, the client or agent should also call memorix_session_start(projectRoot=ABSOLUTE_WORKSPACE_PATH) at the beginning of each project session.
The per-client examples below show the simplest stdio shape. If you prefer the shared HTTP control plane, keep the generic HTTP block above and use the client-specific variants in docs/SETUP.md.
Cursor | .cursor/mcp.json
{
"mcpServers": {
"memorix": {
"command": "memorix",
"args": ["serve"]
}
}
}Claude Code
claude mcp add memorix -- memorix serveCodex | ~/.codex/config.toml
[mcp_servers.memorix]
command = "memorix"
args = ["serve"]For the full IDE matrix, Windows notes, and troubleshooting, see docs/SETUP.md.
Use MCP tools such as:
memorix_storememorix_searchmemorix_detailmemorix_timelinememorix_resolve
This covers decisions, gotchas, problem-solution notes, and session handoff context.
Install the post-commit hook:
memorix git-hook --forceOr ingest manually:
memorix ingest commit
memorix ingest log --count 20Git memories are stored with source='git', commit hashes, changed files, and noise filtering.
memorix background startThen open:
- MCP HTTP endpoint:
http://localhost:3211/mcp - Dashboard:
http://localhost:3211
Companion commands:
memorix background status
memorix background logs
memorix background stopUse background start as the default long-lived HTTP mode. If you need to keep the control plane in the foreground for debugging or manual supervision, use:
memorix serve-http --port 3211This HTTP mode gives you collaboration tools, project identity diagnostics, config provenance, Git Memory views, and the dashboard in one place.
When multiple HTTP sessions are open at once, each session should bind itself with memorix_session_start(projectRoot=...) before using project-scoped memory tools.
flowchart LR
subgraph Ingress["Ingress Surfaces"]
A1["Git hooks / ingest"]
A2["MCP tools"]
A3["CLI / TUI"]
A4["HTTP dashboard"]
end
subgraph Runtime["Memorix Runtime"]
B1["stdio MCP server"]
B2["HTTP control plane"]
B3["project binding + config"]
end
subgraph Memory["Memory Substrates"]
C1["Observation memory"]
C2["Reasoning memory"]
C3["Git memory"]
C4["Session + team state"]
end
subgraph Processing["Async Processing"]
D1["Formation pipeline"]
D2["Embedding + indexing"]
D3["Graph linking"]
D4["Dedup + retention"]
end
subgraph Consumption["Consumption Surfaces"]
E1["Search / detail / timeline"]
E2["Dashboard / team views"]
E3["Agent recall / handoff"]
end
A1 --> B1
A2 --> B1
A2 --> B2
A3 --> B1
A3 --> B2
A4 --> B2
B1 --> B3
B2 --> B3
B3 --> C1
B3 --> C2
B3 --> C3
B3 --> C4
C1 --> D1
C1 --> D2
C1 --> D3
C1 --> D4
C2 --> D1
C2 --> D3
C3 --> D2
C4 --> D3
D1 --> E1
D2 --> E1
D3 --> E2
D4 --> E3
C4 --> E3
Memorix is not a single linear pipeline. It accepts memory from multiple ingress surfaces, persists it across multiple substrates, runs several asynchronous quality/indexing branches, and exposes the results through different retrieval and collaboration surfaces.
- Observation Memory: what changed, how something works, gotchas, problem-solution notes
- Reasoning Memory: why a choice was made, alternatives, trade-offs, risks
- Git Memory: immutable engineering facts derived from commits
- Default search is project-scoped
scope="global"searches across projects- Global hits can be opened explicitly with project-aware refs
- Source-aware retrieval boosts Git memories for "what changed" questions and reasoning memories for "why" questions
git clone https://github.com/AVIDS2/memorix.git
cd memorix
npm install
npm run dev
npm test
npm run buildKey local commands:
memorix status
memorix dashboard
memorix background start
memorix serve-http --port 3211
memorix git-hook --forceMemorix builds on ideas from mcp-memory-service, MemCP, claude-mem, Mem0, and the broader MCP ecosystem.
