DEV Community

Kage
Kage

Posted on

Your agent's memory can't tell you when it's lying

Your coding agent has "memory" now β€” but can it tell when that memory is wrong? 🧠

Kage is a memory layer for coding agents β€” Claude Code, Codex, Cursor, Windsurf, anything that speaks MCP. Your agent recalls what your team already figured out about the repo before it edits, and captures new learnings as it works. Less re-explaining your codebase, fewer repeated mistakes.

The catch with most agent memory: it'll cheerfully hand your agent a "fact" about a file that got deleted last week β€” or one that never existed. Acting on that is worse than no memory at all. Kage is built so it can't.

See it in 30 seconds (no setup):

Kage demo: a hallucinated citation rejected on write, a stale memory withheld from recall, only grounded memory returned

npx -y @kage-core/kage-graph-mcp demo
Enter fullscreen mode Exit fullscreen mode

How you actually use it

Install once, point it at your agent, and it's mostly automatic from there:

npm i -g @kage-core/kage-graph-mcp
kage init --project .
kage setup claude-code --project . --write   # or: codex, cursor, windsurf…
Enter fullscreen mode Exit fullscreen mode

Then, every task:

  • πŸ”Ž At task start, your agent recalls the grounded, still-true memory for the code it's about to touch.
  • ✍️ As it learns a bug cause, a gotcha, a decision β€” it captures a durable note (validated on the way in).
  • πŸ” You review memory in the same PR as the code; kage refresh re-grounds it on merge.

No vector DB, no API key, no separate service. The memory is just JSON in your repo.

What makes the memory trustworthy πŸ›‘οΈ

Every learning becomes a packet, and each one has to earn its keep:

capture β†’ validate citations β†’ ground to code β†’ store as git JSON β†’ recall

  • 🚫 Validated on write β€” a packet citing files that don't exist is rejected. Hallucinations never get in.
  • πŸ”— Grounded to your code β€” each packet is fingerprinted to the real files it's about.
  • ⊘ Withheld on recall β€” if the cited code was deleted or refactored, the memory is hidden from the agent and flagged for you.
  • πŸ“ Governed like code β€” plain JSON, reviewed in the PR, versioned with your repo.

Trust shouldn't be a vibe, so you can actually score your repo's memory with kage benchmark --trust (hallucinated-citation rejection, stale-memory exclusion, live grounding) β€” but that's the proof, not the product.

See what your agents remember πŸ‘€

Kage ships a viewer β€” a live dashboard of your repo's memory: a Memory Trust score, every packet wired to the code it's grounded in, and a feed of what agents actually recalled.

Kage viewer overview: Memory Trust score, live recall stats, and memory that needs review

Kage memory map: an interactive graph linking memory packets to the code files they're grounded in

Play with the live one (nothing to install): https://kage-core.com/viewer

Try it πŸš€

# 30-second demo
npx -y @kage-core/kage-graph-mcp demo

# then wire it into your repo + agent
npm i -g @kage-core/kage-graph-mcp
kage init --project .
kage setup claude-code --project . --write
Enter fullscreen mode Exit fullscreen mode

Open source (GPL-3.0). If trustworthy agent memory is something you've wanted, a ⭐ on GitHub helps a lot β€” and I'd love your feedback.

Memory that remembers is table stakes. Memory you can trust is the part that's actually missing.

Top comments (0)