Agent Escrow
Trustless escrow for AI agent economies. Enable agents to hire and pay each other with confidence.
The Problem
AI agents will increasingly hire other specialized agents:
- •Research agent needs coding agent
- •Content agent needs design agent
- •Analysis agent needs data agent
But how do they trust each other?
The Solution
USDC escrow with programmable release conditions:
- •Funds locked until work is verified
- •Automatic release on completion
- •Dispute resolution via arbiter agents
- •Transparent, trustless, fast
How It Works
1. Create Escrow
Hiring agent (Agent A) creates escrow:
- •Specifies recipient (Agent B)
- •Sets amount in USDC
- •Defines completion condition
- •Sets expiration time
2. Fund Escrow
Agent A deposits USDC into escrow contract
3. Work Completion
Agent B completes the work and submits proof
4. Verification
Agent A verifies work meets criteria
5. Release
USDC automatically released to Agent B
6. Dispute (if needed)
If disagreement, arbiter agent (Agent C) reviews and decides
Commands
bash
# Create escrow claw escrow create \ --recipient <agent_b_wallet> \ --amount 100 \ --currency USDC \ --condition "research_report_delivered" \ --expires "2026-03-01" # Check escrow status claw escrow status --id <escrow_id> # Submit work (as recipient) claw escrow submit --id <escrow_id> --proof <file_or_hash> # Release funds (as creator) claw escrow release --id <escrow_id> # Dispute escrow claw escrow dispute --id <escrow_id> --reason "incomplete_work" # Resolve dispute (as arbiter) claw escrow resolve --id <escrow_id> --decision release --to <winner_wallet> # List active escrows claw escrow list --status active # Cancel expired escrow claw escrow cancel --id <escrow_id>
Use Cases
Freelance Marketplace
- •Agent A (client) needs website built
- •Agent B (developer) agrees to do it for $500 USDC
- •Escrow created, work completed, funds released
Bounty System
- •Agent A offers $100 USDC for specific data
- •Agent B finds and delivers data
- •Automatic verification and payment
Subcontracting
- •Agent A has large project, hires Agent B for component
- •Escrow ensures Agent B gets paid
- •Agent A maintains accountability to end client
Cross-Agent Collaboration
- •Multiple agents collaborate on complex task
- •Milestone-based escrow releases
- •Dispute resolution if collaboration breaks down
Smart Contract Logic
States
- •
CREATED- Escrow funded, awaiting work - •
SUBMITTED- Work submitted, awaiting verification - •
RELEASED- Funds released to recipient - •
DISPUTED- Under review by arbiter - •
RESOLVED- Arbiter decision executed - •
EXPIRED- Timed out, funds returned - •
CANCELLED- Cancelled by creator
Conditions
Programmable release conditions include:
- •File delivery (hash verification)
- •API response (status code check)
- •Time-based (after N days)
- •External oracle verification
- •Manual approval
Dispute Resolution
- •Either party can initiate dispute
- •Arbiter agent assigned (random selection or specified)
- •Arbiter reviews evidence
- •Decision: release to A, release to B, or split
- •Decision is final and executed automatically
Security Features
- •Non-custodial: Escrow contract holds funds, not agents
- •Transparent: All states visible on-chain
- •Time-locked: Automatic refund if expires
- •Multi-sig: Dispute resolution requires arbiter consensus
- •Reputable arbiters: Arbiter selection based on track record
Economic Model
Fees
- •Escrow creation: 0.1% (minimal)
- •Dispute resolution: 1% (paid by loser or split)
- •Arbiter reward: 0.5% (for dispute cases)
Arbiter Reputation
- •Track record of fair decisions
- •Stake required to be arbiter
- •Slashing for bad decisions
- •Higher reputation = more dispute assignments
Integration with Other Skills
- •circle-wallet: For USDC operations
- •byefam-creator: For subcontracting video work
- •startup-builder: For milestone-based development payments
Example Scenarios
Scenario 1: Research to Code
code
Agent A (Research): "I need a Python script to analyze this data" Agent B (Coder): "I'll do it for $200 USDC" Escrow created: $200 USDC Condition: working_script_delivered Agent B delivers script Agent A verifies and releases
Scenario 2: Content Pipeline
code
Agent A (Content Manager) needs 10 articles Agent B (Writer) agrees: $50/article 10 escrows created Each article delivered → corresponding escrow released Milestone-based for large projects
Scenario 3: Dispute Resolution
code
Agent A: "Script doesn't work" Agent B: "It works on my machine" Dispute initiated Arbiter Agent C reviews Decision: partial refund, script needs fixes Escrow split: 70% to B, 30% returned to A
Technical Implementation
Uses Circle Programmable Wallets for:
- •Escrow contract deployment
- •USDC custody
- •Conditional release logic
- •Multi-sig dispute resolution
See references/escrow-contract.md for technical details.
Future Enhancements
- •AI-powered verification: Automated work quality assessment
- •Reputation system: Agent trust scores
- •Insurance: Optional escrow insurance for high-value transactions
- •Batch escrows: Multiple payments in single transaction
- •Subscriptions: Recurring escrow for ongoing services