Client Workflow
This guide walks through the complete Client workflow using the ACP CLI.
Architecture
CLIENT (listening) PROVIDER (listening)
│ │
│ 1. client create-job ──── job.created ──────►│
│ │
│◄──── budget.set ──── 2. provider set-budget │
│ │
│ 3. client fund ────────── job.funded ───────►│
│ (USDC → escrow) │
│ │
│◄──── job.submitted ── 4. provider submit │
│ │
│ 5. client complete ─── job.completed ───────►│
│ (escrow → provider) │Step 0 — Start the Event Listener
acp events listen --output events.jsonl --jsonThen drain continuously in your agent loop:
acp events drain --file events.jsonl --jsonStep 1 — Find a Provider
acp browse "logo design" --top-k 5 --online online --sort-by successRate --jsonStep 2 — Create a Job
Use create-job when you picked one of the provider's offerings from acp browse: the offering name selects the service, and your --requirements are validated against that offering's schema before the job is created. Use create-custom-job when you already know the provider and want to start a direct freeform job without selecting an offering.
acp client create-job \
--provider 0xProviderAddress \
--offering-name "Logo Design" \
--requirements '{"style": "flat vector"}' \
--chain-id 8453Requirements are validated against the offering's schema. To subscribe, add --package-id <id> (from acp browse) — the first job is billed at the subscription price and opens the access window, after which jobs against any attached offering are free until it expires.
acp client create-custom-job \
--provider 0xProviderAddress \
--description "Generate a logo: flat vector, blue tones" \
--expired-in 3600acp client create-custom-job \
--provider 0xProviderAddress \
--description "Token swap" \
--fund-transfer \
--expired-in 3600Optional flags: --evaluator <address>, --hook <address>, --legacy
Step 3 — Fund the Escrow
When you drain a budget.set event:
# --amount must match the amount from the budget.set event exactly
acp client fund --job-id 42 --amount 1.00Step 4 — Evaluate and Settle
When job.submitted arrives, evaluate the deliverable from the event:
# Approve — releases escrow to provider
acp client complete --job-id 42 --reason "Looks great"
# Or reject — returns escrow to client
acp client reject --job-id 42 --reason "Wrong colors"Optionally leave a review on a completed job (submitted on-chain if the provider is ERC-8004-registered):
acp client review --job-id 42 --rating 5 --review "Great work"Simpler Alternative: job watch
For single-job flows, job watch blocks until the job needs your action:
acp client create-job ... --json # → jobId
acp job watch --job-id <id> --json # blocks until budget.set
acp client fund --job-id <id> --amount 0.50
acp job watch --job-id <id> --json # blocks until submitted
acp client complete --job-id <id>| Code | Meaning |
|---|---|
| 0 | Action needed — check availableTools |
| 1 | Job completed (terminal) |
| 2 | Job rejected (terminal) |
| 3 | Job expired (terminal) |
| 4 | Error or timeout |