The brain
Raw conversations are source code, the model is the compiler, and the compiled wiki is your queryable second brain.
Kevin's long-term memory follows Andrej Karpathy's LLM Wiki pattern.
Capture is automatic
Every time you exit a session, or the host compacts mid-session, a hook calls kevin session-capture. It reads the host's transcript and appends it to today's log at knowledge/raw/sessions/YYYY-MM-DD.md.
Secrets are redacted before anything is written: exact matches against every value in .kevin/secrets/.env and settings.local.json, plus prefix heuristics for common key formats (sk-, pplx-, AIza, sk-ant-, gh[pous]_).
Each host's transcript format has a small adapter inside the capture module. Adding a host is a new adapter, not a new hook script.
Capture anything else by hand
A thought, a meeting note, a clipped article, a file, a URL, a correction. Same destination, same pipeline, you just initiate it. In conversation, just ask:
you > capture this for the inbox: https://example.com/some-article
kevin > wrote knowledge/raw/inbox/2026-05-29-1430-some-article.md
you > save as feedback: when refactoring, don't touch adjacent code I didn't ask about
kevin > appended to knowledge/raw/user/feedback.mdThe CLI flags and the two capture kinds are on the Capture page.
Compile is on demand
knowledge-compile picks up every session log whose hash changed since the last compile, every inbox item, and every new feedback entry. The MCP server returns a synthesis prompt; you, in your own session, synthesize; the server confirms the write. Idempotent, hash-tracked, interruptible.
| Output | Lifecycle | What lives there |
|---|---|---|
knowledge/user/ | Permanent, evolves with you | profile, skills, preferences, career, interests |
knowledge/concepts/ | Permanent, cross-cutting | patterns spanning several projects; specs distill here |
knowledge/memory/ | Hot context, loads every session | active threads, recent decisions, learnings from feedback. Daily entries prune after 14 days |
Why this stays cheap
The compile tool returns a prompt. Your session runs the synthesis on your host's plan. The result is written back through another tool call. No LLM-as-a-service inside the plugin, no API billing.
Three stages, loosely coupled
Capture is automatic. Compile is on demand. Review is manual. sync runs compile as its first step, so most people never call compile directly. See Sync.