Miku
Miku is a persistent, project-local knowledge graph CLI for AI agents. Agents use it to keep memory, track session state, and share context across conversations — stored in a local libSQL/SQLite file, no server required.
Features
- Knowledge graph — entities, append-only (capped) observations, and directed relations.
- Truths — durable
key→valuefacts per entity for current state (status,version). - Fast search —
search-nodesover FTS5 (porter stemming + BM25) with a substring fallback. - Lazy reads —
read-graph/search-nodesreturn truths + counts;open-nodesreturns the full body. Cheap to load, cheap on tokens. - Skills — install reusable agent instructions from a git repo or local path.
- MCP server —
miku mcpserves the graph over stdio to MCP-aware clients. - Document tier (optional,
--features documents) —ingest+ semanticqueryover Markdown.
Installation
From source (Rust 1.85+, Edition 2024):
Build locally with make build (graph/MCP CLI) or make build-documents (adds ingest/query/compact).
Quick Start
# Store and recall context (names are hierarchical, e.g. ame:mobile-support:task-1)
Common Commands
miku read-graph/search-nodes <q>/open-nodes <name>...— read the graph.miku add-truth <name> <key> <value>/delete-truth <name> <key>— manage truths.miku skills install <src> --all/update/skills/skills show <name>— manage skills (--allandupdatesync, pruning skills dropped upstream;--selectis additive).miku mcp— run as an MCP stdio server.miku stats/export -o graph.json/import graph.json/reset— inspect & manage.
Development
- Task runner:
make(Nix-wrapped). Runmake checkfor fmt + lint + tests. - See
docs/usage.mdfor the full CLI reference anddocs/architecture.mdfor design.