Overview
MEX starts from a familiar problem: one engineer knows why a constraint exists, another has the debugging history, and a coding agent found an important edge case in a session nobody else will read. The next teammate has to piece it all together again. MEX gives that knowledge a durable home inside the repository itself — readable Markdown for architecture, decisions, conventions, requirements and handoffs — so what one engineer and their agent learn becomes context the next person (or the same person in a new session) can build on.

The design splits shared meaning from local machinery. Canonical records live under `.mex/` and travel with ordinary Git commit, push and pull; the Code Graph and Wiki search index are rebuildable SQLite files that each checkout builds for itself and never commits. There is no hosted MEX service, Docker, proxy, MEX account or MEX-owned model key. People explore and review the memory in the Project Hub, a browser UI that listens on `127.0.0.1` against their own checkout; agents reach it through the `mex` CLI plus the project instructions and skills that setup installs for Claude Code, Codex, Cursor, Windsurf, GitHub Copilot and OpenCode.

Two views of the codebase sit side by side. The Wiki explains architecture, conventions, decisions and patterns in language people can review, while the Code Graph uses bundled Tree-sitter grammars to map symbols and relationships (TypeScript/TSX, JavaScript/JSX, Python and Rust, with partial C#) for bounded retrieval such as `mex graph scope` or `who-calls` queries. A Wiki claim can be grounded to a graph node, so when the code changes MEX flags the explanation as drifted for review. The project is explicit that drift is a review signal, not proof the prose is wrong, and that Wiki search is full-text and Graph retrieval lexical/structural rather than a vector engine.
On top of that sit team workflows with a human in the loop. Inbox turns a discussion into one proposed addition or correction to existing knowledge that a person approves; a Relay packages what the next engineer needs — progress, blockers, evidence, next actions and the observed branch and `HEAD` — as a durable handoff an agent drafts and a person publishes. Agents can prepare drafts and previews, but publishing, approving and committing stay with people. MEX is MIT-licensed and written in TypeScript; note that it ships pseudonymous CLI and Hub usage telemetry that is on by default and can be turned off with `mex telemetry disable`, `MEX_TELEMETRY=0` or `DO_NOT_TRACK=1`.
What it does

- Repository-native memory: architecture, decisions, conventions, patterns, Specs, Members and Activity stored as Markdown under `.mex/` and shared through normal Git
- Local Code Graph built with bundled Tree-sitter grammars, queryable by task (`graph scope`), relationship (`where-defined`, `who-calls`) and impact (`mex impact`), with bounded resolvers for Express, Next.js App Router, FastAPI, Flask and NestJS
- Grounding that links Wiki claims to code symbols and flags intact, changed, moved, missing or ambiguous references when the implementation drifts
- Project Hub on loopback for exploring the Context graph, Wiki and code, reviewing Inbox proposals and taking Relays, plus a `mex tui` terminal dashboard
- Agent integrations: project anchors and `/mex-inbox` / `/mex-relay` skills for Claude Code and `$mex-inbox` / `$mex-relay` for Codex, with instruction templates for Cursor, Windsurf, GitHub Copilot and OpenCode
- Human approval boundaries: agents draft and preview, while people publish proposals, approve canonical changes and commit — MEX never pushes or pulls
Getting started
MEX needs Node.js 22.5 or newer with SQLite FTS5 support, and a Git repository. The npm package is `mex-agent`; the installed command is `mex`. The README pins every command to its release, so swap in the version it shows.
Run setup from the repository root
Setup opens in your local browser Hub: choose your AI tools, watch the scaffold and indexes build, and let a selected Claude Code or Codex CLI populate project memory. Add `--cli` for a terminal-only setup (for example over SSH), or `--no-open` to just print the local link.
npx mex-agent@0.8.3 setup
# terminal setup instead of the browser
npx mex-agent@0.8.3 setup --cliReview and commit the setup
Review the exact setup-file diff in the Hub and choose Commit setup to create a local commit (MEX never pushes or pulls). Push it through your normal Git workflow so teammates get the same memory and agent instructions, and add participants in Team/Members.
Or install the CLI globally
npm install -g mex-agent@0.8.3
mex setupJoin a repository that already uses MEX
Pull the team's branch, then build the derived indexes in your own checkout and open the Hub. Reuse the shared memory rather than regenerating it.
npx mex-agent@0.8.3 graph rebuild
npx mex-agent@0.8.3 wiki rebuild-index
npx mex-agent@0.8.3 hubQuery the Wiki and the Code Graph
mex wiki query "authentication"
mex graph scope "trace the authentication flow"
mex graph query who-calls requireSession
mex impact requireSessionSync agent skills and record notes
Preview and install the Claude Code or Codex integration for an existing setup (`--tool claude` for Claude Code), then log decisions that future agents can retrieve with `mex timeline`.
mex skills sync --dry-run --tool codex
mex skills sync --tool codex
mex log "<message>"
mex timeline --query "retry" --type decision --limit 20 --jsonCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Keep architecture, decisions and conventions next to the code so every engineer's coding agent starts from the same reviewed context

- Hand unfinished work to a teammate with a Relay that records progress, tests run, blockers and where to look next
- Catch explanations that have gone stale when the code they describe changes, via grounding drift
- Give a long-running operational agent a Git-tracked memory workspace with the separate `agent-memory` setup mode
Version history
Every verified update to MEX that AI/TLDR tracked, newest first — each links to our coverage and the official changeset.
- 2026-09-27v0.8.3
Graph refresh becomes incremental, reusing unchanged file extractions, and grounding links survive more code changes; adds FastAPI, Flask and NestJS routes, scaffold export and Markdown timelines.
- 2026-09-13v0.8.2
Setup moves into the local browser Hub: choose integrations, follow agent population, review the setup diff and commit it in one flow, with terminal setup still available.
- 2026-09-09v0.8.1
Adds the explorable Context graph in the Hub, Inbox proposals for additions and corrections to existing knowledge, and open-to-team Relays.
- 2026-09-02v0.8.0
Connects repository memory, the local Code Graph and Wiki, and the Project Hub into one team workflow with Members, Activity, Inbox proposals and Relay handoffs.
How MEX compares
MEX alongside other open-source agent memory tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Claude-Mem | ★ 102k | Persistent memory layer for coding agents: it captures what an agent does during a session, compresses it into semantic summaries, and injects the relevant parts back into later sessions. |
| Mem0 | ★ 67.4k | A memory layer that you add to existing LLM agents to extract, store, and recall user facts and preferences across sessions using vector, graph, and key-value backends. |
| MemPalace | ★ 59.6k | Local-first agent memory that stores conversations verbatim instead of summarising them, with a structured palace index, pluggable vector backends and an MCP server. |
| Hindsight | ★ 51.1k | An agent memory server that stores facts and experiences, consolidates them into observations and mental models, and serves them back through retain, recall, and reflect operations. |
| OpenViking | ★ 40.2k | A context database that stores an agent's memories, resources, and skills as one browsable viking:// filesystem with three-tier (abstract/overview/details) on-demand loading. |
| Cognee | ★ 32.5k | A graph-native memory engine that turns raw documents and conversations into a queryable knowledge graph for agents that need to build lasting knowledge. |
| Graphiti | ★ 32k | A library that builds a temporal knowledge graph from an agent's conversations and data so facts can be tracked and queried as they change over time. |
| MEX | ★ 1.8k | Shared project memory for engineers and their coding agents — Markdown in the repo, local indexes, shared through Git |
