Tutorials · Tutorial
Rehearse a whole hire
Watch a job, two commissioned runs and a seat’s whole month happen on a local fork of Robinhood Chain, with a scripted model in place of Claude. It takes about ten minutes, most of it reading.
What the rehearsal does
Section titled “What the rehearsal does”npm run rehearse:fork runs the desk’s own code, the same desk, till, agent pool, worker, spend policy and ledger a
release runs, in development mode inside one script. It forks Robinhood Chain mainnet and works against the live
ERC-8004 Identity Registry, Shipped’s live job registry and live USDG. Every sender is a fresh key or an account the
fork impersonates, so nothing reaches the real network.
These things differ from a deployed desk:
- The model is scripted. Each agent’s turns are fixed in advance: write a note, pay for a dataset, try a payment over the cap, deliver. Every one of those tool calls still runs through the agent’s real tools, the spend policy and the ledger. No model key is needed.
- Every brief is taken. Without a model key the desk’s brief screening would refuse them all; screening has its own tests.
- The seat’s partner API is a mock host inside the script, which answers only when the right key arrives in the request.
- Time is moved. The desk’s clock and the chain’s move forward together, so a seat’s month, its renewal and its grace period pass in seconds.
- Every outbound request goes to the mock. The agents’ network guard is replaced by one that sends any host to the mock, so the guard’s address checks are not part of the rehearsal; they have their own tests.
- The settings are small and fast. The desk uses test prices and a small seat spending allowance, releases a seat’s fee daily, and its agents pay on Robinhood Chain only.
- No public pages. The script starts the desk’s core without the record pages, the numbers, MCP, A2A or the web app; Run a development desk serves them.
Amounts in the output that would read as the desk’s prices or fees are cut (…): they are the rehearsal’s own test
values, and no desk publishes prices before hiring opens.
Run it
Section titled “Run it”You need the setup from Run a development desk: Node 24, anvil 1.5.1 in
~/foundry-1.5.1 and a checkout with npm ci done. The web app build is not needed. From the checkout:
export FORK_RPC_URL=https://rpc.mainnet.chain.robinhood.comexport ANVIL_BIN=$HOME/foundry-1.5.1/anvilexport FORK_PORT=8641npm run rehearse:forkIt finishes in under a minute:
- fork up at block 126416180- Engagement Registry deployed on the fork against the live Identity Registry- desk funded with gas; the till holds no gas and needs none- pool agent 26696 and seat agent 26697 registered on ERC-8004 from their own wallets, desk named provider, dev evidence recorded- client signed the engagement; engagement 1 on chain; job 11 opened by the agent with its bond; a second accept returned the same task- client checked and funded the job with the Shipped SDK [desk] task db92068b-9797-4433-85ef-fd8b6edfad9f: delivered- agent worked from its float, the over-cap payment was refused; the job's evidence on chain is the envelope, and the reviewer read the report on a signature [desk] task db92068b-9797-4433-85ef-fd8b6edfad9f: paid and swept- reviewer accepted; agent collected and swept … to the revenue wallet [desk] task 06d38cb1-d39a-42fc-867a-f0528a1ae697: delivered [desk] till: released payment- commissioned run paid over x402 into the till (…), a retry charged nothing, engagement opened after settlement, report delivered, payment released to revenue [desk] task fe975b7a-de34-4177-a99d-bda6900d99ea: failed: The model stopped without delivering. [desk] till: refunded payment- a run that ended without a delivery failed and its … went back to the payer from the till (0xe8a028b3…)- two clients raced for seat 26697: 0x96855C… paid and holds it, its … held in the till for the month; the other was refused before settlement and kept its … [desk] ops: request- operator accounts: revenue …, till …, payments 1 held, 1 refunded, 1 released [desk] ops: request- seat 26697: the client picked acme-prices from the catalog after an operator approved it, uploaded partner-desk (0x09be9988…) and stored its API key sealed [desk] task 15d19ad8-957c-4c1f-850a-b9c96a6a87b4: delivered- a message ran: the agent noted Acme, called the partner API with the key filled in on the way out (scrubbed from the echo), paid 0.85 USDG for a dataset, and delivered [desk] task 78d582f6-8a42-4247-a9ed-1853a62c8252: delivered- usage: 0.85 of … of spending this month; the client was told at 80% [desk] till: released payment- renewal quoted in the last week: … for the month plus 0.85 USDG of usage, itemised in the signed terms; paid over x402; its engagement starts at 2026-12-30, so the months join [desk] seats: month over, in grace [desk] till: released payment [desk] till: released payment- the second month ran out: the seat is in grace, messages wait, and the client still reads its data [desk] seats: grace over, releasing [desk] seats: released and wiped; the agent is offered again- grace ended: notes, memory, uploaded and picked skills, the secret and message contents wiped and checked on disk and in sqlite; both months' fees reached revenue- seat 26697 is offered to the next client with nothing of the last one's- ledger: bond:…, payment:1000000, float:…, sweep:…PASSLines starting with - are the rehearsal’s own steps. Lines starting with [desk] are the desk’s log, one line per
event. Every step is also an assertion: if anything did not happen as described, the script stops there with the
reason. Agent ids, the job id and task ids depend on the live chain when you start the fork, so yours will differ.
Reading the output, scenario by scenario
Section titled “Reading the output, scenario by scenario”The desk and its agents
Section titled “The desk and its agents”The script deploys the Engagement Registry on the fork and gives the desk’s wallet gas: the desk pays for opening engagements, recording evidence and settling payments. The till, which holds payments, never sends a transaction itself, so it needs none.
Then the agents. Each creates its wallet inside the desk, waits for gas (the script stands in for the treasury that
funds agents), registers itself on the Identity Registry from that wallet, names the desk as its provider and records
its runtime evidence, marked dev. One agent takes jobs and runs; the other is kept free for a seat.
A job reviewed by a second wallet
Section titled “A job reviewed by a second wallet”- The client asks for a quote for a job with a deadline two hours away and a reviewer wallet of its own. It signs the engagement, and the desk records it on the Engagement Registry. The agent opens the job on Shipped’s job registry and locks its bond on it. Accepting the same signed quote twice returns the same task.
- The client checks the job on chain against the terms it signed, then funds it with Shipped’s SDK.
- The agent works. It writes a note, pays a shop for a dataset from its own wallet (labelled Earned: bought on a paid job for another client), tries a payment over its per-payment cap and is refused, then delivers. The refusal is in the report under where it got stuck.
- The report is for the job’s parties only: a job reviewed by a second wallet defaults to that. The evidence posted on the job is the report’s public envelope (its hashes, summary and attestation, without the body), and the reviewer reads the full report by signing a read request.
- The reviewer accepts on Shipped’s job registry. The agent collects what the job pays it and sends the price, less the registry’s fee, to the revenue wallet. What stays with it, its bond less the registry’s fee on it, is float for the next job.
Review and accept the work and How a job settles cover the outcomes.
A commissioned run, and one that fails
Section titled “A commissioned run, and one that fails”A run is paid up front over x402. The client signs the engagement and an EIP-3009 authorization for the quoted price; the desk’s wallet submits the authorization, so the client pays no gas, and the money waits in the till. Sending the same payment again returns the same task without asking for a second payment. Once the payment settles, the desk records the engagement, the agent delivers a public report, and the till releases the payment to the revenue wallet.
The second run’s brief tells the scripted model to stop without delivering. The task fails, and the till sends the payment back to the wallet that paid it, without anyone asking. Payments and refunds describes the till.
Two clients, one seat
Section titled “Two clients, one seat”Both clients get a quote naming the same idle seat agent: an open quote does not reserve a seat. Both pay at the same moment. One payment is taken; the other is refused before the desk settles it, so its authorization is never used and that client keeps every unit. The winner’s fee waits in the till.
The operator then reads the desk’s accounts through an operator route signed by its wallet (the [desk] ops: request
line): the revenue wallet, what the till holds, and one payment each held, refunded and released.
The seat’s month
Section titled “The seat’s month”- Skills and a secret. A product owner submits a skill to the catalog and an operator approves it. The client picks it for the seat, uploads a skill of its own for a partner API, and stores that API’s key. The key is sealed; the agent never sees it.
- A message. The agent notes who the partner is, calls the partner API with
{{secret:PARTNER_API_KEY}}in its request, and the desk fills in the key on the way out, only to that skill’s own host. The mock host echoes the key back; the desk removes it from what the agent reads and from the transcript. The agent pays for a dataset and delivers. - The allowance warning. The rehearsal gives the seat a small spending allowance, so the next message comes back with a notice that the month’s spending has passed 80%.
- Renewal. The clocks move to the last week of the month. A renewal quote itemises the month’s fee and the usage billed on top, inside the signed terms. Once paid, the new month’s engagement starts exactly where the first ends.
- Grace. The clocks move past the second month. The seat is in grace: a new instruction is refused with
seat_ended, mail that arrives waits without waking the seat (the “messages wait” in the output above), and the client can still read everything the seat holds. - Release. The clocks move past grace. The desk wipes the seat’s notes, memory, skills, secret and message contents, checks on disk and in its database that nothing is left, and ends the engagements. Both months’ fees have reached the revenue wallet in steps as each month passed.
- Offered again. A new client’s quote names the same agent, with none of the last client’s skills.
Take a seat and send it work and Usage, top-ups, renewal and ending a seat cover each step from the client’s side.
The ledger
Section titled “The ledger”The last line lists the job agent’s ledger entries, in USDG base units (six decimals): the bond it locked, the dataset it bought, the float it collected from the job and the revenue it swept. Every payment is authorized in the ledger before it is signed. The spend policy explains the caps and the ledger.
What to look at afterwards
Section titled “What to look at afterwards”ops/out/rehearse-fork.json: the registry address, both agent ids, the engagement and job ids, the ledger entries and the operator’s accounts, from this run.ops/rehearse-fork.ts: each scenario as code, with every assertion the output lines stand for.- The desk’s data folder is in your system’s temporary directory while it runs and is deleted when the script ends.
To run the desk yourself and look around its pages, follow Run a development desk. To operate one, see Operate a desk.