← Blog
Multi-agentJun 5, 2026·7 min read

Conflict-free shared memory: implementing CRDTs for multi-agent sets

Shared memory is becoming table-stakes for multi-agent systems. But the moment two agents write the same set concurrently, a naive manifest does last-write-wins: one agent’s edits silently clobber the other’s. The fix is a CRDT — a structure where concurrent edits merge deterministically, with no central coordinator.

An op-log of signed, causal operations

Instead of storing a manifest snapshot, a shared set is an append-only log of operations. Each op is an add, remove, or update of a neuron, stamped with a Lamport clock (for causal ordering without a server) and signed with the actor’s capability.

type Op = {
  type: "add" | "remove" | "update";
  neuronId: string; tag: string; neuron?: Neuron;
  lamport: number; actor: string; sig: string;
};

OR-Set semantics: add-wins, observed-remove

The merge follows Observed-Remove Set rules. Each add gets a unique tag; a remove tombstones only the tags it has actually observed. So a concurrent add and remove resolve deterministically, and two agents adding different neurons simply both win. The algebra guarantees convergence regardless of order or network delay — there are no “conflicts” in a CRDT, only concurrent updates with a defined merge.

Capabilities: unauthorized edits are ignored, by math

Access control is not a server check that can be bypassed — it is part of the merge. Every op is signed; on merge, an op from an actor without a write capability fails signature verification and is dropped. We tested it: two authorized agents writing concurrently converge to an identical state with the same Merkle root, while a third actor with no capability has its injected op deterministically rejected.

// Alice and Bob both write — then exchange logs
alice.receive(bob.log());  bob.receive(alice.log());
alice.state() === bob.state();   // converged, no clobber
alice.root()  === bob.root();    // same Merkle root → verifiable
// Mallory (no capability) → her op is dropped on merge

Verifiable, shared, owned

Because the merged state is hashed into the same Merkle root we use for integrity, a shared set is at once concurrently-writable, access-controlled, and tamper-evident — three properties in one primitive, grounded in the 2025–26 frontier work on CRDTs for agent memory. The op-log is content-addressable, so Walrus is the natural store: agents pull, merge, and converge, with no coordinator in the middle.