memtwig vs Mem0
Choose memtwig when you want human-readable Markdown in Git, automatic multi-org isolation by Git remote, and proposal-gated agent writes in one 12 MB Go binary. Choose Mem0 when you need an embedded SDK API for per-user chat memory inside a SaaS product.
| Dimension | memtwig (v1.0.0) | Mem0 |
|---|---|---|
| Primary storage | Plain Markdown files in Git repos | Vector DB + optional Graph DB |
| Runtime dependencies | Single 12 MB static Go binary (SQLite FTS5 embedded) | Python/Node SDK + vector store + LLM API key |
| Offline operation | Full BM25 search & curation offline | Requires LLM extraction & embedding APIs |
| Multi-org isolation | Automatic cwd & git remote routing in SQL | Manual user_id / org_id scoping in app code |
| Write governance | owner-lock + deterministic proposal queue (.curator/proposals.json) | Autonomous background fact extraction & overwrites |
| Secret protection | Built-in secret scanner blocks sync | Not built in |
| Coding harness support | Native hooks (Claude Code, Codex, Antigravity) + stdio/HTTP MCP | Primarily app-level SDK / API |
| Best suited for | Developers, freelancers, and teams sharing curated knowledge across harnesses | Consumer or SaaS apps storing per-user chat personalization |
When memtwig wins
- You switch between multiple client repos and need hard isolation across vaults.
- You use Claude Code, Codex, and Cursor together and want one shared memory layer.
- You refuse autonomous memory overwrites and want reviewable proposals with secret scanning.
When Mem0 wins
- You are building a multi-user consumer or B2B chat app that needs a drop-in cloud API.
- You want automatic background fact extraction from conversational transcripts without Markdown files.
- Your team prefers managed cloud infrastructure over Git-backed knowledge bases.
FAQ
Is memtwig a drop-in replacement for Mem0?
They solve different layers. Mem0 is built as a runtime API for SaaS applications that extract per-user preferences from chat logs. memtwig is a git-native, curated Markdown memory layer for developers, freelancers, and engineering teams using coding agents across multiple repositories and organizations.
Can memtwig use vector embeddings like Mem0?
Yes. memtwig fuses local SQLite FTS5 BM25 with optional Ollama, OpenAI, or Cloudflare embeddings via Reciprocal Rank Fusion (k=60), and degrades automatically to BM25 when offline.
Why store memory in Git instead of a vector database?
Git provides human readability, diffs, blame, rollbacks, and zero vendor lock-in. Humans and agents share the exact same Markdown source of truth while SQLite FTS5 acts purely as a rebuildable local index.