🤖 AI Summary
This work addresses the inefficiency of traditional concurrency control mechanisms—such as locking or optimistic concurrency—in multi-agent systems under high-contention, shared-state scenarios, where long transactions, unpredictable read sets, and immediate writes degrade performance. The authors propose MTPO, a novel protocol that shifts concurrency control from blocking to notification-driven execution, leveraging a predetermined serialization order, speculative writes, and LLM-based agent self-reflection for error correction. MTPO dynamically constructs a revocable tool library (ToolSmith) to enable precise dependency-aware rollback. Experimental results demonstrate that, across ten highly competitive tasks, CoAgent achieves a 1.4× speedup with over 95% serializability correctness while maintaining token costs nearly equivalent to serial execution. In bash environments, task success rates improve from 45/71 to 63/71, with execution time and cost reduced to 0.80× and 0.86× of baseline levels, respectively.
📝 Abstract
Multi-agent LLM systems -- coding agents, devops agents, document agents -- now routinely run several agents in parallel against the same git tree, Kubernetes cluster, or document. As soon as two of them mutate shared state, they enter the regime classical concurrency control has studied for decades, but classical mechanisms fit LLM agents poorly. A single agent transaction spans minutes of inference, read sets are broad and opaque rather than statically inferable, and the live state agents act on admits neither fork nor buffer, so writes take effect the moment they execute. Locks block long inference intervals; OCC abort-and-retry discards minutes of work on every conflict.
This paper builds concurrency control on a capability classical transactions lack: the LLM inside each agent can judge whether a conflicting write invalidates its plan, and can repair exactly the operations that depended on it. Control therefore turns advisory: the runtime informs, the agent repairs. Our protocol, MTPO (Monotonic Trajectory Pre-Order), fixes a serialization order at launch, serves each read the order-filtered value, and applies writes speculatively in place; a one-way notification asks an affected reader to re-judge and patch its plan, while the framework mechanically undoes and reorders misplaced writes through the saga-style inverse each tool registers in advance. At quiescence the run is serializable in the pre-decided order. We realize MTPO as CoAgent, toolcall middleware whose privileged ToolSmith grows footprint-declared, undoable tools online. On ten contended workloads, CoAgent stays within 5\% of serial correctness at a $1.4\times$ speedup and near-serial token cost, where 2PL and OCC surrender nearly all concurrency gains; on a bash-only target system, it grows a 25-tool library online and lifts the task pass rate from 45/71 to 63/71 at $0.80\times$ the time and $0.86\times$ the cost.