kgai shared decision memory for dev teams

notes for dev teams · kgai.dev/blog

How AI dev teams share what they learn, without a memory server

Two devs, two Claude Code sessions, one codebase. On Monday, one agent spends an hour working out why the CI cache can't be trusted after a dependency bump. On Wednesday, the other agent hits the same wall and works it out again. Whatever an agent learns dies with the session, on that one machine.

The obvious fix is a memory server. Stand up a vector database, run a service, hand every agent an API key, keep the thing patched and paid for. Now your team's memory has an ops rota, and for a lot of teams that's where the idea quietly dies.

What worked for us was treating shared memory like a log, not a service. kgai, the MIT-licensed tool we build, records engineering decisions into an append-only, immutable decision log as the agents work. The graph an agent queries is a deterministic projection of that log. Replay the same log on any machine and you get the same graph.

Sharing is opt-in and goes through an S3 bucket you own. Point the store at the bucket once and sync runs from there. Every writer appends to their own shard, so parallel writes never cause a textual conflict. There is nothing to merge. When two people genuinely decide the same thing two ways, the log shows a branch. One new decision resolves it, and the branch stays in history next to the resolution.

No daemon, no server. Every machine holds the whole graph locally, so reads work offline and nobody's agent waits on the network. A new teammate syncs once and their agent starts with the team's full decision history, dead ends included.

We measured it rather than promised it. At 1,000,000 decisions across 30 writers' shards, a decision lookup still answers in about 100 ms. That figure is the decision lookup specifically. Recall and free-text search are slower.

A skill and hooks in the Claude Code plugin capture at the write boundary, so decisions get recorded while the agent is making them instead of reconstructed later. A standalone kg CLI reads and writes the same store from your terminal or your scripts. If the itch you actually have is agents re-deciding settled questions, that duplicated-discovery cost is what your teammate's AI solved this yesterday is about. And what happens when the recorded answers drift from your docs is covered in decision drift.

If your agents keep learning the same things twice, try it on one repo. Install is two commands and sync stays off until you turn it on.

Try it on your repo. Two commands, MIT, nothing leaves your machine until you configure a bucket.

$claude plugin marketplace add kgaidev/kgai
$claude plugin install kgai@kgai-marketplace
★ Star on GitHub

See how kgai compares to other tools on the comparison page, or browse the other notes.