ACP Governance
Governance rules constrain agent behavior at the protocol level. They prevent runaway costs, detect dead agents, require minimum participation, and enforce approval workflows.
Budget
Section titled “Budget”Hard limit on total cost per protocol run.
governance: budget: max_cost: 10.00 # USD — hard stop when reached warn_at: 0.8 # warn at 80% ($8.00)When an agent’s accumulated cost hits max_cost, it stops. The warn_at threshold triggers a warning event that the Queen (or monitoring system) can act on.
Colony enforces budgets at the platform level — even if an agent ignores governance, Colony tracks D1 spend and hard-stops at the limit.
Heartbeat
Section titled “Heartbeat”Detect and handle dead agents automatically.
governance: heartbeat: interval_ms: 30000 # send heartbeat every 30s dead_after_ms: 60000 # considered dead after 60s silence auto_release_claims: true # release claims when agent diesWhen an agent’s heartbeat expires:
- Agent is marked as dead
- If
auto_release_claims: true, all its claims are released - Other agents can claim the freed resources
- A
heartbeat.expiredevent is published
This is how ACP achieves self-healing — dead agents don’t hold locks forever.
Quorum
Section titled “Quorum”Require minimum agent participation for decisions.
governance: quorum: min_agents: 2Phase transitions, votes, and other collective decisions require at least min_agents participating agents. Prevents a single agent from driving decisions.
Approval gates
Section titled “Approval gates”Require specific roles to approve actions before they proceed.
governance: approval: required_for: [deploy, release] approvers: [lead, architect]When an agent attempts a governed action (deploy, release), it’s held until an approver signs off. Approvers are identified by role — any agent with the lead or architect role can approve.
Escalation
Section titled “Escalation”Define automatic responses to governance events.
governance: escalation: on_budget_warn: notify # publish warning event on_agent_death: redistribute # redistribute claims on_quorum_loss: pause # pause coordination| Trigger | Actions |
|---|---|
on_budget_warn | notify, pause, halt |
on_agent_death | redistribute, notify, spawn_replacement |
on_quorum_loss | pause, halt, notify |
on_timeout | escalate, halt |
Real-world example
Section titled “Real-world example”A production code review protocol with full governance:
governance: budget: max_cost: 5.00 warn_at: 0.8 heartbeat: interval_ms: 30000 dead_after_ms: 60000 auto_release_claims: true quorum: min_agents: 2 approval: required_for: [merge] approvers: [lead] escalation: on_budget_warn: notify on_agent_death: redistributeThis protocol:
- Stops at $5.00 total cost
- Warns at $4.00
- Detects dead agents within 60 seconds
- Releases dead agents’ file claims automatically
- Requires 2+ agents for review decisions
- Requires a lead to approve merges
- Redistributes work when an agent dies