Inspiration
Every time I started a new agent session, it began from zero. No memory of why a decision was made last week. No record of which approaches already failed. No awareness of what a teammate's agent had already figured out.
I kept watching AI tools forget everything — forcing engineers to repeat context again and again. But the deeper problem wasn't forgetting. It was that when multiple agents work the same project, they develop contradictory beliefs about it. One agent thinks the system uses one database. Another thinks it uses a different one. Neither knows the other exists. The system silently accumulates contradictions — and eventually, those contradictions become bugs.
Nobody had built the infrastructure to solve this. So I did.
What it does
Engram is an MCP server that gives multi-agent AI teams a shared, persistent knowledge base. Instead of every agent session starting from zero, agents build on what previous agents already learned.
Four tools form the entire surface area:
- engram_query — Before touching any code, the agent pulls what the team's agents collectively know about that scope. Structured facts, ranked by relevance and recency.
- engram_commit — When an agent discovers something real — a hidden side effect, a failed approach, an undocumented constraint — it commits that fact. Append-only, timestamped, traceable.
- engram_conflicts — Surfaces pairs of facts that semantically contradict each other. Not an error that blocks you — a structured artifact you can review and resolve.
- engram_resolve — Settle a disagreement. Pick a winner, merge both sides, or dismiss a false positive. The resolution propagates to every future agent session.
Conflicts surface naturally in the agent chat — before a single line of wrong code gets written. Engram is a memory linter for your agent team.
How we built it
Engram is built as an MCP server in Python, making it compatible with any MCP-compatible agent — Claude Code, Cursor, Windsurf, Kiro, and VS Code with Copilot.
The storage layer is SQLite with a bitemporal schema. Every fact carries a temporal validity window — supersession, correction, and versioning are all expressed through a single primitive. The full history is retained, so you can reconstruct what the team's agents collectively believed at any point in time.
Conflict detection runs asynchronously in a tiered pipeline so commits return instantly:
- Tier 0: hash deduplication and entity matching
- Tier 1: NLI cross-encoder scoring for semantic contradiction
- Tier 2: numeric and temporal rule matching
- Tier 3: LLM escalation for genuinely ambiguous cases
The write lock is held for roughly 1ms. NLI inference runs in a background worker. This keeps the system responsive under concurrent agent load.
The architecture is grounded in four peer-reviewed papers on multi-agent memory systems, including a March 2026 arXiv paper that explicitly identifies memory consistency as the most pressing open challenge in multi-agent AI — and names the two missing primitives that Engram implements.
Challenges we ran into
Conflict detection is harder than it looks. Engineering facts aren't semantically opposite the way simple antonyms are. "Uses JWT authentication" and "uses session-based authentication" are contradictory in context but not in raw semantic space. Tuning the detection pipeline to catch real contradictions without generating noise required careful design of the tiered approach.
Keeping the write path fast. SQLite under concurrent agent load is viable — but only if detection is fully decoupled from the write path. Getting that architecture right so commits are instant while detection runs in the background was the core engineering challenge.
Communicating a technical problem to a non-technical audience. The problem Engram solves is real and important, but "multi-agent belief consistency" doesn't land immediately. Finding the right framing — "catches disagreements between agents in the chat, before they become bugs in the code" — took more iteration than the code did.
Accomplishments that we're proud of
The architecture is genuinely novel. Bitemporal fact storage, tiered asynchronous conflict detection, and an append-only knowledge base exposed as MCP tooling — this isn't a wrapper around an existing memory system. It's infrastructure designed from first principles for a problem the research community has only recently named.
The README also explicitly calls out what Engram is not: "There are 400+ MCP servers that give an individual agent persistent memory. Engram is not that." That clarity — knowing the exact boundary of what you're building — is something I'm proud of.
What we learned
The difference between a convenience problem and a correctness problem. Tools that help a single agent remember your preferences solve a convenience problem. Engram solves a correctness problem — agents acting on contradictory beliefs produce compounding damage that gets harder to untangle the longer it runs. That distinction changed how I thought about the project's value and shaped every architectural decision.
I also learned that the human experience matters as much as the agent experience. The right place to surface a conflict isn't a dashboard or an email — it's the chat, in context, before the engineer touches the affected code. That insight made the whole system feel coherent.
What's next for Engram
The immediate next step is the hosted backend — moving from local SQLite to a cloud-deployed shared memory space that teams can connect to with an Engram ID and invite key. No database setup. No self-hosting. Just install, generate a workspace key, share it with your team, and every agent session immediately builds on what every other agent has learned.
After that: a memory graph dashboard where teams can search their living knowledge base, see how beliefs evolved over time, and review conflicts visually — nodes for facts, red edges for contradictions, resolved disagreements in grey.
The goal is simple. Make multi-agent development feel less like coordinating amnesiacs — and more like a compounding system that gets smarter every session.
Log in or sign up for Devpost to join the conversation.