Back to directory

agent-coherence

A library that stops one AI agent from silently overwriting another's concurrent edits to shared state such as a plan file or memory store, using a MESI-style coherence protocol and optimistic-concurrency commits verified in TLA+, across LangGraph, CrewAI and AutoGen.

agent-coherence

agent-coherence addresses a specific failure mode in multi-agent systems: two agents share an artifact such as a plan.md file, a memory.json file or a key-value store entry; one agent reads it and works from that version while a peer commits a newer version, and the first agent's write silently overwrites the peer's work with no error raised. Because an agent system keeps two records of what happened - the actual committed state, and the model's own narration that a task is complete - this kind of lost update looks like a clean run and gets debugged as a model problem instead of a concurrency bug.

The library applies MESI-style ownership and invalidation to shared agent state, so a stale write is refused or returned as a retryable conflict rather than silently applied, along with a read-generation fence for writers recovering from a crash. The same protocol and library work across LangGraph, CrewAI, AutoGen, the OpenAI Agents SDK, plain files shared across processes, any MCP client through a bundled stale-write-guard-fs server, or a custom orchestrator, and behave the same regardless of which model provider the agents use.

Its safety invariants are machine-checked in TLA+.

More in Agent frameworks

See all 902
  • Recurse

    recurse.run

    A serverless harness that lets a coding agent design, test, and deploy its own specialist sub-agents as tools, MCP servers, or bots, defined by a schema-validated manifest.

  • ProofForge

    shulgin.is-a.dev

    An AI-agent pipeline that decomposes a mathematics problem, proves each piece, and formalizes the result in Lean 4 and Mathlib until the Lean kernel accepts it, with six of its proofs already merged into Google DeepMind's formal-conjectures repository.

  • local-coder

    github.com

    Builds a local coding-agent team on top of Ollama and OpenCode by detecting the machine's hardware, recommending models for seven specialist roles, and testing whether each assigned model can actually use tools, edit a repository and pass verification.