Search arXiv⌕ Search

arXiv · 2612.03504

Code as Orchestration: Self-Evolving Multi-Agent Collaboration through Executable Scripts

Abstract

Solving complex tasks with multiple agents requires orchestration that explicitly specifies how agents interact and can be revised in response to execution feedback. Predefined workflows organize agent collaboration through explicit but fixed coordination rules, while runtime delegation allows adaptation but makes the overall control flow harder to inspect and validate in advance. Therefore, we introduce COS (Code as Orchestration System), which expresses the coordination of each task as a script that specifies agent invocation, control flow, and information exchange and is executed directly by a runtime, making the orchestration interpretable and easier to revise. When the accumulated evidence does not support the candidate answer, COS diagnoses the failure from execution traces and regenerates the script, while a fact store carries reviewed findings across rounds. Each regeneration is thus explicit in the code and traceable to the diagnosed failure, with changes limited to the orchestration strategy. Evaluated on four benchmarks spanning deep research and scientific reasoning against ReAct, Frontier Agent, and DeepSeek Harness using the same base model, COS outperforms all three baselines on BrowseComp and FrontierScience-Research, reaching 89.65% and 53.33% and exceeding the strongest baselines by 2.37 and 21.67 percentage points, respectively.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Xuanwei Hu, Ziyin Qiu, Hanjun Wang, Rui Wang, Yiran Zhao, Jing Kong, Yanchen Deng, Bo An. 2026-12-02. Code as Orchestration: Self-Evolving Multi-Agent Collaboration through Executable Scripts. https://searcharxiv.org/abs/2612.03504

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

Tapes Together Strong: The Co-evolution of Computation and Cooperation

How does cooperation evolve in complex agentic systems? Prior work in evolutionary game theory studies why individuals are incentivized to cooperate by isolating social interactions from the physical costs of behavior, while artificial life models traditionally study emergent self-replication without formalizing the dilemma between acquiring resources and preserving the shared energy needed to reproduce. In contrast, we introduce Autopoietic Game Theory, a computational model where social interactions, replication mechanisms, and their associated computational costs are endogenous and simultaneously co-evolving. We study these dynamics using a computational substrate of randomly initialized programs in Z80 machine code, showing empirically, and motivating with a simplified theoretical model, that embedding a social dilemma directly into the physics of computation can favor the emergence of self-replicating, cooperative strategies. When resources are scarce, our analysis shows that defection can become self-limiting even in well-mixed populations: parasitic stealing destroys shared energy, slows execution, and can prevent reliable replication. Empirically, evolved programs suppress stealing across several Z80 environments, while spatial assortment further supports structural complexity and task performance. We further show that the framework can incorporate exogenous pressures, such as math tasks structured as sequential social dilemmas, when rewards are tied to computation budgets. These results suggest that coupling an agent's capacity for computation to its available energy transforms cooperation into a dominant scaffolding for building sustainable, self-organizing systems.

cs.MA↗

Prospective Interpretation Risk: Principled Communication Control Between LLMs

Large language model (LLM) systems increasingly use models that exchange messages. Existing uncertainty and multi-agent methods rarely estimate how a given receiver will interpret a message before it is sent. Even capable receivers can infer different tasks from the same message. We model this as a sender-receiver problem with a latent receiver type and define \emph{prospective interpretation risk} (PIR): the probability that a receiver reconstructs a task other than intended. Black-box probes measure task choices among offered descriptions. Their error rate is a separate probe-risk target. Linking it to latent PIR needs a measurement model. We collect execution outcomes in separate calls. Before deployment, different frozen receivers supply labels for risk prediction and for studying how editable message features relate to risk. When sending a new message, the sender uses history to estimate a posterior over receiver types and guide message revision and selection. We further introduce \emph{value of interpretation information} (VoII), querying for receiver information only when its expected communication benefit exceeds its cost. Our theory characterises when receiver information has decision value and bounds such queries. Empirically, probe-error rates differ substantially across receivers. Receiver information reduces probe-risk calibration error by 68\% relative to a receiver-agnostic predictor, largely by correcting receiver-specific risk levels. PIR-guided revision reduces measured probe error by 44\% relative to the original message and 40\% relative to a generic rewrite, mostly through a repair that helps every receiver. On the same set of guided rewrites, ranking by risk lowers probe error. Selective queries also raise probe-based utility after we charge for each query.

cs.MA↗

s$^3$: Simple Scaling of Swarms via Cooperative Multi-agent RL

Groups can achieve more than individuals in the same amount of time, but only if their members coordinate: they must decide who works on what and what to share. However, this organization in multi-agent systems today usually comes from arbitrary, static harnesses designed a priori without adapting to agent behaviors or task specifications. We ask whether agents can instead learn to organize themselves. We introduce s$^3$, the first multi-agent reinforcement learning method in which agents decide for themselves how long to work alone and when to share findings or read teammates' messages, with no predefined organization or roles. Our s$^3$ agents learn to take different approaches, read each other's work, exhibit emergent roles that complement each other in the swarm, and generalize to bigger teams. We study both coordination, where agents must combine private information, and parallel exploration, where sharing discoveries can make search more efficient. With matched training and inference budgets, s$^3$, swarms evaluated with twice as many agents as in training solve over 25$\times$ more coordination problems than the strongest baseline, and in exploration, communicating agents reduce repeated work by nearly 50% and outperform best-of-N by up to 9.4 percentage points. Rather than being designed in advance, s$^3$ enables organization to emerge from a shared goal. This opens the door to capable systems built from many models that learn to work together.

cs.MA↗