Skip to main content

Open Agent Coordination Protocol CLI for file-based multi-agent workflows

Project description

OACP — Open Agent Coordination Protocol

PyPI License Claude Code Codex PRs Welcome

Try the quickstart → — send your first message to an AI agent in 5 minutes.

Empowering solo founders to coordinate AI agents, with human-in-the-loop for control.

A file-based coordination protocol for multi-agent engineering workflows. OACP defines the message formats, state machines, review processes, and safety rules that enable AI agents on different runtimes to collaborate asynchronously through a shared filesystem.

OACP is not a framework or SDK. It is a set of conventions, YAML schemas, and shell scripts that any agent runtime can implement — Claude, Codex, Gemini, or your own.

Features

  • Inbox/outbox messaging — async YAML-based communication with threading, broadcast, and expiry
  • Structured review loop — severity-graded findings, quality gates, and multi-round review
  • Durable shared memory — project facts, decisions, and open threads that persist across sessions
  • Dispatch state machine — full task lifecycle tracking from assignment to merge
  • Agent safety defaults — baseline rules for git, credentials, staging, and scope discipline
  • Runtime-agnostic — works with any agent runtime that can read/write files

Why OACP?

When multiple AI agents work on the same codebase, they need a way to:

  • Communicate — send task requests, review feedback, and handoffs without shared memory
  • Review each other's work — structured review loops with quality gates and severity-based findings
  • Stay in sync — durable memory files that persist decisions across sessions and runtimes
  • Stay safe — baseline safety rules for git operations, credential scoping, and scope discipline

OACP solves this with a filesystem-based protocol that requires no server, no database, and no vendor lock-in. Agents read and write YAML files in a shared directory — that's it.

Where OACP Fits

Three protocols are shaping multi-agent development. They solve different problems at different layers:

┌─────────────────────────────────────────────┐
│  A2A — Agent discovery & remote messaging   │  internet-scale
├─────────────────────────────────────────────┤
│  OACP — Agent coordination & workflows      │  local filesystem
├─────────────────────────────────────────────┤
│  MCP — Agent-to-tool integration            │  tool access
└─────────────────────────────────────────────┘

MCP gives agents access to tools and data sources — databases, APIs, file systems. It defines how an agent calls a tool.

A2A lets agents discover and communicate with each other across the internet. HTTP-based, enterprise-grade, backed by 150+ organizations under the Linux Foundation.

OACP coordinates agents working together on the same machine. File-based, zero-infra, designed for dev teams and CI pipelines.

OACP vs A2A

Both coordinate agents — but for different topologies:

A2A OACP
Transport HTTP/HTTPS — always-on servers Filesystem — read/write files
Best for Cross-org, internet-routable agents Local teams, dev machines, CI
Infrastructure TLS, auth, HTTP endpoints A shared directory
Offline support Agent must be reachable Native — messages wait in inbox
Audit trail Requires log infrastructure The inbox directory is the log
Setup Deploy servers + configure networking oacp init my-project

They complement each other. A2A connects agents across the internet. OACP coordinates agents on your machine. A gateway between OACP inboxes and A2A endpoints is a natural bridge — and A2A's own community is exploring inbox patterns that validate this design.

OACP + MCP work together. An agent can use MCP to access tools (databases, APIs) while using OACP to coordinate with other agents (review loops, task dispatch, shared memory). Different layers, no conflict.

Install

uv tool install oacp-cli
pipx install oacp-cli
uvx --from oacp-cli oacp doctor
From source
git clone https://github.com/kiloloop/oacp.git
cd oacp
uv tool install .

Commands

  • oacp init creates a project workspace under $OACP_HOME/projects/
  • oacp send sends a protocol-compliant inbox message
  • oacp doctor checks environment and workspace health
  • oacp validate validates an inbox/outbox YAML message

If OACP_HOME is unset, workspace commands default to ~/oacp (underscore).

Key Concepts

Concept Description
Inbox/Outbox Async messaging between agents via YAML files in agents/<name>/inbox/
Review Loop Structured code review: review_requestreview_feedbackreview_addressedreview_lgtm
Quality Gate Merge-readiness criteria: no unresolved P0/P1 findings, deferred nits tracked
Durable Memory Shared memory/ directory with project facts, decisions, and open threads
Dispatch States Task lifecycle: receivedacceptedworkingpr_openedin_reviewdone
Safety Defaults Baseline rules all agents follow: no force push, no secrets in commits, stage hygiene

