Part of the Evidence-first Agents suite — tooling that makes AI agents accountable instead of just capable: answer-contract (output discipline) · skill-spec (spec discipline) · memory-wiki (memory discipline) · skill-os (the assembly line). Same author, same zero-dependency philosophy.
The file-layer wiki for your agent's markdown memory. Your agent remembers in scattered .md files. Give those files an index, a search, and a health check — without a database, a server, or a single dependency.
Agent memory tools keep racing toward vector stores and hosted services. But most agents (and most people) keep memory where it already works: plain markdown files. memory-wiki is the missing file layer — it treats your memory folder like code: indexed, searchable, and linted.
Inspired by the persistent-wiki pattern (see nashsu/llm_wiki); this is an independent, dependency-free implementation. Pairs with skill-spec — specs for your agent's skills, a wiki for its memory.
| Command | Effect |
|---|---|
ingest |
Absorb markdown files as entries (auto-dated if undated, slugified, never overwrites without --force) |
index |
Rebuild index.md — one table: title, date, first line, linked |
query |
Keyword search across entries, ranked by hit count, with context lines |
lint |
Health check: orphans not in the index, missing dates, duplicate titles, overlong files, broken relative links |
log |
Append-only operation log (log.md) — what entered the wiki and when |
Single file. Zero dependencies. No server, no database, no network calls — your memory never leaves your disk.
git clone https://github.com/chenhz01/memory-wiki.git
python memory-wiki/tools/memory_wiki.py ingest my-notes.md --wiki ./wiki
python memory-wiki/tools/memory_wiki.py query "pricing" --wiki ./wiki
python memory-wiki/tools/memory_wiki.py lint --wiki ./wikilint exits 1 on FAIL-level rot (orphans, duplicate titles) — wire it into CI or a periodic check.
Memory rots quietly: an entry gets renamed and its link dies; two logs share a title and search becomes ambiguous; a daily log grows past 400 lines and stops being scannable. None of that crashes anything — which is exactly why nobody notices. lint makes the rot a named, visible state.
This is keyword ranking, not semantic search — it finds the words you wrote, not the ideas you meant. It is a file-layer tool: if you need embeddings, add them on top; this layer stays useful underneath.
Produced through human-AI collaboration: the tool was drafted by an AI coding agent and reviewed, edited, and approved by a human maintainer. Shipped only after its own acceptance run (ingest → index → query → lint, including a deliberately rotted fixture) behaved as specified.
Everyone generates wikis; nobody keeps them honest. A stale memory is worse than no memory — the agent fails confidently. memory-wiki closes the loop:
python tools/memory_wiki.py fresh --wiki wiki # classify: fresh / stale / rotten / undated (exit 1 on rotten)
python tools/memory_wiki.py refresh stale.md rotten.md --wiki wiki # mark re-verified today
python tools/memory_wiki.py fresh --wiki wiki # exit 0 when nothing is rottenrefresh stamps last-verified: into the entry; the effective date of an entry
is its last verification, not its birth. The agent (or you) re-checks rotten
entries, refreshes them, and fresh goes green — synchronization as a loop,
not a one-time build.
MIT — use it, fork it, wire it into your agent's routine. Attribution appreciated, not required.