Kage — Memória Verificada para Agentes de Código
kage-core/Kage
Memória verificada para agentes que nunca fica desatualizada ou se perde
Ver no GitHubMCP server que captura e mantém memória persistente de decisões, runbooks e correções de bugs em arquivos plain-text no repositório, verificados contra o código real. Elimina reexplicações de codebase e conhecimento obsoleto entre sessões de agentes. Zero contas, zero banco de dados, compartilhado via git.
Instalação
npx convez-ai kage-core/Kage1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Evitar que agentes de IA re-explorem e reaprendam a mesma codebase a cada sessão
- Centralizar decisões técnicas, runbooks e root causes de bugs documentados e linked ao código
- Compartilhar conhecimento entre membros do time via git, sem APIs ou contas externas
Veredito

Kage resolve um problema real: agentes de código não herdam contexto entre sessões. A implementação é sólida (verificação contra código real, zero deps, 96% R@5 recall), suporta múltiplos agentes e funciona offline. Ideal para times que usam agentes de IA regularmente e querem evitar redundância e staleness.
README
A tradução para o português deste README ainda está na fila.
Kage
Team memory for coding agents that never gets lost
kage viewer: your team's decisions, runbooks, and bug fixes (purple), kept in the repo and linked to the code they are about (blue).
The decisions behind your codebase, the runbook for a tricky deploy, the root cause of a gnarly bug: this knowledge lives in people's heads and scrolls past in chat, then gets lost. Kage captures it as your coding agents work, keeps it as plain files in your repo, and shares it with your whole team through git. The next session, yours or a teammate's, starts already knowing it. Every memory is also checked against the actual code, so what gets shared stays true. No account, no database, no API key.
npx -y @kage-core/kage-graph-mcp install
Works with Claude Code · Codex · Cursor · Windsurf · Gemini CLI · Cline · Goose · Roo Code · Kilo Code · OpenCode · Aider · Claude Desktop · 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 install
It 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 .
What is Kage
Kage is a memory layer for coding agents. As your agent works, it captures what it learns
(decisions, bug fixes, conventions, how the code fits together) as small JSON packets
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 git-native. Memory is plain files in your repo, reviewed in the same PR as the code, 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.
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 SKILL.md files agents auto-load | ✓ (kage skills) | — | — |
| Cross-machine sync | ✓ your own git remote | their cloud | their cloud |
| Account / API key required | none | cloud optional | yes |
Full, fair breakdown (including where claude-mem is genuinely strong): docs/kage-vs-claude-mem.md.
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: 96.17% R@5 / 98.72% R@10, zero dependencies.
- 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
Full CLI and MCP reference: docs.
Storage
Everything lives in .agent_memory/: packets/ is durable repo memory (git-tracked JSON);
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.
Development
cd mcp
npm install
npm test
npm run build
Contributing & community
Kage is built in the open and we'd love your help. Zero runtime dependencies, 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.