MemSwarm: A Distributed Memory Architecture for Persistent Context Sharing Across Multi-Agent Systems
Abstract
Agent memory systems are built for one agent's stream. When a team of large language model (LLM) agents shares memory across hosts, nothing specifies what a reader on another host sees, and a deployed agent store used centrally silently loses one side of every concurrent contradictory write. We treat shared agent memory as a replication problem and adopt the classical contract of causal consistency plus session guarantees (read-your-writes, monotonic reads, writes-follow-reads), under which a handoff is sound once the delegation carries the delegator's causal frontier and the delegate waits for it. MemSwarm implements the contract with no coordination on writes: each agent host keeps a local replica of an event-sourced log, hybrid logical clocks version the records, conflict-free replicated data types merge them, and a concurrent contradiction survives as an explicit multi-value for upstream policy to resolve. Multi-process experiments on one machine over loopback show zero lost writes in 23,200 visibility samples, conflicts surfaced on every replica where last-write-wins destroys them without a signal, and monotonic-read violations in 26% of degraded roaming-reader trials that frontier-enforced reads remove by blocking 0.4% of reads. On a controlled handoff task, LLM readers shown both values and told to report conflicts flag them in 91% of trials; without that instruction haiku picked one side in 20/20 trials, re-implementing last-write-wins in the prompt. A central node with the same records loses the conflict as last-write-wins does, since detection uses what the writer's store had applied, which only a per-host replica tracks for its agent. Under a single failure, replicas serve a cut-off agent 600/600 operations where a central store serves 0/600, at the price of staleness until heal. We release a Model Context Protocol server, the benchmark suite, and raw logs.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.