Project Structure

oacp/
├── docs/
│   ├── protocol/       # Canonical protocol specifications (13 specs)
│   └── guides/         # Setup, adoption, versioning
├── scripts/            # 13 kernel scripts (Python + shell)
├── templates/          # Packet, role, and guardrail templates (19)
├── tests/              # Test suite
├── Makefile            # Task runner (make help for all targets)
└── SPEC.md             # Full protocol specification

Quick Start

# 1. Clone the repo
git clone https://github.com/kiloloop/oacp.git
cd oacp

# 2. Install the CLI
uv tool install oacp-cli

# 3. Initialize a project workspace
export OACP_HOME="$HOME/oacp"
oacp init my-project

# 4. Send your first message
oacp send my-project \
  --from alice --to bob --type task_request \
  --subject "Implement feature X" \
  --body "Details here..."

# 5. Check environment health
oacp doctor

See QUICKSTART.md for a complete 5-minute walkthrough.

Scripts

OACP ships 13 scripts — the key ones you'll use most:

  • init_project_workspace.sh — create a new project workspace (the first script you run)
  • send_inbox_message.py — send protocol-compliant messages between agents
  • preflight.py — unified quality checks (CI runs this on every PR)
  • oacp_doctor.py — environment and workspace health check

Run make help to see all available Makefile targets, or see SPEC.md for the full script inventory.

Prerequisites

  • Python 3.9+
  • Bash 3.2+ (macOS default is fine)
  • gh CLI (for GitHub operations)
  • pyyaml (pip install pyyaml)

Protocol Specification

The full protocol is documented in SPEC.md, covering:

  1. Inbox/Outbox Messaging — message format, types, lifecycle, threading, broadcast
  2. Dispatch State Machine — task lifecycle from delivery to completion
  3. Review Loop — packet-based and inbox-based review with quality gates
  4. Cross-Runtime Sync — durable memory, handoff context, session init
  5. Safety Defaults — git safety, staging hygiene, credential scoping

Individual protocol specs live in docs/protocol/.

Workspace Layout

When you initialize a project, OACP creates this structure:

$OACP_HOME/projects/<project>/
├── agents/
│   ├── <agent-a>/
│   │   ├── inbox/          # Other agents write here
│   │   ├── outbox/         # Sent messages (copies)
│   │   ├── status.yaml     # Dynamic agent state
│   │   └── agent_card.yaml # Static agent identity
│   └── <agent-b>/
│       └── ...
├── memory/                  # Shared durable memory
│   ├── project_facts.md
│   ├── decision_log.md
│   └── open_threads.md
├── packets/                 # Review/findings artifacts
└── workspace.json           # Project metadata

Development

make test
make preflight

Documentation

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

License

Apache 2.0 — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oacp_cli-0.1.1.tar.gz (151.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oacp_cli-0.1.1-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

File details

Details for the file oacp_cli-0.1.1.tar.gz.

File metadata

  • Download URL: oacp_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 151.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for oacp_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 55825a6e80fcf9dc6edd940582fbef7a730dba14db3964232085b5f588ba6d67
MD5 3c1277e6196106ff1fbde3a03dc58512
BLAKE2b-256 d561501710c4dc62aca9a4562eb3f7b30aa1ff67d58a0e32eef622889146a114

See more details on using hashes here.

Provenance

The following attestation bundles were made for oacp_cli-0.1.1.tar.gz:

Publisher: release.yml on kiloloop/oacp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oacp_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: oacp_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 41.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for oacp_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 61bcff864522e7fb1e48badb3bc6649597356e1a00e702fe1a0faeabeb6bba29
MD5 c11672f50561f1925e45b7b513bf25c8
BLAKE2b-256 178a9627bae367e356ea18e14007e6c9b1017d819478a6240f14d457f64b6fb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for oacp_cli-0.1.1-py3-none-any.whl:

Publisher: release.yml on kiloloop/oacp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page