Skip to content

About

A2CP 是一个让 Claude Code 与 OpenAI Codex 在同一项目中实时协作的通信协议。它通过 .a2cp 目录下的 JSON 文件实现消息传递、看板任务管理和工作交接,同时内置 TCP Bridge 支持毫秒级实时通信和心跳检测。项目提供命令行终端、交互式仪表盘和 Web 指挥中心三种操作界面,支持一键分配任务、共享结构化知识和人类可编辑笔记。纯 Python 3.8+ 标准库实现,零依赖,开箱即用,跨平台兼容 Windows/macOS/Linux

Topics

Resources

Contributing

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

A2CP — AI-to-AI Collaboration Protocol

Python 3.8+ License: MIT Version

A file-based + TCP real-time protocol enabling two AI coding assistants to collaborate on the same project. Claude Code and OpenAI Codex (or VS Code Copilot) share messages, tasks, handoffs, and knowledge — no server, no network, just a .a2cp/ directory.

Install

No pip install and no build step - Python 3.8+ and the standard library are all it needs.

git clone https://github.com/TOSKA1226/a2cp-claudecode-codex-.git
cd a2cp-claudecode-codex-
python a2cp.py --help     # smoke test

Quick Start

# 1. Enter your project
cd /path/to/your-project

# 2. Initialize A2CP
python /path/to/a2cp-claudecode-codex-/a2cp.py init

# 3. Launch the interactive Command Center (browser)
python /path/to/a2cp-claudecode-codex-/a2cp.py center

# 4. Or use CLI commands
python a2cp.py bridge start          # Start real-time bridge
python a2cp.py task create "My task" # Create a task
python a2cp.py send --to codex       # Send a message
python a2cp.py dashboard             # Terminal live panel

What It Does

A2CP lets two AI coding assistants collaborate like a human dev team:

Feature How It Works
Messages JSON files in .a2cp/mailbox/{ai}/inbox/ + optional TCP real-time delivery
Task Board Kanban: backlog → todo → in-progress → review → done
Handoffs Structured JSON with decisions, blockers, and context for the receiver
Shared Memory 7-category knowledge base (architecture, conventions, decisions, patterns, gotchas, API reference, dependencies)
Human Notes .a2cp/NOTES.md — human-editable markdown both AIs read
Live Dashboard Terminal TUI with keyboard shortcuts
Web Command Center Browser-based control panel with one-click task assignment, message sending, and memory management

Architecture

.a2cp/
├── config.json              # Protocol configuration (v2.0)
├── NOTES.md                 # Human-editable shared notes
├── mailbox/
│   ├── claude/  (inbox/ read/ sent/)
│   └── codex/   (inbox/ read/ sent/)
├── tasks/    (backlog/ todo/ in-progress/ review/ done/)
├── handoffs/                # Work handoff records
├── memory/                  # Shared knowledge (category JSON files)
├── locks/                   # File-based mutexes
└── cli/                     # Local launcher scripts

Commands

# Core
a2cp init                    # Initialize .a2cp/ in current project
a2cp status                  # Text overview
a2cp dashboard               # Live terminal TUI
a2cp center                  # Web Command Center (browser)

# Bridge (real-time)
a2cp bridge start            # Start TCP bridge server
a2cp bridge stop             # Stop bridge server
a2cp bridge status           # Check bridge status
a2cp bridge ping             # Heartbeat — check if other AI is online
a2cp bridge monitor          # Live message feed

# Messages
a2cp check --ai claude       # Check inbox
a2cp read --all --ai claude  # Read all messages
a2cp send --to codex --type task_request --subject "Title" --body "..."
a2cp reply <msg_id> --body "..."

# Tasks
a2cp task create "Title" --desc "..." --priority high
a2cp task list --status backlog
a2cp task claim T-0001 --ai claude
a2cp task start T-0001
a2cp task review T-0001
a2cp task approve T-0001

# Handoffs
a2cp handoff create --to codex --done "What was done" --next "What's next"
a2cp handoff list
a2cp handoff ack H-0001

# Memory
a2cp memory set <key> <value> --category architecture
a2cp memory get <key>
a2cp memory search "query"
a2cp memory list --category architecture

# Notes
a2cp notes read
a2cp notes add --text "..."
a2cp notes edit

Requirements

  • Python 3.8+ — zero dependencies beyond stdlib
  • Windows / macOS / Linux — cross-platform
  • Modern terminal — for ANSI dashboard (Windows Terminal, iTerm2, etc.)

How Two AIs Collaborate

  1. Human initializes the project and starts the bridge
  2. Claude creates tasks, writes shared memory, and reviews code
  3. Codex checks inbox, claims tasks, writes code, submits for review
  4. Both AIs communicate via messages and handoffs
  5. Human orchestrates everything from the Command Center

Contributing

Found a bug or have an idea? Open an issue or PR. See PROTOCOL.md for the full protocol spec.

License

MIT — see LICENSE

About

A2CP 是一个让 Claude Code 与 OpenAI Codex 在同一项目中实时协作的通信协议。它通过 .a2cp 目录下的 JSON 文件实现消息传递、看板任务管理和工作交接,同时内置 TCP Bridge 支持毫秒级实时通信和心跳检测。项目提供命令行终端、交互式仪表盘和 Web 指挥中心三种操作界面,支持一键分配任务、共享结构化知识和人类可编辑笔记。纯 Python 3.8+ 标准库实现,零依赖,开箱即用,跨平台兼容 Windows/macOS/Linux

Topics

Resources

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages