Install
openclaw skills install @deepseekoracle/cross-agent-treaty-brokerLocal inter-agent treaty negotiation with consent loops.
openclaw skills install @deepseekoracle/cross-agent-treaty-brokerA lightweight, consent-first protocol for negotiating and recording bilateral treaties between agents—covering data-sharing terms, capability boundaries, escalation paths, and revocation conditions—without requiring a central authority.
npx clawhub install cross-agent-treaty-broker@latest
Clone the repository:
git clone https://github.com/DeepSeekOracle/lygo-protocol-stack.git
cd lygo-protocol-stack/clawhub/mirrors/cross-agent-treaty-broker
Initialize the skill:
python scripts/catcb.py init
First, initialize the CATB skill:
python scripts/catcb.py init
This creates the necessary data directories and initializes the anchor registry.
Create a treaty proposal with another agent:
python scripts/catcb.py propose --to <agent_id> --treaty <treaty.json>
Or create a new treaty interactively:
python scripts/catcb.py propose --to <agent_id>
Always review the human-readable preview before signing:
python scripts/catcb.py review <treaty_id>
Record a treaty locally after human approval:
python scripts/catcb.py sign <treaty_id> --signer <human_id>
python scripts/catcb.py list
Initiate revocation of a treaty:
python scripts/catcb.py revoke <treaty_id> --reason "<reason>"
Show audit trail for a treaty:
python scripts/catcb.py audit <treaty_id>
A treaty is a JSON document with the following structure:
{
"treaty_id": "uuid-v4",
"anchor_hash": "sha256-of-treaty-json",
"parties": {
"agent_a": {
"id": "agent_id",
"role": "role",
"invariants": ["..."],
"grants": ["..."],
"limits": ["..."]
},
"agent_b": {
"id": "agent_id",
"role": "role",
"invariants": ["..."],
"grants": ["..."],
"limits": ["..."]
}
},
"terms": {
"data_sharing": {
"allowed_sources": [...],
"sensitive_data_exclusions": [...],
"retention_period_days": 30,
"encryption": "AES-256-GCM",
"transfer_protocol": "secure-channel"
},
"capability_access": {
"granted_to_other": ["..."],
"granted_by_other": ["..."],
"rate_limits": {
"requests_per_minute": 10,
"batch_size": 100
}
},
"escalation_path": {
"dispute_resolution": "human_steward",
"max_escalation_level": 2,
"fallback_action": "pause_data_transfer"
},
"revocation_conditions": [
"breach_of_terms",
"mutual_agreement",
"expiry_date"
],
"expiry_date": "2026-12-31T23:59:59Z"
},
"timeline": {
"proposed_at": "2026-10-20T00:00:00Z",
"reviewed_at": "2026-10-20T01:00:00Z",
"signed_at": "2026-10-20T02:00:00Z",
"effective_at": "2026-10-20T02:01:00Z"
},
"signatures": {
"agent_a": {
"signed_by": "human_id",
"timestamp": "2026-10-20T02:00:00Z"
},
"agent_b": {
"signed_by": "human_id",
"timestamp": "2026-10-20T02:00:00Z"
}
}
}
┌─────────────┐ ┌──────────────┐ ┌─────────────┐ ┌─────────────┐
│ propose- │────>│ review- │────>│ sign-local │────>│ record- │
│ treaty │ │ compact │ │ (human │ │ treaty │
└─────────────┘ └──────────────┘ └─────────────┘ └─────────────┘
│
v
┌─────────────┐
│ revoke-treaty│
└─────────────┘
data/treaties/<treaty_id>.jsondata/logs/treaty-events.logdata/anchors/registry.jsonThis skill works with the LYGO stack:
lygo-protocol-stack-operator can query the treaty registrySee the examples/ directory for sample treaty JSONs.
references/quick-start.mdreferences/treaty-json-schema.jsonMIT License
Justin Helmer (Lightfather) / LYGO Builder team