MAGI

Multi-Agent Graph Intelligence

Source Available · ELv2 Licensed

Your agents forget everything.
MAGI fixes that.

Shared memory for every AI agent in your stack. Claude, Codex, Cursor, GPT — one brain, all agents, your hardware.

17 MCP Tools · 5 Backends · 4 Protocols · ELv2 Licensed
magi-terminal
$

The problem with agent memory today

🧠

Agent Amnesia

Codex builds a module. Claude reviews code in the same repo. Neither knows what the other did. Every session starts from zero.

💻

Device Islands

Debug on your laptop. Switch to the server. Context is gone. Every machine is an island with its own fragmented memory.

🔒

Vendor Lock-in

Your memories live on someone else's cloud. Proprietary formats. No export. No self-hosting. Good luck migrating.

MAGI solves all three — open source, self-hosted, shared across every agent and device.

Everything your agents need to remember

A complete memory infrastructure built for production AI systems.

Git-Backed Versioning

Every memory is version controlled. Diff, rollback, branch. Your AI's knowledge base has a full audit trail.

Zero Dependencies

SQLite + ONNX embeddings. No API keys. No cloud. Runs entirely on your hardware.

Pluggable Storage

SQLite, PostgreSQL, MySQL, SQL Server, Turso. Plug into your existing database infrastructure.

Blazing Fast

Async write pipeline: <10ms client response. Caching layer: <1ms cached searches. 8+ writes/sec throughput.

Knowledge Graphs

Memories auto-link with typed relationships. See how your agent's knowledge connects and evolves.

Multi-Protocol

MCP, gRPC, REST, Web UI. Works with Claude, GPT, Codex, or any agent framework.

Works with

Every agent that speaks MCP, gRPC, or HTTP

Claude Code MCP
Codex MCP
Cursor MCP
Windsurf MCP
Continue MCP
Cline MCP
OpenCode MCP
Any HTTP Client REST

Connect via magi --mcp-only for agent subprocess mode, or magi --http-only for network access.

How it works

A clean architecture with async writes, hybrid search, and pluggable backends.

AI Agent MCP gRPC REST API Web UI MAGI Core Engine SQLite PostgreSQL / MySQL ONNX Embeddings Semantic Search Git Backend Version Control Knowledge Graph Relations & Patterns Async Write Pipeline 202 Accepted in <10ms • Workers handle embedding & indexing Hybrid search: semantic + keyword + graph traversal Auto-classify • Contradiction detection • Pattern analysis

How MAGI compares

The most complete open-source memory layer for AI agents.

Feature MAGI Mem0 Letta Zep
Git versioning
Self-hosted / offline Partial
Knowledge graph
MCP support
gRPC native
Auto-classify
Contradiction detection
Pluggable SQL backends
Cloud sync
License ELv2 Apache Apache Apache

Get started

Up and running in under a minute.

Install

binary curl -sSL https://raw.githubusercontent.com/j33pguy/magi/main/install.sh | bash
docker docker compose up -d
source git clone https://github.com/j33pguy/magi && cd magi && go build ./cmd/magi
1

Start the server

magi --http-only
2

Store a memory

curl -X POST :8302/remember
  -d '{"content": "..."}'
3

Search & recall

curl :8302/search
  ?q=user+preferences

Use with any MCP agent

Add MAGI as an MCP server in your agent config (Claude Code, Codex, Cursor, Windsurf, Continue):

{
  "mcpServers": {
    "magi": {
      "command": "magi",
      "args": ["--mcp-only"]
    }
  }
}