Kage
Kage is a verified memory layer for coding agents that captures, stores, and recalls team knowledge grounded in your codebase — stored as plain files in your repo with zero dependencies or cloud accounts required.
Recall verified memory & query code/knowledge graphs (
kage_context): The primary entry point — validates memory health, recalls relevant memory packets, and queries both the code and knowledge graphs. Call at the start of every task.Capture verified learnings (
kage_learn): Store durable, reusable insights (decisions, bug fixes, conventions, gotchas, runbooks) as verified memory packets linked to specific repo files; hallucinated or missing path citations are rejected at write time.Assess file modification risk (
kage_risk): Evaluate risk before editing files by surfacing dependents, impact surface, churn, ownership, co-change partners, and test gaps.Trace dependency paths (
kage_dependency_path): Find how two files are connected in the code graph (direct, reverse, or undirected).Summarize decision memory (
kage_decisions): Get an overview of captured decisions, gotchas, runbooks, and conventions, plus identify high-traffic code paths lacking documented knowledge.Search committed documentation (
kage_docs_search): BM25-ranked search over the repo's own committed docs (README, markdown files) using a local index.Rebuild indexes and graphs (
kage_refresh): Refresh the code graph, memory graph, indexes, metrics, and stale-memory metadata after meaningful file changes.Check memory readiness for merge (
kage_pr_check): Verify memory, code graph, and stale-memory state before a PR merge, surfacing any team memories invalidated by current changes.Supersede outdated memory (
kage_supersede): Replace an old memory packet with a corrected one, preserving bidirectional lineage while withholding the superseded packet from future recall.Codify memory into agent skills (
kage_skills): Convert durable, verified memory intoSKILL.mdfiles that every teammate's agent auto-loads from git.Rate recalled memory (
kage_feedback): Mark recalled packets as helpful, wrong, or stale to tune trust scores and improve future recall quality.
Kage manages your memory and agents
State an intent. Kage's orchestrator briefs a coding agent from your repo's own memory, runs it in an isolated git worktree — a single run or a multi-wave goal — and re-runs the checks itself rather than trusting the agent's report:
┌ VERIFIED 3/3 — checks run by Kage, not the agent · build-a-stale-memory-triage-surface-do-n-260818-ec2c
│ "the stale-memory triage surface is built and wired into the review flow"
│ ✓ tests ran npm test --prefix mcp → exit 0 evidence/tests.log
│ ✓ diff-size inspected at most 800 changed lines evidence/diff-size.log
│ ✓ citations inspected every formally cited path exists (directly, or as a unique suffix) in the worktree evidence/citations.log
│ · touched 4 file(s), 212 line(s)
└────────────────────────────────────────────────────────────────A real receipt from this repo's own run history. Every row is a command Kage ran or a fact
it inspected — never a claim the agent made about itself. kage merge only lands the code once
the claim holds, and ratifies what the agent learned, so the next brief, yours or a teammate's,
starts smarter.
That memory is the decisions behind your codebase, the runbook for a tricky deploy, the root cause of a gnarly bug — captured as your agents work and checked against the actual code, so what gets reused stays true. It's kept as plain Markdown files in your repo, conformant to the Google Open Knowledge Format (OKF) so there's no lock-in, and shared with your whole team through git. No account, no database, no API key.
npx -y @kage-core/kage-graph-mcp installWorks with Claude Code · Codex · Cursor · Windsurf · Gemini CLI · Cline · Goose · Roo Code · Kilo Code · OpenCode · Aider · Claude Desktop · Copilot · OpenClaw · Hermes · any MCP client
🌐 English · 简体中文 · 日本語 · 한국어 · Español · Português (Brasil) · Français · Deutsch · हिन्दी
Install
One command, inside your repo, then restart your agent. That's the whole setup.
npx -y @kage-core/kage-graph-mcp installIt creates .agent_memory/, builds the code graph, writes the AGENTS.md / CLAUDE.md
policy that tells agents to use Kage, auto-detects and wires your agents, and configures
.gitignore + the packet merge driver. Requires Node.js 18+. No account, no API key.
Or just ask your agent to set it up. Paste this into Claude Code, Cursor, or any coding agent:
Set up Kage (verified memory for coding agents, https://github.com/kage-core/Kage) in this repo: run
npx -y @kage-core/kage-graph-mcp install, then tell me to restart you.
# Claude Code / Codex plugin
/plugin marketplace add kage-core/Kage # then: /plugin install kage@kage
# wire a single agent (run `kage setup list` for all supported)
kage setup claude-code --project . --write
# memory store only, no agent wiring
kage init --project .
# confirm the harness is live
kage setup verify-agent --agent claude-code --project .Related MCP server: AI Dimag
Delegate work (the orchestrator)
kage room --project . # talk to Kage; it briefs and hires agents for you
kage dispatch "<intent>" --agent claude # one delegated run, briefed from repo memory
kage runs --project . # what every run is doing right now
kage review --project . # read a finished run's claim and diff
kage merge <run-id> --project . # land the code and ratify what it learnedEvery run works in its own git worktree. The checks that decide the verdict on the receipt above — tests, diff size, citations — are commands Kage runs itself, never the agent's self-report.
The app.
kage app --project <dir>starts (or reuses) the local daemon and opens the same room, runs board, and memory view in a UI. From a checkout,npm start --prefix shellruns it as a native window — a thin Electron shell with no HTML of its own, it just loads the daemon's own page — andnpm run dmg --prefix shellbuilds a macOS.dmg(arm64 only; Windows/Linux packaging isn't built yet).From your phone. The daemon can also bind to your machine's LAN address, gated by a pairing secret required on every request, reads included. Today that means setting
"lan": truein.agent_memory/config.jsonby hand — there's no--lanflag or app toggle yet.Add a project without a terminal.
kage projects add <dir> --agent clauderegisters another repo the same way the app's "+" button does, thenkage app --project <dir>opens it.
kage app --project <dir>
kage projects add <dir> --agent claudeDesktop app
A thin native shell (macOS, arm64 only) over the same daemon the CLI runs — dock presence,
a global hotkey, native notifications. Download the latest .dmg from
GitHub releases (look for a
Kage-<version>.dmg asset).
Unsigned builds show macOS's "unidentified developer" prompt on first launch — right-click the app in Finder and choose Open once. Once installed, it checks for updates on launch and every 4 hours and installs on restart; ad-hoc (unsigned) builds can't self-install and notify you instead, linking back to the releases page.
Prefer the CLI? The one-line install works everywhere the app doesn't need to:
npx -y @kage-core/kage-graph-mcp installWhat is Kage
Kage is an orchestrator for coding agents, built on a memory layer. As your agent works, it captures what it learns
(decisions, bug fixes, conventions, how the code fits together) as
Open Knowledge Format (OKF)
concept files committed in your repo under .agent_memory/. The next session (yours or a
teammate's) starts already knowing it, instead of re-reading or re-asking.
Three things make it different from other memory tools:
It's collaborative. The knowledge one person (or their agent) figures out becomes the whole team's. Memory is shared through git, so a teammate's next session starts with what you just learned, not a blank slate.
It's standard & git-native. Memory is a conformant OKF bundle — plain Markdown in your repo, reviewed in the same PR as the code, readable by any OKF tool — not locked in one machine or a vendor's cloud. Your knowledge stays yours.
It's verified. Every memory cites the code it's about, and Kage checks those citations against your actual files at write time, at recall time, and when a diff changes the code. Memory that no longer matches the code is withheld, so the agent never acts on a stale claim.
Kage called it. Google standardized it.
From day one, Kage kept agent memory as plain files in your repo — no cloud, no database, no lock-in, while everyone else was building memory clouds. In June 2026, Google Cloud shipped the Open Knowledge Format: knowledge as Markdown in git, vendor-neutral, no account — the exact thesis Kage already ran on. So Kage adopted OKF as its standard, and supercharges it with the layer OKF deliberately leaves out:
Verification — OKF stores what you wrote down; Kage checks every concept against your real code and refuses hallucinated citations at write time.
Freshness — OKF has no notion of staleness; Kage catches drift the moment your code changes and withholds memory that's no longer true.
Code-grounding — a deterministic code graph anchors each concept to the exact symbols it describes — the layer OKF leaves to tooling.
The trust metadata rides in OKF-legal x-kage-* fields, so a Kage bundle stays 100%
conformant and opens in any OKF consumer, including Google's own visualizer.
OKF standardizes the store; Kage is the verification and freshness layer Google left out.
How it works
Once installed, it's ambient. You don't run anything by hand:
Recall before acting. At the start of a task (and the moment the agent opens a file), Kage surfaces the relevant verified memory for it. Stale or deleted memory is left out.
Capture as it works. Durable learnings become packets. A memory that cites a file which doesn't exist is rejected on the spot, so hallucinations never enter storage.
Stay honest as the code moves. When a diff changes code that a memory cites, that memory is flagged at commit/PR time (
kage pr check) and withheld from recall until it's re-verified or replaced, so knowledge can't quietly rot.
Watch it happen in the local dashboard (kage viewer): packets, the memory↔code graph,
trust gates, and live events stream in as the agent works. Wrap anything in
<private>…</private> and it's never stored.
Why Kage
Most memory tools (claude-mem, agentmemory, mem0, Zep) store memory per-machine or in a cloud you don't own, and never re-check it against the code. Kage keeps it in your repo and verifies it, so it stays your team's and stays true as the code changes.
Kage | claude-mem | mem0 / Zep | |
Automatic capture + session-start recall | ✓ | ✓ | via SDK |
Hallucinated citations rejected at write time | ✓ | — | — |
Stale memory withheld at recall (cited files deleted/changed, TTL, reported) | ✓ | — | — |
Diff-time stale-catch, warned before the PR when your change breaks a memory | ✓ | — | — |
Memory reviewed in git, same PR as the code (plain files, no DB) | ✓ | SQLite + cloud | hosted API |
Codify memory into team | ✓ ( | — | — |
Cross-machine sync | ✓ your own git remote | their cloud | their cloud |
Account / API key required | none | cloud optional | yes |
Features
Truth Report.
kage scanreads any repo in ~60s and surfaces its highest-risk knowledge gaps: undocumented hot files, untested hot paths, complexity hotspots, unresolved code debt, and bus-factor-1 files, plus duplicate implementations, dead exports, and doc lies when they exist. Every finding cited tofile:line. Zero setup, nothing generated, runs before you install anything.Savings receipts.
kage gainskeeps a per-repo value ledger (tokens + $ the agent didn't have to re-spend), every number traceable to a logged event; the agent relays it after each recall.Team skills.
kage skillsturns durable, verified procedures into.claude/skills/<name>/SKILL.mdfiles agents auto-load, committed and shared, no cloud.Personal memory & sync.
kage learn --personalkeeps cross-machine notes in~/.kage/memory, recalled as a clearly separated lower-trust section and synced over your own git remote.Self-healing session loop. Uncaptured sessions are auto-distilled into pending drafts you review;
kage resumeopens each session with a "previously…" digest;kage repairfixes broken packets and indexes in one command.
Benchmarks
18% faster than grep at equal correctness on real code-navigation tasks (N=3 suite, same agent/model; reproduce with
kage benchmark --project . --compare).LongMemEval-S retrieval: 98.72% R@10 / 99.79% R@20 / 0.909 MRR — ahead of plain BM25 at every depth except R@5, where BM25 edges it (96.60% vs 96.17%; full table in benchmarks/LONGMEMEVAL.md). The retrieval path itself is dependency-free: BM25 + sparse lexical scoring, no embeddings, no network.
Memory Correctness Under Change: 0% stale-served (memory whose code was deleted or changed is withheld), vs 100% for capture-everything stores.
Trust benchmark: 100/100, covering hallucination rejection, stale exclusion, and live grounding (
kage benchmark --trust --project .).
Methodology, commands, and caveats: docs/BENCHMARKS.md.
Daily commands
kage recall "how do I run tests" --project .
kage verify --project . # check citations against current code
kage pr check --project . # stale-catch + graph freshness gate
kage gains --project . # what Kage saved you
kage viewer --project . # local dashboard
kage okf migrate --project . # render memory as a Google OKF bundleFull CLI and MCP reference: docs. Delegating work to coding agents (dispatch → verified claim → merge): docs/DELEGATION.md.
Storage
Everything lives in .agent_memory/: packets/ is durable repo memory (git-tracked OKF Markdown);
graph/, code_graph/, structural/, and indexes/ are rebuildable with kage refresh;
reports/ holds the value ledger and health reports. Capture scans for secrets and PII
before writing.
Standard format — Open Knowledge Format (OKF). Kage's memory is an
OKF bundle:
plain Markdown concept files with YAML frontmatter, readable by any OKF consumer
(including Google's visualizer). Run kage okf migrate to render the store as an OKF
bundle under .agent_memory/okf/. Kage adds the lifecycle OKF leaves out — grounding,
verification, and freshness — carried in OKF-legal x-kage-* fields, and can import
any third-party OKF bundle. The round-trip is lossless. See OKF_STANDARD.md.
Development
cd mcp
npm install
npm test
npm run buildContributing & community
Kage is built in the open and we'd love your help. Four runtime dependencies (the retrieval core uses none), no account, no cloud — it's a friendly codebase to jump into.
CONTRIBUTING.md — dev setup, project layout, conventions.
ROADMAP.md — where Kage is headed, and where to plug in.
Good first issues · Help wanted — scoped places to start.
Discussions — questions, ideas, show-and-tell.
By participating you agree to our Code of Conduct.
License
GPL-3.0-only. See LICENSE. Releases before the GPL switch were MIT.
Available Tools
11 toolskage_contextARead-only
Primary kage entry point. Validates memory health, recalls relevant packets, and queries both the code graph and knowledge graph — all in one call. Call this at the start of every task; it answers caller/usage questions from the code graph too, so you rarely need a separate graph tool.
Inputs: query (required), project_dir (required), limit, targets, +2 more.
kage_decisionsARead-only
Summarize the repo's 'why' memory at a glance: the decisions, gotchas, runbooks, conventions, and code explanations Kage has captured, plus which high-traffic code paths still have no decision memory. Use it to brief yourself on a repo before changing it, or to audit where institutional knowledge is thin or going stale. Read-only: returns grouped entries with titles, types, cited file paths, and call-outs for weak, stale, or undocumented hot paths. Does not modify any memory.
Inputs: project_dir (required).
kage_dependency_pathARead-only
Find how two files are connected in Kage's source-derived code graph. Reports direct dependency direction, reverse impact direction, or undirected graph connection.
Inputs: to (required), from (required), project_dir (required).
kage_docs_searchARead-only
Search this repo's OWN committed documentation (README, docs/**, *.md, common doc dirs — including any framework/API docs checked into the repo). BM25 over heading-anchored chunks from .agent_memory/indexes/docs-index.json. Returns ranked doc hits with doc_path, heading, line, and snippet. This indexes only files on disk in the project, never the internet.
Inputs: query (required), project_dir (required), limit.
kage_feedbackA
Record how useful a recalled repo-local memory packet was, which tunes Kage's trust and future recall. 'helpful' reinforces the packet, 'wrong' flags it as disputed, and 'stale' marks it for re-verification and withholds it from recall until refreshed. Use it right after a recalled packet helped you, misled you, or no longer matched the code. Mutates the packet's quality signals on disk.
Inputs: kind (required), packet_id (required), project_dir (required).
kage_learnA
Capture a durable, reusable learning from the current session as a verified repo-local memory packet (committed under .agent_memory/, shared with the team via git). Use it the moment you discover something a future session should know: a decision and its rationale, a bug's root cause and fix, a convention, or a setup step. Prefer it over diff-based proposals when you already know what was learned. The write is rejected if every cited path is missing from the repo (set allow_missing_paths for a file you are about to create), and secrets/PII are scanned out before writing. Returns the new packet id plus any contradiction warnings against existing memory.
Inputs: learning (required), project_dir (required), tags, type, +9 more.
kage_pr_checkARead-only
Check whether repo memory, code graph, memory graph, and stale-memory state are ready for merge. Leads with a human summary of team memories invalidated by the current change — relay it to the developer. On a repo with many stale packets, validation findings, or reconciliation items, those lists are each capped to the 10 most actionable entries by default (stale packets ranked by urgency), with true totals and truncation notes; pass limit or verbose for more.
Inputs: project_dir (required), limit, verbose.
kage_refreshAIdempotent
Rebuild repo indexes, code graph, memory graph, metrics, and stale-memory metadata. Agents should run this after meaningful file/content changes before PR checks; push-only or same-tree commits do not need another refresh. On non-default git branches metadata-only packet rewrites are skipped (quiet refresh) to avoid merge conflicts; pass force to persist them anyway. On a repo with many stale packets or validation warnings, stale_packets and validation.warnings are capped to the 10 most actionable entries by default (ranked by urgency), with the true total and a truncation note; pass limit or verbose for more.
Inputs: project_dir (required), force, limit, verbose.
kage_riskARead-only
Assess modification risk for files using Kage's code graph plus local git history: dependents, impact surface, churn, ownership, co-change partners, and test gaps. Use before editing hotspot or shared files.
Inputs: project_dir (required), targets, changed_files.
kage_skillsAIdempotent
Codify durable, verified repo memory (runbooks, workflows, actionable decisions) into git-native SKILL.md files under .claude/skills/ that every teammate's agent auto-loads. Only grounded, non-stale packets become skills. Pass dry_run to preview without writing. dir overrides the output directory.
Inputs: project_dir (required), dir, dry_run.
kage_supersedeAIdempotent
Replace one repo-local memory packet with a newer one that corrects or obsoletes it. Marks the old packet superseded, links it to the replacement, and writes bidirectional lineage edges so the history stays traceable. Use this instead of deleting when new knowledge updates an old fact, or to resolve a contradiction surfaced by kage_conflicts. Mutates both packets on disk: the superseded packet is withheld from recall but kept for lineage. Returns ids, paths, and titles for confirmation, not the full packet bodies.
Inputs: packet_id (required), project_dir (required), replacement_packet_id (required), reason.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools map cleanly to distinct capabilities: learn/supersede/feedback handle memory lifecycle, context/decisions/docs_search handle retrieval, refresh/pr_check handle repository state, and risk/dependency_path/skills handle analysis and export. A couple of adjacent pairs (learn vs. skills, refresh vs. pr_check) could be confused at first glance, but the descriptions draw clear read/write and capture/codify boundaries.
All tools share the kage_ prefix and snake_case, and most suffixes are descriptive noun phrases such as context, risk, dependency_path, decisions, docs_search, pr_check, and skills. The pattern is slightly inconsistent because a few suffixes are bare verbs like refresh, supersede, and learn, but the overall convention remains predictable and readable.
Eleven tools is well-scoped for a repo-memory and code-graph assistant; each tool covers a distinct part of the workflow from capture and recall to risk analysis, indexing, PR readiness, and skill export. There is no obvious filler or redundant tool.
The set covers the core memory lifecycle (learn, context, supersede, feedback) plus supporting analysis (risk, dependency path, docs search) and repository operations (refresh, pr_check, skills). Minor gaps exist, such as no explicit packet-list/search tool or skill-management/removal, but agents can work around them.
Maintenance
Related MCP Connectors
Team memory for AI coding agents and code reviews, reviewed by humans and served over MCP.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Shared, scoped, reviewable team memory for AI coding agents.
Give your AI agent persistent, governed memory for every project. At task start it recalls the approved decisions, conventions, risks and architecture (semantic search, ranked by importance); at close it proposes what was learned as typed memories that you review and approve — governance, not a notes dump. Agents propose, humans govern: edits go back to pending and deletion is human-only by design. Connect Claude Code, Cursor, Claude Desktop or any MCP client in two minutes with just your API key — hosted (nothing to install) or locally via `uvx solucortex-mcp`. Built by SoluAI and dogfooded daily: SoluCortex is developed using its own living memory.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP-native, local-first memory for coding agents that turns real sessions into reusable decisions, gotchas, and domain knowledge.17309 PyPI7MIT
- AlicenseAqualityBmaintenanceMCP server that gives coding agents persistent, verified memory of codebase decisions, conventions, and skills, with evidence-based claims that are re-checked via git hooks and human-gated review. Enables memory search, propose/approve, chat harvesting, and critique across MCP-compatible tools.21102 npm1MIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to share a persistent, git-backed team memory, automatically committing and syncing decisions, solutions, gotchas, statuses, and handoffs across projects and MCP clients.301MIT
- AlicenseNot gradedqualityCmaintenanceProvides AI coding agents with deterministic, attestable org memory via an MCP server, enabling automatic recall of relevant facts on every prompt, loss-proof capture of learnings, and curated promotion of verified facts to a tenant-isolated memory store.Apache 2.0