AgentBrain is a local-first, long-term memory tool for AI agents that stores everything as a plain Markdown vault. Instead of locking your agent’s memory into a proprietary database or cloud API, it gives you an append-only Markdown folder you can read, edit, grep, and version with Git. It uses index-first retrieval with CJK-aware BM25 to stay token-efficient, and enforces human-approved consolidation to prevent multi-agent write conflicts.

What Is AgentBrain? A Local-First Markdown Memory Vault for AI Agents

AgentBrain is an open-source Python tool (Python 3.10+) that gives AI agents a durable, local-first memory layer stored as plain Markdown files. The core idea is simple: an agent’s long-term knowledge should live in a human-readable folder on your own machine, not inside a black-box database or a third-party cloud service.

The project installs via the PyPI package mnemosyne-lite — the name “agentbrain” was already taken on PyPI — but the CLI command remains agentbrain. This packaging quirk aside, the philosophy is clear: your agent’s memory is your data, formatted as plain text, portable across tools, and readable even if you delete the tool itself.

The vault follows a structured layout: an Index.md file acts as a cheap first retrieval layer, a lessons folder holds agent-authored knowledge, and a _consolidations/ directory stores human-approved proposals that merge and refine older entries. Because everything is Markdown, the same folder is instantly usable in Obsidian, grep, or Git — no vendor lock-in.

Why Local-First Markdown Memory Matters (and the Category Is Exploding)

Long-term memory is one of the hardest unsolved problems in agentic AI. Context windows are finite, so agents forget everything between sessions unless something persists knowledge. Cloud memory solves the persistence problem but introduces privacy, cost, and latency trade-offs. Local-first memory sidesteps all three.

The category is growing fast. Hacker News Algolia indexes 68 stories tagged “local-first agent memory” and 219 stories tagged “MCP server memory” (searched 2026-08-23), a strong signal that developers are actively experimenting with persistent agent memory. The category-leading project, EverOS, has 12,345 GitHub stars, demonstrating real, sustained market demand.

There are three concrete reasons developers are gravitating to Markdown for agent memory:

  1. Transparency and auditability. A Markdown file is readable by humans and agents alike. You always know exactly what your agent “remembers.”
  2. No lock-in. A Markdown folder is portable. If the tool vanishes, your data survives in a universally readable format.
  3. Privacy and cost. Everything runs locally — no secrets leave your machine, and there is no recurring API bill for memory storage.

How AgentBrain Works — Index-First Retrieval and CJK-Aware BM25

AgentBrain’s retrieval is designed around a simple principle: keep token usage low by avoiding expensive full scans. It uses an index-first strategy where Index.md acts as a cheap first layer to identify relevant files before any expensive content is fetched.

Here is the retrieval pipeline in plain terms:

  • Layer 1 — Index scan. The lightweight Index.md is searched first to shortlist candidate entries without reading the full vault.
  • Layer 2 — CJK-aware BM25 ranking. Candidates are ranked with a BM25 scoring function that is tuned for Chinese, Japanese, and Korean characters, not just Latin text. This matters because most competitor tools tokenize English well but stumble on CJK scripts.
  • Layer 3 — Compact output. By default the tool returns in mode='index', producing a compact token-efficient summary instead of dumping raw content. This keeps context usage low.

The token-efficiency focus is a deliberate differentiator. Where a heavyweight “memory layer” might load large swaths of context into every agent call, AgentBrain tries to hand the agent only the minimal, most relevant knowledge it needs.

Key Design Decisions: Append-Only Writes, Human-Approved Consolidation, Secret Scanning

AgentBrain makes three design decisions that set it apart from simpler Markdown-memory tools:

Append-Only Agent Writes

Agents are only allowed to create lessons — they can never edit or delete existing entries. This is a deliberate guard against the classic multi-agent failure mode where two agents overwrite each other’s knowledge and corrupt the vault. By making writes append-only, AgentBrain ensures history is always preserved and conflicts are never silently resolved by whichever agent writes last.

Human-Approved Consolidation

Because agents cannot edit, how does memory get merged or pruned? Through consolidation proposals. Agents write consolidation proposals into _consolidations/, and a human reviews and approves them before they take effect. This adds a human-in-the-loop quality gate that prevents stale, duplicated, or contradictory knowledge from accumulating — at the cost of manual review overhead.

Secret Scanning (v0.4.1)

Since v0.4.1, AgentBrain scans for credential-shaped content — sk- keys, ghp_ tokens, AKIA AWS keys, xox- Slack tokens, AIza Google API keys, bearer tokens, and private-key blocks — and refuses ingestion of anything that looks like a secret. Most agent memory tools silently ingest credentials into a plaintext vault; AgentBrain treats that as a security risk and enforces a hard stop.

AgentBrain vs. the Field (EverOS, iwe, understory, Ori-Mnemos)

AgentBrain is not the only player. Here is how it stacks up against the main alternatives.

ToolStars (approx.)PositioningMemory formatKey differentiator
AgentBrainearly-stageToken-efficient underdogPlain Markdown vaultAppend-only + human-approved consolidation; CJK-aware BM25
EverOS12,345Full “memory layer” across toolsMarkdown-nativeCategory leader, broad multi-tool scope
iwe1,566Markdown knowledge graphMarkdown + graph structureLSP, CLI + MCP for editors
understory293Self-wiring memoryPlain MarkdownSelf-organizing memory that “grows”
Ori-Mnemos319Persistent agentic memoryMarkdown (RMH)Recursive memory consolidation

