Zing Forum

Reading

Turnfile: Enabling Asynchronous Collaboration Between Multiple AI Agents via File Protocol

Turnfile is a file-based lightweight protocol that allows multiple large language model (LLM) agents to collaboratively process shared codebases without real-time communication, providing a new paradigm for distributed AI collaboration.

AI Agent多智能体协作异步通信文件协议分布式系统LLM代码协作
Published 2026-06-17 06:45Recent activity 2026-06-17 06:52Estimated read 6 min
Turnfile: Enabling Asynchronous Collaboration Between Multiple AI Agents via File Protocol
1

Section 01

Turnfile: A New Paradigm for Asynchronous Collaboration Between Multiple AI Agents via File Protocol

Turnfile is an open-source lightweight file protocol developed by snapsynapse, designed to solve the real-time communication challenges in multi-AI agent collaboration. It enables multiple LLM agents to collaborate asynchronously via files in a shared codebase, offering a new paradigm for distributed AI collaboration.

Original Author & Source:

2

Section 02

Background: Real-Time Communication Challenges in Multi-Agent Collaboration

As LLM capabilities improve, multi-agent collaboration to handle complex tasks has become a trend. However, traditional multi-agent systems rely on real-time communication mechanisms, which have significant issues:

  • Require continuous connections, vulnerable to network delays, interruptions, and race conditions;
  • Require all agents to be online simultaneously, making it difficult to implement across time zones, organizations, or computing environments.
3

Section 03

Core Mechanism: Collaboration Model Where Files Are the Protocol

Turnfile's design philosophy treats the file system as the communication protocol:

  • Agents exchange information by reading and writing "turnfile" in a specific format, which includes identity, task status, progress, blocking issues, and requests to other agents;
  • Use atomic file system operations (e.g., file locks, version control) to implement concurrency control and avoid conflicts;
  • Natively supports asynchronous work, persistent auditing, and reduces network infrastructure requirements.
4

Section 04

Application Scenarios: Cross-Domain Asynchronous Collaboration Practices

Turnfile has a wide range of application scenarios:

  1. Software Development: Multiple agents collaborate on front-end, back-end, testing, and other modules, coordinating interfaces, progress, and dependencies via turnfile;
  2. Data Processing Pipeline: Agents are responsible for cleaning, feature engineering, training, and evaluation respectively. After completing a phase, they update the turnfile to notify downstream agents;
  3. Cross-Organization Collaboration: Collaborate via shared storage (e.g., cloud storage) without complex network connections. Each organization controls the details of its own agents while adhering to a unified format.
5

Section 05

Key Technical Implementation Points: Standardization, Conflict Resolution, and Other Critical Details

Implementing Turnfile requires considering:

  1. File Format Standardization: Define a clear schema to ensure correct parsing by agents;
  2. Conflict Resolution: Clarify priority or merging strategies for simultaneous updates by multiple agents;
  3. State Machine Management: Agents need to maintain awareness of other agents' states to decide their own actions;
  4. Error Handling and Recovery: Timeout mechanisms, heartbeat detection, and failover to handle agent failures or unresponsiveness.
6

Section 06

Comparison with Existing Solutions: Minimalist Advantages and Limitations of Turnfile

Comparison with existing solutions:

  • Message Queues (RabbitMQ/Kafka): Reliable but complex to operate and maintain;
  • Workflow Engines (Airflow): Structured orchestration but requires centralized nodes;
  • Actor Model (Akka): Lightweight concurrency but has a steep learning curve; Turnfile's advantages: Minimalist design, no dependency on additional infrastructure, high portability; Limitations: File I/O overhead makes it unsuitable for low-latency scenarios; complex interactions (negotiation/auction) are clumsy. It is suitable for task-oriented scenarios that tolerate delays.
7

Section 07

Future Outlook: Potential of Lightweight Collaboration Protocols

Turnfile represents the design philosophy of "simplicity and reliability first", reducing the collaboration complexity of multi-agent systems and encouraging more developers to build distributed AI systems; As LLM agents become more popular, such lightweight protocols will become the foundation for modularity, scalability, and fault tolerance in AI systems, helping AI move from experimentation to production.