Second Brain vs Agent-Memory

One brain, everywhere —
not one folder, one machine.

Agent-Memory is a clever local-first memory engine for coding agents — running on your laptop. Second Brain is a self-hosted brain that syncs across every device and AI tool you use, from Claude Code to ChatGPT to your phone. Both open source. Different reach.

the short version

Agent-Memory is a great fit for one developer who lives in coding agents (Claude Code, Codex, Cursor) on a single machine and wants git-friendly markdown memory with zero network — everything local.

Second Brain aims wider: a single private memory that follows you across all your AI tools and every device, accessible from your phone or a second laptop, connected over MCP — while still being open source and self-hosted on infrastructure you own.

Bottom line: Agent-Memory shines inside one terminal. If you want that memory everywhere — every tool, every device, still owned by you and free — Second Brain is the one to deploy.

side by side

The comparison at a glance

Both are open source and privacy-first. The real split is reach: one machine vs. everywhere.

feature Second Brain Agent-Memory
What it is Personal memory across all your AI tools Local memory for AI coding agents
Where it runs Your own Cloudflare account (reachable anywhere) Locally, on a single machine
License Open source (MIT) Open source (MIT)
Cost Free on Cloudflare's free tier Free (self-hosted; ~$10/yr by their estimate)
Multi-device sync Yes — one brain, any device No — files live on one machine
Scope Any AI tool + the web, terminal & phone Coding agents (Claude Code, Codex, Cursor)
MCP support Native, plus OAuth 2.0 Yes (MCP, hooks & REST)
Storage D1 + Vectorize (managed in your account) Local SQLite + iii-engine (markdown files too)
Search Semantic recall with time-decay re-ranking BM25 + vector + graph (RRF fusion)
Self-curation Dedup, contradiction detection, smart-merge, importance scoring 4-tier consolidation, decay & auto-forget
Ready-made apps CLI, Obsidian, browser extension, iOS Shortcuts CLI, coding-agent skills & local viewer
Best for A memory that follows you across tools and devices One developer's coding agents, fully offline

Agent-Memory (agent-memory.dev / the open-source agentmemory engine, MIT) is a capable local-first memory engine + MCP server: no external databases (SQLite + iii-engine), BM25 + vector + graph search with RRF fusion, a 4-tier memory lifecycle with decay and auto-forget, hook-based auto-capture, a local real-time viewer, and integration with coding agents over MCP, hooks or REST. Self-hosted on a single machine by default (no built-in cross-device sync). A fast-moving project — verify specifics on agent-memory.dev. Retrieval and token benchmarks it cites are vendor-reported and disputed by other vendors.

01 — Reach

Memory that travels with you

Agent-Memory keeps everything local on one computer. That's wonderful for a single-machine, offline, git-tracked workflow — but the memory you build at your desk doesn't follow you to your laptop, your phone, or a teammate's session. There's no built-in cross-device sync (you'd version the files yourself with git), and the scope is coding agents specifically.

Second Brain lives on your Cloudflare account, so the same brain is reachable from anywhere and by any tool. Capture a thought on your phone via an iOS Shortcut and recall it in Claude Code minutes later. It's still self-hosted and yours — just not trapped on one disk.

Reachable anywhere

One endpoint your laptop, desktop and phone all talk to.

Every AI tool, not just coding

Claude, ChatGPT, Cursor, Claude Code & Codex share one brain.

Still self-hosted

Synced ≠ surrendered — the brain lives only in your account.

02 — Breadth of tools

Every AI client, not just coding agents

Both speak the Model Context Protocol, so this isn't about who has MCP. Agent-Memory is purpose-built for coding agents — Claude Code, Codex, Cursor and the Cursor CLI — and connects through MCP, hooks or its REST API, with installable skills for prompt injection. Within that lane it's excellent.

Second Brain is built for your whole AI life. The same brain serves consumer apps like Claude and ChatGPT, editors like Cursor, the terminal, the browser and your phone — over MCP with OAuth 2.0 (connect without pasting tokens into config files), plus a REST API and a streaming /chat endpoint.

MCP + OAuth 2.0

Connect Claude or ChatGPT in a click — no token wrangling.

CLI for the terminal

brain remember / brain recall right where you work.

REST + streaming chat

Build on it directly, or chat over your own memories.

03 — Keeping memory coherent

Both curate — in different ways

Credit where it's due: Agent-Memory is no flat notes pile. It runs a real engine — BM25 + vector + graph search with RRF fusion, a 4-tier memory lifecycle with decay and auto-forget, and hook-based auto-capture from your editor. For an offline, coding-focused setup that's genuinely strong.

Second Brain curates too, with its own emphasis: captures are embedded and compared to what you already know, so duplicates merge, contradictions get flagged, recall is re-ranked by recency and importance, and recurring themes are distilled into derived patterns — then it's all reachable from any device and any AI tool, not just the machine you coded on.

Dedup + smart merge

Near-identical entries combine instead of accumulating.

Contradiction detection

Conflicting facts surface instead of silently coexisting.

Time-decay ranking

Fresh, frequently-used, important memories rise to the top.

let's be fair

Which one should you pick?

Two good open-source tools with genuinely different sweet spots.

Pick Agent-Memory if…

// you live in one terminal

  • You work in coding agents on one machine and want memory that's purely local.
  • You want plain markdown you can read, edit and commit to git.
  • Zero network and zero hosted infrastructure is the whole point for you.
  • You don't need multi-device sync or non-coding AI tools.

Pick Second Brain if…

// you want one brain, everywhere

  • You use more than one device and want the same memory on all of them.
  • Your AI life is broader than coding — Claude, ChatGPT, the browser, your phone.
  • You want MCP + OAuth so any client connects cleanly.
  • You'd like the memory to curate itself instead of pruning files by hand.
questions

Common questions

Isn't local-only more private than self-hosted on Cloudflare?

Local files never leave your machine, which is the strongest possible posture — credit where due. Second Brain is the next best thing for people who need more than one device: it's self-hosted on infrastructure you control, with embeddings and the LLM running inside your own Cloudflare account, and nothing handed to a third-party model provider. You trade pure-offline for "available everywhere, still owned by you."

Can I still use Second Brain with Claude Code and Cursor?

Yes. Those are first-class clients over MCP, alongside Claude, ChatGPT and Codex. The difference is the same brain is also available to non-coding tools and from your phone or browser — not scoped to coding agents.

Does Second Brain do keyword search like Agent-Memory's BM25 mode?

Second Brain's recall is semantic-first — it finds memories by meaning using embeddings, then re-ranks by recency, frequency and importance, and opens with a synthesized summary. If a fast local BM25 keyword mode on one machine is exactly what you want, Agent-Memory is purpose-built for that.

Is it harder to set up than a local CLI?

It's a one-click deploy to Cloudflare that provisions the database, vector index and AI for you — then install the CLI with npm i -g second-brain-cf-cli if you want the terminal experience too. No servers to babysit afterward.

get started

One memory. Every tool, every device.

Self-hosted on your own Cloudflare account. Open source, free forever at personal scale.