Open Source · Self-Hosted · Yours

Give Your Agents
Durable Memory

#004
Decision
hash: 8f3a
#005
Insight
hash: c19e
#006
Checkpoint
hash: 44bd
#007
Next Thought
append only

Every thought stores the hash of the thought before it.

MentisDB is a durable, self-hosted memory engine for AI agents. Persistent across sessions. Shared across your entire fleet. Owned by you — not your AI provider.

Free & open source · MIT License · Runs on your laptop or server

Get running in 30 seconds

v0.9.3.39

Install MentisDB

One command installs the daemon. Your AI tools connect to it instantly. Agents bootstrap themselves over MCP. Memory runs on your machine. Yours to keep.

cargo install mentisdb && mentisdbd

Requires Rust. Install Rust →

🍎 macOS users: make sure Xcode Command Line Tools are installed first — xcode-select --install

Then connect your AI tool

Start with the built-in setup flow. The wizard scans your machine and configures what it finds. If you already know which integration you want, use the targeted setup command instead. Once connected, MentisDB teaches the agent how to use memory during the MCP handshake and gives operators ranked search plus grouped context in the dashboard.


Recommended pathSetup Wizard
Recommended

Interactive. Scans your machine, shows every detected tool, lets you choose what to configure, and asks for confirmation before applying changes.

Run the wizardmentisdbd wizard
Accept defaults and skip promptsmentisdbd wizard --yes
Use a custom MCP URLmentisdbd wizard --url https://my.mentisdb.com:9473
Target one integrationSetup Command

Use this when you want one specific target or want to inspect the exact plan first. It prints what will change, then waits for confirmation before writing.

Configure one integrationmentisdbd setup claude-code
Configure every detected integrationmentisdbd setup all
Preview without writingmentisdbd setup all --dry-run

Supported targets: claude-code, claude-desktop, codex, copilot, gemini, opencode, qwen, vscode-copilot

Or connect manually — copy the command or config for your tool below. Manual wiring still gets the same MCP bootstrap instructions, resource-based skill loading, and ranked retrieval surface once the client connects.

Claude Code
claude mcp add --transport http mentisdb http://127.0.0.1:9471
OpenAI Codex
codex mcp add mentisdb --url http://127.0.0.1:9471
GitHub Copilot CLI

Add to ~/.copilot/mcp-config.json:

{ "mentisdb": { "type": "http", "url": "http://127.0.0.1:9471" } }
Qwen Code
qwen mcp add --transport http mentisdb http://127.0.0.1:9471
Google Gemini CLI
{ "mcpServers": { "mentisdb": { "type": "http", "url": "http://127.0.0.1:9471", "httpUrl": "http://127.0.0.1:9471" } } }
OpenCode
{ "mcp": { "mentisdb": { "type": "remote", "url": "http://127.0.0.1:9471", "enabled": true } } }
VS Code + Copilot
{ "servers": { "mentisdb": { "type": "http", "url": "http://127.0.0.1:9471" } } }
Claude for Desktop

No daemon pre-start, no Node.js, no mcp-remote. The stdio process auto-detects a running daemon and proxies to it, or launches one in the background.

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "mentisdb": {
      "command": "mentisdbd",
      "args": ["--mode", "stdio"]
    }
  }
}

Prime Your Agent in One Sentence

That's it. Type this once. The agent bootstraps itself, loads the operating rules, and writes a checkpoint to memory. Every session after — on any tool — starts already knowing.

Paste into your first conversation
prime yourself for optimal mentisdb usage

What the agent does automatically:

  1. Detect chainThe agent calls mentisdb_list_chains to find the right chain for your project. If one already exists it connects to it without overwriting anything. Only a brand-new project gets a fresh chain.
  2. BootstrapThe agent calls mentisdb_bootstrap to open the chain and receive the list of available skills. Safe to call on existing chains — it never clobbers prior memory.
  3. Load rulesIt immediately reads mentisdb://skill/core — the embedded operating manual — before touching any memories. The skill teaches it how to read, write, and tag what comes next.
  4. Load memoryIt calls mentisdb_recent_context to recover where things left off, then writes a Summary checkpoint so every future session picks up here — no re-priming needed.

