让不同厂商的AI代码助手通过文件协作,无需共享环境或中心服务器。
tap: A File-Based Protocol for Heterogeneous LLM Agent Collaboration
- 用文件作为消息载体,结合文件检查与实时通知双通道通信。
- 在27天内完成37次迭代,异构模型配对发现缺陷率高达69.8%。
- 适合跨平台、异构环境下的AI协作开发,开源可直接使用。
现有多智能体软件开发系统虽提出多种协作方式,如角色分工与自动代码审查,但普遍依赖共同运行时、中心通信服务器或相同API体系。这导致来自不同厂商的LLM智能体难以在独立执行环境中直接交换信息,协同处理共享代码库。本文提出tap协议,一种基于文件的协作机制,使Claude(Anthropic)与Codex(OpenAI)可在无共享内存或统一运行时的前提下协作开发同一代码库。tap核心为文件优先设计:以带元数据的Markdown文件作为原始消息,采用文件检查路径(一级通信)与实时通知路径(二级通信)并行,通过独立git工作树隔离任务。即使实时通知失败或接收方重启,消息文件仍可重复检视。在持续27天、37次生成的自用实验中,共产生209个tap相关Pull Request和717个操作产物。对375份审查产物分析显示,异构模型组合的审查中至少记录一个缺陷或修改请求的比例为69.8%,高于同构模型组合的53.1%。结果表明,tap能实现在真实生产仓库中的协作,且异构模型搭配可拓展审查视角。tap已作为开源npm包@hua-labs/tap(v0.5.2)发布。
原文摘要 · Abstract (English)
Existing multi-agent software development systems have proposed many forms of agent collaboration, including role-based collaboration and automated code review. However, many systems assume a common runtime, a central conversation server, or the same API family. Under these assumptions, LLM agents from different vendors cannot easily exchange messages directly from their own execution environments while dividing development and review work on a shared codebase. This paper presents tap, a file-based collaboration protocol that allows Claude (Anthropic) and Codex (OpenAI) to collaborate on one codebase without shared memory or an identical runtime. The core of tap is a file-first design that preserves markdown files with metadata as original messages, combines a file inspection path (file communication, Tier 1) with real-time notification paths for Claude and Codex (real-time communication, Tier 2), and isolates work through separate git worktrees. Even if real-time notification fails or a receiver restarts, the message file remains available and the same content can be inspected again. In a 27-day, 37-generation self-applied operation where tap was used to develop and review itself, we collected 209 tap-related pull requests and 717 operational artifacts. An analysis of 375 review artifacts showed that the share of reviews recording at least one defect or requested change was 69.8% for heterogeneous model pairs and 53.1% for homogeneous model pairs. These results show that tap, which combines file-based message preservation with real-time notification, operates in a real production repository, and that combining heterogeneous models and execution environments can broaden review perspectives. tap is distributed as the open-source npm package @hua-labs/tap (v0.5.2).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。