Second Brain
Star on GitHubGet started

Everywhere,
or on this machine.

Agentmemory and Second Brain both refuse to hand your thinking to someone else’s cloud, and they part ways on where the refusal lands. Agentmemory is a local-first runtime for coding agents: one Node process on your machine, SQLite and JSON on disk, nothing hosted. Second Brain self-hosts into your own Cloudflare account, which is a different bargain: not local-only, but still nowhere the maintainer can read. The question is whether your memory needs to travel.

Which one should you pick?

Agent-Memory

Take agentmemory if your memory is about code and lives on one machine. Its auto-capture hooks, its hybrid BM25, vector and graph retrieval, its offline-by-default posture: for a developer who wants everything local, it is the stronger claim, and it is free under Apache-2.0.

Second Brain

Take Second Brain if the same thinking needs to reach Claude on your phone, Cursor at the desk and ChatGPT in the browser, with sources such as Obsidian and calendar attached. You trade pure offline for everywhere access, and keep the account.

How they compare

Second Brain and Agent-Memory compared, criterion by criterion.
CriterionSecond BrainAgent-Memory
Where the memory livesIn your Cloudflare account: D1, Vectorize and the Worker all inside it, unreadable to the maintainers.Your machine: one local process with SQLite and JSON state on disk, under your OS profile. github.com/rohitg00/agentmemory, checked 6 Sep 2026.
Who can read itYou, from any MCP client or the dashboard, over OAuth.Whoever can reach that machine’s files; remote deployment and node sync are possible with a bearer token. github.com/rohitg00/agentmemory, checked 6 Sep 2026.
Tools and sourcesAny MCP client (Claude, Claude Code, ChatGPT, Cursor and the rest), plus Obsidian, Notion, read-only calendar and email, iOS Shortcuts, the CLI and a bookmarklet.Native plugins for Claude Code, Codex CLI, Cursor, OpenClaw, Hermes and pi, plugin support for Copilot CLI and OpenCode, any other MCP client or REST caller, and 12 auto-capture hooks. github.com/rohitg00/agentmemory, checked 6 Sep 2026.
Coherence over monthsEvery capture is compared by meaning: contradictions settle on the newer belief with the older kept for audit, near-duplicates merge or replace, and 95 per cent matches are blocked.Session-stop consolidation with an LLM key compresses, merges duplicates, decays stale rows and scores retention; superseded versions leave recall but stay in a version history. github.com/rohitg00/agentmemory, checked 6 Sep 2026.
TeamsPersonal and shared layers on one Worker, private by default, at no extra charge.Namespaced shared and private team memory with share and feed tools, plus a shared multi-agent scope with an audit trail; mesh federation syncs nodes over authenticated HTTPS. github.com/rohitg00/agentmemory, checked 6 Sep 2026.
CostFree at personal scale inside Cloudflare’s free tier; MIT-licensed forever, no paid tier.Free and open source; the vendor estimates about 170K tokens a year, about $10 with an LLM key or nothing with local embeddings, which is the vendor’s own estimate. github.com/rohitg00/agentmemory, checked 6 Sep 2026.
SetupThe desktop app provisions the database, index and Worker in about two minutes, no terminal.One npx command with interactive wiring; native Windows needs a manual engine install or WSL2/Docker, and keyless mode runs BM25 only. github.com/rohitg00/agentmemory, checked 6 Sep 2026.
ExportJSON backup and Markdown export from the dashboard, with restore.Obsidian markdown mirroring, REST export and session replay; no cloud backup advertised. agent-memory.dev, checked 6 Sep 2026.
LicenseMIT.Apache-2.0, v0.9.29, actively maintained. github.com/rohitg00/agentmemory, checked 6 Sep 2026.

Where Agent-Memory wins

Agentmemory wins on locality and engineering. By default nothing leaves the machine, which is the strongest privacy posture going; remote deploy and mesh sync are opt-in. Twelve hooks capture sessions without you saving anything. The retrieval engine is real: hybrid BM25, vector and graph search with on-device reranking, exposed through 54 MCP tools and 130 REST endpoints. It can backfill your existing Claude Code transcripts from JSONL. The vendor reports 95.2 per cent recall at five on LongMemEval-S, with reproduction steps published; that figure is vendor-reported, and it is more measurement than Second Brain publishes.

Common questions

Is local-only more private than self-hosted?

On paper, yes: local data need never leave the machine, which is the strongest posture. Second Brain’s trade is different rather than worse: your memory sits on infrastructure you control, behind your Cloudflare login, and the maintainers cannot read it. You get everywhere access in exchange for depending on Cloudflare.

Does Second Brain work with Claude Code and Cursor?

Yes, they are first-class clients. The desktop app wires both up during setup and hands over one address for everything else; the CLI and any other MCP client use the same endpoint.

Does Second Brain do keyword search?

Recall is semantic, with time-decay reranking so recent versions of a fact surface first. A keyword arm covers Japanese, Chinese and other unspaced scripts, and keyword recall keeps working if the vector index is ever down. Keyless BM25-only is agentmemory’s design, not Second Brain’s.

Is Second Brain harder to set up than a local CLI?

No. The desktop app for Mac and Windows provisions the database, the vector index and the Worker in about two minutes, with no terminal. The CLI exists for people who want it; it is not required.

Sources

Take the memory with you.

Every tool, every device, all inside your own Cloudflare account. Free and MIT-licensed forever.

Get Second Brain