The clearest comparison is with EverOS, the category leader. EverOS positions itself as a complete, portable “memory layer” spanning many apps, tools, and workflows — a heavyweight, broad solution with 12,345 stars. AgentBrain is the focused underdog: it emphasizes token efficiency, append-only discipline, and CJK support rather than breadth.

Against iwe, which layers a knowledge graph on top of Markdown, AgentBrain is simpler — it uses a flat index + BM25 rather than a graph structure. Against understory and Ori-Mnemos, which emphasize self-wiring and recursive consolidation, AgentBrain leans on explicit human approval instead of fully autonomous self-organization.

Strengths and Weaknesses — Where AgentBrain Shines and Where It Falls Short

No tool is perfect. Here is an honest assessment.

Strengths

  • Token efficiency. The index-first retrieval and compact mode='index' output keep context usage low — a real cost saver in LLM workflows.
  • CJK support. CJK-aware BM25 makes AgentBrain uniquely suited for Korean, Chinese, and Japanese agents, where many English-centric competitors underperform.
  • Conflict safety. Append-only writes plus human-approved consolidation prevent multi-agent write corruption.
  • Security enforcement. Secret scanning (v0.4.1) stops credentials from leaking into a plaintext vault.
  • Zero lock-in. A plain Markdown folder works in Obsidian, grep, and Git even if you uninstall AgentBrain.

Weaknesses

  • Human overhead. Consolidation requires human approval, which adds manual review burden as the vault grows.
  • Early-stage maturity. With a small star count relative to EverOS, the ecosystem and community are still young.
  • Limited autonomy. The append-only model is safe but slower than tools that self-organize memory automatically.
  • Packaging confusion. Installing via mnemosyne-lite while running agentbrain may trip up new users.

Who Should Use AgentBrain (and Who Shouldn’t)

AgentBrain is a strong fit if you:

  • Run CJK-language agents or work with Korean, Chinese, or Japanese content.
  • Care deeply about token costs and want minimal memory overhead per call.
  • Need a human-auditable, git-versionable memory that must never silently corrupt.
  • Value privacy and want memory that stays entirely on your machine.

You may want to look elsewhere if you:

  • Need a broad, multi-tool memory layer today (EverOS may fit better).
  • Want fully autonomous memory consolidation with no human review.
  • Prefer a mature, large-community tool with extensive documentation and ecosystem plugins.

Getting Started: Install, Init, Doctor, and MCP Setup in 3 Steps

Getting started with AgentBrain is straightforward.

Step 1 — Install. Install via pip (note the PyPI name differs from the CLI):

pip install mnemosyne-lite

Step 2 — Initialize. Run the init command to create your Markdown vault, then use the doctor command to verify the setup is healthy:

agentbrain init
agentbrain doctor

Step 3 — Connect your agent. Configure MCP (Model Context Protocol) so your agent can read from and write to the vault. If MCP is not available, AgentBrain can fall back to shell or file-only access modes, and a self-onboarding flow via AGENTS.mdONBOARDING.md lets a new agent auto-detect which access mode is available.

Verdict — Is AgentBrain Worth Adopting for Your AI Agent Workflow?

AgentBrain is a thoughtful, well-designed local-first memory tool that fills a real gap: token-efficient, CJK-aware, append-only Markdown memory with security enforcement. Its index-first retrieval and compact output are genuinely useful for keeping agent context costs low, and the append-only-plus-human-approval model is a principled answer to multi-agent write conflicts.

It is not the most mature or the broadest option — EverOS leads on scope and community. But for developers who want a simple, private, conflict-safe Markdown vault with strong CJK support and a tight token budget, AgentBrain is a compelling, zero-lock-in choice worth trying.

Frequently Asked Questions

What is a local-first agent memory in plain terms?

A local-first agent memory is a way for AI agents to remember information across sessions by storing it in files on your own machine instead of in a cloud database. AgentBrain stores that memory as a plain Markdown folder you control, read, and version yourself.

Does AgentBrain work with Claude Code or other coding agents?

Yes. AgentBrain is designed to plug into agent workflows, including via MCP (Model Context Protocol). When MCP is unavailable, it can fall back to shell or file-only access modes, and its self-onboarding flow helps new agents detect the correct access mode automatically.

Is AgentBrain really free and open source?

Yes, AgentBrain is an open-source Python tool distributed via PyPI under the package name mnemosyne-lite. There is no paid tier or cloud account required — it runs entirely on your own machine.

Can I read my agent’s memory without AgentBrain?

Absolutely. Because the memory is plain Markdown, you can open the vault in Obsidian, search it with grep, or track changes with Git — all without running AgentBrain. That is the core zero-lock-in guarantee.

How does AgentBrain prevent my agent from storing secrets?

Since v0.4.1, AgentBrain scans incoming content for credential-shaped strings (API keys, tokens, bearer tokens, private-key blocks) and refuses to ingest anything that matches. This keeps credentials out of the plaintext vault by default.