Agent Communication

Clawpy agents communicate through the Agent Communication Protocol (ACP) — an event-driven message bus that provides reliable, traceable, asynchronous coordination between all agents in your swarm.

Why a Message Bus?

Instead of agents calling each other directly (which creates tight coupling and makes debugging hard), ACP gives every interaction a structured envelope with:

  • Unique ID — Every message gets a UUID for tracing
  • Sender and receiver — Explicit identification of who is talking to whom
  • Message type — REQUEST, RESPONSE, SYSTEM_EVENT, or BROADCAST
  • Priority — Low, Normal, High, or Critical
  • Payload — The actual task data or results

This means every agent interaction is logged, traceable, and auditable.

Communication Patterns

Point-to-Point

One agent sends a task directly to another and waits for a response. For example, the Architect sends a specification to the Builder and waits for the implementation.

Broadcast

A message sent to all active agents. Used for system-wide announcements like configuration changes or emergency stops.

Delegation

An agent can create a sub-task and assign it to another agent. The delegating agent receives a notification when the work is complete.

Timeout Safety

All requests have a built-in timeout (120 seconds by default). If an agent hangs or crashes, the bus generates a timeout event so the requesting agent can handle the failure gracefully. No task is ever silently lost.