Local-first, Markdown-native memory for AI agents: grep it, diff it, back it
up, delete it, and recall it through CLI or MCP.
MemoryWiki gives coding agents and chat agents a durable project memory that
stays on your filesystem. It stores memory as Markdown/JSONL, keeps source
provenance, records conflict/update history, and exposes read-first recall
through CLI and MCP.
Local-first Memory Wiki for AI agents
Sterne
4
Tools
—
Uptime
—
Use it when an agent needs persistent project context, but you still want memory
to stay inspectable, reversible, and under your control.
What's New
Full core and MCP type checks now run in CI with mypy.
memorywiki-export / mw export can export memory as JSON, Markdown, or CSV.
mw aliases now cover daily recall, review, release, and migration helpers.
Public examples include a demo project, MCP config, and sample memory root.
Why
Agents forget project context. Hosted memory can be opaque. Ad-hoc AGENTS.md
files get stale. MemoryWiki is closer to a small local knowledge-management
system for agents:
Local-first: canonical memory lives in your project or global memory root.
Bilingual prompt-injection defense: English and Chinese instruction-shaped
memory is neutralized before recall/read surfaces, while secrets are redacted
on managed writes.
Cognitive layering: episodic narratives, semantic facts with
confidence/strength/source_refs/update_log, and procedural workflows
are tracked separately instead of flattened into one vector index.
Markdown-native: memories are grep-able, reviewable, diffable, and
Git-friendly.
Provenance-aware: source ingestion records SHA256-backed references.
Conflict-friendly: new evidence can append update history instead of
silently overwriting older conclusions.
MCP-ready: agents can recall memory through a read-first MCP server.
Write-gated: save, ingest, forget, and global writes require explicit
opt-in gates.
Try It In 2 Minutes
git clone https://github.com/MemoryWiki/MemoryWiki.git
cd MemoryWiki
python3 -m pip install -e ".[mcp]"
memorywiki-index-maintain --project-root examples/memory-root --scope project --format human
memorywiki-context --project-root examples/memory-root --scope project --mode startup --query "What is MemoryWiki?" --format markdown
memorywiki-recall --project-root examples/memory-root --scope project --query "What is MemoryWiki?" --strategy hybrid --embedding local --graph local --format human
Expected # MemoryWiki Context, followed by focused # Memory Recall output.
CLI-only install:
python3 -m pip install -e .
The base install is local-first and does not require an API key. MCP support
uses the optional mcp extra and is intended for Python 3.10+. The optional
OpenAI backend is installed separately:
python3 -m pip install -e ".[openai]"
More install paths, including GitHub tag installs and clean-room checks, are in
docs/install.md. A fuller first-run guide is in
docs/getting-started/quickstart.md, and common setup failures are covered in
docs/troubleshooting/common-errors.md.
Architecture
flowchart LR
Agent["AI agent or chat client"]
CLI["MemoryWiki CLI"]
MCP["Read-first MCP server"]
Root["Project memory root"]
Global["Optional global memory root"]
Index["Rebuildable retrieval index"]
Gates["Explicit write gates"]
Agent --> CLI
Agent --> MCP
CLI --> Root
MCP --> Root
CLI --> Global
MCP --> Global
Root --> Index
Global --> Index
Gates --> Root
Gates --> Global
These are small smoke-style examples, not a substitute for LongMemEval or a
large retrieval benchmark.
Tests
python3 -m pytest tests -q
Status
MemoryWiki is early public software extracted from a working local system. The
core CLI, storage model, retrieval index, MCP server, release checks, and tests
are present. Start with docs/getting-started/quickstart.md, docs/faq.md,
SECURITY.md, and CHANGELOG.md; deeper docs live under docs/.
Noch keine Tool-Liste. Remote-Server erhalten eine nach dem ersten Health-Check.
FAQ
Fragen
Wie installiere ich MemoryWiki?
Kopieren Sie auf dieser Seite die stdio-Konfiguration für Cursor, Claude Desktop, Claude Code oder VS Code. Sie nutzt die Installation des Herausgebers, keinen PlugMCP-Proxy.
Benötigt MemoryWiki einen API-Schlüssel?
In diesem Eintrag ist keine erforderliche Umgebungsvariable aufgeführt.
Welchen Transport verwendet MemoryWiki?
MemoryWiki läuft lokal über stdio.
Wann wurde MemoryWiki zuletzt geprüft?
Zuletzt geprüft: 2026-10-28. Local-first Memory Wiki for AI agents