Additional skills can be imported via the MentisDB dashboard or by asking your agent to call mentisdb_read_skill. Imported skills appear in the available_skills field of the bootstrap response — and because the agent writes the skill knowledge to memory, even a brand-new agent on a different tool will read it back automatically.

Built-In Infrastructure

MentisDB ships with a skill registry and a web dashboard — not just a database, but a complete memory operations platform.

🧩

Skill Manager

Upload, version, and distribute operating instructions to your agent fleet. Skills are immutable, versioned documents — like git commits for agent behavior. Each upload creates a new version; old versions stay accessible for audit. Deprecated or compromised skills can be revoked with a single call.

Skills are loaded at session start, giving every agent the same playbook. A rust-concurrency-patterns skill checked in on Monday is available to every engineer agent by Tuesday — no copy-paste, no wiki rot.

📊

Web Dashboard

A built-in web UI to browse memory chains, inspect individual thoughts, manage agents, and upload or review skills — all from your browser. No external tools, no database queries, no CLI gymnastics.

Search across chains, filter by agent or thought type, trace the hash chain for integrity, and onboard new agents with a few clicks. Protected by PIN authentication with constant-time comparison and rate limiting.

The Problem with AI Memory Today

Without durable memory, your agents are brilliant in the moment — and amnesiac by design.

🧠

Agents Have Amnesia

Every time an AI agent's context window fills up, it forgets everything. Decisions, lessons, constraints — gone. Your team keeps re-explaining what took weeks to learn.

🔒

Your Memories Are Held Hostage

When you store memory through a vendor's API, they control it. Change providers, hit rate limits, or lose your account — and the accumulated intelligence of your agent fleet disappears.

🔁

Teams of Agents Can't Learn Together

Each agent session is isolated. One agent discovers a critical bug pattern, but the next agent starts from zero. There's no shared brain, no institutional memory, no compounding.

What You Can Do

MentisDB transforms isolated, amnesiac agents into a coordinated, self-improving intelligence network.

🔁

Zero Context Loss

When an agent's context window fills, it writes a Summary checkpoint to MentisDB, compacts, reloads, and continues without losing a single decision. Chat history is ephemeral. MentisDB is permanent.

🚀

Fleet Orchestration

One project manager agent decomposes work, dispatches parallel specialists pre-warmed with shared memory, and synthesizes results wave by wave. Your fleet thinks together.

Session Resurrection

Any agent loads the chain and immediately knows where the project stands, what decisions were made, what traps were hit, and what comes next — without re-reading code or re-asking the human.

📚

Self-Improving Agents

Agents upload updated skill files after learning something new. A skill checked in at the start of a project is better by the end of it. The fleet's collective knowledge compounds over time.

🔧

Harness Swapping

The same durable memory works across every AI coding tool. Claude Code, Copilot CLI, Cursor, Codex — connect any MCP-capable host to the same running daemon. Switch tools without losing context.

🏢

Organizational Memory

Multiple agents, multiple roles, multiple owners write to the same chain. New engineers or new agents boot up, load the chain, and inherit everything the team learned — from day one.

One Memory. Many Agents.

MentisDB is an append-only memory ledger. Agents can share a single chain for collective intelligence — or run entirely private chains. One per agent, one per project, one per team, one per company. You decide the boundaries.

Agent: apollo
Decision
#004 · architect
Agent: astro
LessonLearned
#005 · backend
Agent: orion
Checkpoint
#006 · pm
You / Any Agent
Next thought...
→ append only

Every thought in the chain links to the previous one via its hash — a tamper-evident record of your fleet's collective intelligence.

🔗

Append-Only Ledger

Every thought is permanently recorded. Nothing is ever overwritten or deleted. Run one shared chain for your whole fleet, or create isolated chains per agent, project, team, or organization — the history of every chain is always accessible and replayable.

👤

Every Thought is Attributable

Each memory carries a stable agent_id. You always know who decided what, when. Filter by agent, by type, by time — the provenance is always there.

🔄

Agents Learn Across Sessions

One agent's LessonLearned becomes another agent's operating rule. Specialists share what they know. The collective intelligence of the fleet outlives any individual context window.

🔐

Hash-Chained Integrity

Every thought hashes into the chain. If history were tampered with, the chain breaks. Your agent fleet's memory is tamper-evident by design — no silent rewrites, ever.