DEV Community

Cover image for I built a shared memory layer because my AI coding agents kept lying to each other
THARAGESH .A
THARAGESH .A

Posted on

I built a shared memory layer because my AI coding agents kept lying to each other

A few months ago I noticed something annoying. I had Claude Code working
on the backend of a project and Cursor working on the frontend, same
repo. At some point the backend agent decided to rename a field —
subscription_plan became billing_tier — and the frontend agent never
found out. It just kept using the old name until something broke and I
spent twenty minutes figuring out why.

That's the whole origin story, honestly. Two agents, same codebase, zero
shared memory between them. Multiply that by a few weeks of work and you
get a project where nobody, human or agent, is entirely sure which
decisions are still true.

So I built something to fix it. It's called AgentHelm, and the short
version is: it's a shared, versioned knowledge base that multiple coding
agents can read from and write to, with an actual check for conflicts
before anything gets merged.

How it's wired up

It runs as an MCP server, so getting it into Claude Code or Cursor is
just adding a config entry — no plugin, no extra install step beyond
npx agenthelm-mcp.

When an agent wants to record a decision (a schema change, an API
contract, whatever), it goes through a small pipeline before it's
accepted:

  • the proposal gets validated for basic structure
  • evidence gets scored — did tests pass, is there a real commit behind this, was it reviewed
  • it's compared against everything already in the brain, using plain string-similarity checks, not an LLM call, so it's fast and consistent
  • if something conflicts, it stops there and gets flagged instead of guessing which one's right
  • otherwise it merges in, and the old version is marked superseded, never deleted

That last part turned out to matter more than I expected. Because nothing
gets thrown away, you end up with an actual history you can query:

\`bash
agenthelm blame my-project auth strategy

COMMIT v3.2.1 [auth-agent] 2026-07-16 14:02:11
DECISION: Migrate JWT secrets to Vault
REASON: Avoid credentials exposure. Stripping secrets from runtime config.
`\

So when something looks strange six weeks later, you're not guessing. You
can ask why it's there and get a real answer.

What it doesn't do yet

I'd rather say this plainly than let someone find out the hard way. When
two agents genuinely disagree — one says billing_tier, one says
subscription_plan — the system doesn't decide who's right. It flags it
and waits for a human. I went back and forth on this, but auto-resolving
ambiguous conflicts felt worse than just admitting it needs a person to
look.

It also adds real overhead. There's a network call before an agent starts
work, and the validation pipeline runs on every proposal. If you're
running one agent by itself for a quick task, you probably won't notice
much benefit, just the extra latency. Where it earns its keep is longer,
messier, multi-agent work, where the alternative is agents quietly
undoing each other's decisions.

And staleness is still an open problem. Right now the system checks new
information against what's already known, but nothing goes back and asks
whether an old fact is still true if nothing new happens to touch it.
That's next on my list.

Where this sits next to other tools

Worth being upfront, since there's real overlap in this space now. Ruflo
(formerly Claude Flow) is a much larger project focused on coordinating
what agents actually do — swarms, consensus, orchestration. This isn't
that. AgentHelm doesn't tell your agents what to do, it just keeps track
of what they've already decided and whether that's still consistent.

Ditto does something else again — memory that follows one person across
devices and agents. This is closer to the opposite: it's meant for a
project a few people (and their agents) are working on together, not one
person's personal context.

And most of the vector-store memory tools out there are built for
recall — search and retrieve something similar to what you asked for.
This adds an actual check for contradictions on top of that, which most
of them don't do.

If you want to try it

\bash
npx agenthelm-mcp
\
\

Free up to 3 agents. Someone on Reddit already found a real setup issue —
Cursor's MCP config can break on path or Node version mismatches — so if
you hit that, I'd genuinely like to know, and I'm writing up proper
troubleshooting docs for it.

[repo : https://github.com/jayasukuv11-beep/agenthelm] · [site : agenthelm.online]

If you're running multiple agents on shared code and have solved this a
different way, I'd like to hear it.****

Top comments (1)

Collapse
 
jugeni profile image
Mike Czerwinski

Lying is the wrong word for the failure, and the wrong word hides which half you actually solved. The agents are not lying, they are working from stale truth: a decision that was correct when made and quietly stopped being correct, with no agent aware it expired. That matters because your conflict check catches a different thing. String similarity catches disagreement, two live claims that contradict, and disagreement is self-announcing, the collision is the signal. Staleness has no collision. One fact silently stops being true and nothing contradicts it, because the other agents are equally unaware, so there is nothing for the similarity check to fire on.

You half-name this when you say the system does not verify whether old decisions still hold absent a trigger. That is the whole game. Disagreement is the loud failure and you built a real oracle for it. Staleness is the silent one, and there is no oracle for it that does not require re-deriving the fact from its source, which is the work the shared-memory layer exists to avoid. So the honest framing is that the layer converts agents disagree, which was catchable, into agents agree on something no longer true, which is not, unless every decision carries an expiry or a re-validation trigger bound to what it depends on. Without that, the conflict check does not stop the lying, it guarantees the agents stay consistently stale together.