Manuscript Offprint

arXiv:2610.06481

AECP: Artifact-Exclusive Communication Protocol for Multi-Agent Code Generation

Jiaqi Xue, Yanjun Wang, Xiangci Li, Lingbo Mo, Aritra Sengupta, Shweta Garg, Murali Krishna Ramanathan, Myeongsoo Kim

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

As AI agents increasingly tackle complex repository-level coding tasks, distributing work across multiple agents is a natural way to scale beyond the capabilities of a single agent. To coordinate their interdependent work, these agents share findings and agree on interfaces between modules. However, exchanged information often serves only as context, leaving individual agents to interpret it and incorporate it into subsequent work. Consequently, shared findings may go unused and deviations from interface agreements may go undetected, undermining the reliability and efficiency of collaboration. This motivates moving part of the coordination responsibility from individual agents to the execution harness. To make shared information actionable during execution, we introduce the Artifact-Exclusive Communication Protocol (AECP). AECP requires agents to communicate exclusively through structured artifacts and specifies how the harness processes them. The harness supplies findings when agents access relevant code, screens implementations for mismatches with recorded interface commitments, and requires affected agents to revisit revised agreements. These coordination steps become part of harness execution rather than actions that agents must initiate from prior messages. Across Doc2Repo, NL2Repo, and CodeProjectEval, using closed- and open-source models including Opus-4.8 and DeepSeek-V4-Flash, AECP improves average test pass rate by 28.2% and reduces average wall time by 16.5% relative to an agent team using free-form inter-agent messages. Artifact-exclusive communication also blocks the relay of malicious instructions between agents, reducing how often they reach other agents from 95% to 0% and how often those agents act on them from 40% to 0%.

1 INTRODUCTION

LLM-based coding agents (Yang et al., 2024; Xia et al., 2024) increasingly tackle software engineering tasks ranging from localized bug fixes to repository-level development (Jimenez et al., 2024; Ding et al., 2025; Chen et al., 2026). As these tasks grow in scope, single agents face a greater context burden and longer completion times. Decomposing and assigning subtasks to multiple agents can reduce this burden and enable parallel execution (Zhang et al., 2026; OpenAI, 2026; Anthropic, 2026e;a). This division of work, however, leaves knowledge and implementation decisions distributed across separate agent contexts, even though the subtasks remain interdependent. Agents therefore need to share knowledge and align implementation decisions to avoid duplicated exploration and incompatible implementations (Cemri et al., 2025; Khatua et al., 2026).

Existing multi-agent coding systems coordinate either centrally, where a main agent or a predefined role sequence assigns bounded subtasks and integrates the results (Hong et al., 2024; Qian et al., 2024; Zhang et al., 2026; OpenAI, 2026; Anthropic, 2026e; Geng & Neubig, 2026; Benkovich & Valkov, 2026), or among peers, where teammates own separate workstreams and communicate directly (Wu et al., 2024; Anthropic, 2026a). In both cases, an agent decides what to do with exchanged information: the coordinator reads returned summaries, and teammates read each other's messages. Using shared findings and checking implementations against agreed interfaces are therefore left to agents. As illustrated in Figure 1 (a), a shared finding may be overlooked when an agent writes

*Work done during an internship at AWS AI Labs.

Figure

(a) Agents interpret messages

(b) Harness acts on artifacts (AECP)

(c) Trace decomposition

Figure 1: Multi-agent coordination and development overhead. (a) Agents interpret exchanged messages and decide how to act on them; shared plans and agreements may be followed, deviated from, or ignored. (b) AECP requires exchanges to pass through structured artifacts, enabling the execution harness to guide agents with shared knowledge and check implementations against recorded agreements. (c) Token and interaction-turn distributions for the natural-language communication baseline across 104 NL2Repo tasks, estimated from LLM-labeled trajectories (Appendix G).

related code, or an implementation may depart from an agreed interface without the mismatch being detected. Khatua et al. (2026) observe that agents spend up to a fifth of their steps communicating, yet communication does not improve overall task success. Their failure analysis identifies difficulties in integrating communicated information and honoring commitments, while broader analyses also report ignored peer messages and missing or incomplete verification (Cemri et al., 2025). These findings highlight a gap between exchanging information and reliably using it to guide and check subsequent implementation.

To bridge this gap, the execution harness can participate directly in coordination, using exchanged information to guide and check agents' work. We introduce the Artifact-Exclusive Communication Protocol (AECP), in which agents communicate exclusively through structured artifacts. Every coordination exchange is thus mediated by the execution harness. As shown in Figure 1 (b), guiding agents with shared findings and checking their implementations against agreements become actions that the harness carries out under the protocol's rules, reducing reliance on agents to initiate them from prior messages.

To identify where such coordination support could reduce development overhead, we analyze multi-agent coding trajectories across all tasks in NL2Repo (Ding et al., 2025). As shown in Figure 1 (c), repeated exploration accounts for 26.8% of token usage, while rework caused by incompatible decisions at module boundaries accounts for another 22.2%. These observations motivate two complementary forms of support: knowledge reuse across subtasks and consistency checks between interdependent implementations. AECP provides a Knowledge Artifact through which agents record findings for the harness to supply during subsequent work, helping other agents build on prior exploration. A Contract Artifact records interface agreements with conditions that the harness can check against implementations, helping detect incompatibilities during development.

We evaluate AECP on repository construction, where agents build a repository from documentation or natural-language requirements in an empty workspace, using Doc2Repo (Chen et al., 2026), CodeProjectEval (Zhao et al., 2025), and NL2Repo (Ding et al., 2025). Averaged across models and benchmarks, AECP improves test pass rate by 10.6% over a single agent, and by 28.2% and 8.5% over agent teams that use free-form messages (Wu et al., 2024) or centralized integration (Geng & Neubig, 2026), while reducing wall time by 16.5% and 24.9% relative to these teams. Artifact-exclusive communication also blocks the relay of malicious instructions from a compromised agent, reducing how often they reach other agents from 95% to 0% and how often they are acted on from 40% to 0%.

References (55)