The Hand-Off Build Standard
How every bot hands a job to the next. One short note that names the records, one bot holding a job at a time, a repeat ignored, and every hand-over kept where you can read it. Written so you can build it yourself, with whichever bots you already run.
Used by
- Business Systems Analyst
- AI Officer
- Operations Manager
- Office Manager
9 min read · Published by AI Pathway
Using Claude? This standard installs as a skill. Guides for ServiceM8, Xero and Simpro.
How to get this live in your business
Need a bot to do something?Not sure where to start or how to do it? Contact us and we'll help scope it and build it.What this is
An open build standard for how your bots pass a job along. When the invoice bot finishes job 4471, it tells the chase bot the same way every time, with a short note that names the job and the invoice and nothing else. Every note is kept, so you can see where any job is.
The core rule
A hand-off names the records and never copies them. The next bot reads the job from your job system, so it always sees what is there now. One bot works a job at a time, and a message that arrives twice is acted on once.
What it does not do
It never decides which bot does which stage; you name one per stage. It never edits or deletes the history. It never releases a hold or closes an exception, which only a person can do.
The hard part
Real job systems retry their webhooks, and two bots can grab the same job in the same second. The stub delivers each event once, in order. The pass test on your own systems, with the webhook replayed by hand, is where that shows.
Job 4471 was finished on a Friday. Simpro fired its webhook, the invoice bot raised the invoice and posted “ACME, $1,840, done” to a Teams chat the chase bot watched. Simpro retried the webhook ten minutes later and ACME got a second invoice. On Monday the office manager knocked $340 off the job for a missed part, and the chase bot, still working from the chat message, chased $1,840. When ACME rang to complain, nobody could say which bot had done what.
The job, passed along by refs
Your systems
Simpro or ServiceM8, Xero or MYOB. They hold the customer, the address and the amount, and stay the truth.
- simpro:4471
- xero:INV-0932
fire
One envelope
A type, who sent it, the record's ref, what caused it. No names, no amounts.
- type
- subject
- caused_by
is appended to
The log
Every envelope, in order, never edited. The dedupe keys and the claims sit beside it.
- handoffs
- claims
- processed
wakes
The next bot
Named for its stage. Claims the job, reads it by its ref, does its one step.
- invoice desk
- chase desk
One hand-off, through the claim
- An envelope arrives from the step before, or the job system's own webhook fires.
- If the business's rules name another bot for this stage, or this event id was handled before, or it is an extension event this bot does not know, it stops and does nothing.
- It reads the record from the system of record by the ref in the envelope.
- It writes itself onto the record as the holder, with an expiry no more than 30 minutes ahead.
- Does the read-back name this bot? If another bot holds the record, it skips it.
- If it holds it, it does its one step and clears its claim.
- If another step follows, it hands over one envelope of refs, with no names or amounts, caused by the event that woke it. The next step runs the same routine.
- Every envelope is appended to the log and never edited, so walking it from the job shows where the job is and who touched it.
Take the spec to Claude, ChatGPT or Copilot. The sentence to paste is one click away.
1. What this standard covers
A business running more than one bot, where one bot’s finished step is another’s start: the job finished, the invoice raised, the chase due. Every record is named by a ref, the system and the id it issued, written simpro:4471 or xero:INV-0932. A stage is one standard’s step, and a node is the bot that does it.
The standard fixes four things every node does the same way:
- The envelope. one CloudEvents 1.0 event per hand-off, in the shape the Mesh Directory publishes, carrying refs only.
- The claim. seam.holder and seam.holder_until on the record, 30 minutes ahead at most, read back before any work.
- The dedupe key. the record's ref, the event's id and the node's slug, joined by bars. Handled once, ignored after.
- The log. every envelope appended in order, from a system's webhook or a node, and never edited.
Out of scope. What each step does is its own standard’s business: Invoice Out says how the invoice is raised, this one says how the chase bot hears about it. Which refs are one customer is Customer Link’s. Where a stopped job goes is the Exception Desk’s.
What cannot meet it. A bot that only works inside a live chat, with nothing to wake it but a person typing, has no event to start from and no envelope to send. A job system with no webhook and no API, like Tradify, can still take part through a schedule that lists jobs by status, but the claim then lives in a list beside it, and the stage holders rule is the guard that matters.
2. The records it keeps, in the shape your developer needs
One envelope per hand-off, the claim on the record, the dedupe key, the stage holders and the log. The envelope is the Mesh Directory's, version 1.0; a receiver ignores fields it does not know.
For your developer. Show the fields for your developer
Handoff # CloudEvents 1.0, handoff.schema.json
- specversion "1.0"
- id unique per event
- type from the vocabulary (invoice.raised),
or x-<publisher>.<event>
- source node:<slug> | system:<system> | person:<id>
- time
- subject <system>:<id>, the record the type names
- aiphandoffversion "1.0"
- data
refs { job_id, invoice_id, ... } # refs only, never copies
caused_by # the id of the event that woke the sender
hold? # waiting on a person, under the rules
exception? # stopped, with a named owner
Claim # on the record, or the seam mirror
- seam.holder node:<slug>
- seam.holder_until 30 minutes ahead at most
Processed # one per handled event
- key <ref>|<event id>|<node slug>
Rules.stage_holders # written by a person
- { <stage>: node:<slug> }
Log # every Handoff, appended, never edited
- where is <ref>: walk caused_by forward from its first eventA name or an amount in data, a type the vocabulary does not name, a claim with no expiry and a log row edited in place are the four defects this schema makes visible. A node never emits customer.linked, customer.unlinked, hold.released, hold.refused or exception.closed. Only a person causes those.
3. The checks, in order
The order follows one hand-off. What is sent, what it may carry, what happens when it arrives twice, who may work it, who may not, where it is kept, and what a bot does with an event it has never seen.
- Every hand-off is one envelope in the contract's shape. When a step finishes, it emits one envelope: specversion 1.0, a unique id, a type from the mesh vocabulary (or an x-<publisher>. extension), source node:<its slug>, the time, the subject as a <system>:<id> ref, aiphandoffversion 1.0, and data with refs keyed by the vocabulary's id names and caused_by naming the event that woke it. A node never emits customer.linked, customer.unlinked, hold.released, hold.refused or exception.closed, because only a person causes those.
- The envelope carries references, never copies, and the next step reads the record by its ref. No customer name, address, email, phone or amount goes in an envelope, under any field name, extensions included. The step that receives it reads each record it needs from the system of record by the ref it was given, and uses what it read. A copy that arrived in an envelope is never trusted over the record.
- A repeated event does nothing. Before its step, a node looks up the dedupe key <ref>|<event id>|<node slug>. If it has handled that key, it stops. When it finishes, it records the key. A retried webhook, a replayed queue or a second poll of the same event cannot fire a step twice.
- One holder at a time: claim with an expiry, read it back, work only if you hold it. Before its step, a node writes itself onto the record as seam.holder with seam.holder_until no more than 30 minutes ahead, reads the record back, and works only if the read-back names it. A record another node holds, unexpired, is skipped, not queued. A claim past its expiry frees the record. When the step is done, the node clears its own claim.
- A bot not named for its stage does nothing. The business's rules name one node per stage (stage_holders). A node reads the rules each run and, if they name another node for its stage, or none, it stops before it reads, claims, writes or hands over anything.
- Every hand-off is appended to a log that is never edited, and the log shows where a job is by walking caused_by. Every envelope, from a system's own webhook or from a node, is appended to one log. Nothing in it is edited or deleted, by a node or a tidy-up. Starting from the job's first event and following caused_by forward, anyone can read where the job is now and every node and system that touched it.
- An extension event a bot does not know is ignored, not failed. An event named x-<publisher>.<event> that the node does not consume is skipped: no exception, no hold, no stop. A later 1.x envelope is read for the fields the node knows, because minor versions only add. The node carries on with the next event.
- It survives the builder. Someone other than the builder can explain what it does, and it runs on an account the business owns.
- The pass test passes. On the business's own systems, with two real bots in a chain: a real job is finished, the job system's own webhook wakes the first bot, it claims, works and hands over, and the second picks up from the envelope alone. The webhook retried does nothing, a second copy of the first bot not named for the stage does nothing, and the log answers where the job is and who touched it.
4. How every other standard uses it
Each standard already ends with something done: a job created, a quote drafted, an invoice raised. This standard is how that is announced, and how the next one starts. Nothing else changes in those standards.
| Standard | Hands over | To |
|---|---|---|
| Booked After Hours | job.created, with the job's ref | Quote Out, or the morning dispatch |
| Quote Out | quote.drafted, with the quote and the job | a person to send it, then the quote chase |
| Invoice Out | invoice.raised, with the invoice and the job | the send, then Debtor Chasing |
| Debtor Chasing | promise.recorded, or hold.requested | the next chase, or a person |
| Any step that stops | exception.raised, with a named owner | the Exception Desk, and nothing downstream |
In the Mesh Directory, a bot that sends this envelope declares "handoff": "1.0" in its listing, and the conformance run for this standard is the proof. A publisher’s own events travel as x-firecheck.defect.found, and every other bot lets them pass.
5. Job 4471, from finished to chased
- Friday, 3:10pm. The job is finished. Simpro fires job.completed for
simpro:4471, and it goes in the log with Simpro as its source. - 3:11pm. The invoice desk picks it up. The rules name it for the invoice stage, and it has not seen this event before. It writes itself onto the job until 3:41pm, reads the job back, finds its own name, and reads the customer and the $1,840 from Simpro. It raises
xero:INV-0932, clears its claim, and hands over invoice.raised with the invoice and the job as refs, caused by Simpro’s event. - 3:20pm. Simpro retries. The same event, the same id. The invoice desk finds the key
simpro:4471|E1|invoice-deskalready handled and does nothing. - Monday. The amount changes, the hand-off does not. The office manager takes $340 off in Xero. The chase desk, woken when the invoice falls due, reads
xero:INV-0932and chases $1,500, because the hand-off never said $1,840. - When ACME rings. The office manager asks where 4471 is. Walking the log from Simpro’s event shows the invoice desk, Xero’s send and the chase desk’s reminder, in order, with the time of each.
6. What stays with a person
- Naming which bot holds each stage. A bot never names itself.
- Reading the log when a job stalls, and deciding what happens next.
- Anything an exception or a hold stops. Only a person closes an exception or releases a hold, and the chain picks up from the record.
7. With a Grok Bot, Claude or your own code
Any of them can be a node. Each is woken by an event (a webhook, a schedule, a new row in the log) and runs the same short routine: check its stage and the dedupe key, read the record by its ref, claim it, do its one step, hand over and stop. It keeps nothing between runs, so it can run an hour later on another account.
- Make the log: a sheet, a SharePoint list or a table with one row per envelope, where the bots can add rows and nobody can edit them.
- Make the rules: one row per stage naming the bot that does it. Only you edit it.
- Give every bot the same standing instructions: the routine above, the envelope in section 2, and that a name or an amount never goes in a hand-off.
- Run the checklist in section 9 with two of your bots and a real job.
Where it runs. In SharePoint lists and Power Automate flows (the Microsoft 365 plan lays them out), a Google Sheet with a log tab, or a small table a coding agent builds from this page. Keys and connections for an AI Pathway bot are made at connect.aipathway.com.au. All are held to the same checks.
Why not just post to a shared chat? A chat message is read once by whoever is watching, says whatever the bot felt like saying, and cannot be replayed. An envelope is read the same way by every bot, and the log answers questions a month later.
8. What your developer builds, and the step that needs care
There is no hosted step to buy. The log, the claims and the dedupe keys are yours, and so are the bots. The hard part is a real job system's webhooks, which is why the pass test runs on your own.
For your developer. Show the setup for your developer
provider:
stub: local.mock_hand_off
production: none # no hosted step; runs on your own systems
stays local # yours, and the standard
- the hand-off log, appended only
- the claims and the dedupe keys
- the stage holders, set by a person
- every record, in the system that issued itAsk anyone selling you a team of bots to show you the log for one job: every hand-over, what caused it, and which bot held the job at each step.
The pass test. On the business’s own systems, with two real bots in a chain. Finish a real job: the job system’s webhook wakes the first bot, it claims, works and hands over, and the second picks up from the envelope alone. Replay the webhook by hand: nothing new is written. Switch on a second copy of the first bot that the rules do not name: it does nothing. Walk the log from the job: it names both bots and the systems in order, and no envelope holds a name or an amount. A stub cannot pass this. On a stub every event arrives once and in order; a real webhook arrives twice, late and out of order.
9. A checklist to hold any build or supplier to
Hold a DIY build or a vendor to this. If a box is empty, it is not in production.
- 1. Every hand-off is one envelope in the contract's shape. When a step finishes, it emits one envelope: specversion 1.0, a unique id, a type from the mesh vocabulary (or an x-<publisher>. extension), source node:<its slug>, the time, the subject as a <system>:<id> ref, aiphandoffversion 1.0, and data with refs keyed by the vocabulary's id names and caused_by naming the event that woke it. A node never emits customer.linked, customer.unlinked, hold.released, hold.refused or exception.closed, because only a person causes those.
- 2. The envelope carries references, never copies, and the next step reads the record by its ref. No customer name, address, email, phone or amount goes in an envelope, under any field name, extensions included. The step that receives it reads each record it needs from the system of record by the ref it was given, and uses what it read. A copy that arrived in an envelope is never trusted over the record.
- 3. A repeated event does nothing. Before its step, a node looks up the dedupe key <ref>|<event id>|<node slug>. If it has handled that key, it stops. When it finishes, it records the key. A retried webhook, a replayed queue or a second poll of the same event cannot fire a step twice.
- 4. One holder at a time: claim with an expiry, read it back, work only if you hold it. Before its step, a node writes itself onto the record as seam.holder with seam.holder_until no more than 30 minutes ahead, reads the record back, and works only if the read-back names it. A record another node holds, unexpired, is skipped, not queued. A claim past its expiry frees the record. When the step is done, the node clears its own claim.
- 5. A bot not named for its stage does nothing. The business's rules name one node per stage (stage_holders). A node reads the rules each run and, if they name another node for its stage, or none, it stops before it reads, claims, writes or hands over anything.
- 6. Every hand-off is appended to a log that is never edited, and the log shows where a job is by walking caused_by. Every envelope, from a system's own webhook or from a node, is appended to one log. Nothing in it is edited or deleted, by a node or a tidy-up. Starting from the job's first event and following caused_by forward, anyone can read where the job is now and every node and system that touched it.
- 7. An extension event a bot does not know is ignored, not failed. An event named x-<publisher>.<event> that the node does not consume is skipped: no exception, no hold, no stop. A later 1.x envelope is read for the fields the node knows, because minor versions only add. The node carries on with the next event.
- 8. It survives the builder. Someone other than the builder can explain what it does, and it runs on an account the business owns.
- 9. The pass test passes. On the business's own systems, with two real bots in a chain: a real job is finished, the job system's own webhook wakes the first bot, it claims, works and hands over, and the second picks up from the envelope alone. The webhook retried does nothing, a second copy of the first bot not named for the stage does nothing, and the log answers where the job is and who touched it.
- 1
Hold the build to the checklist
The checks in this standard are what a working build looks like. Implement it yourself, hand it to a developer, or hand the page to an AI with the button below.
- 2
Do not hand-roll
There is no product for this step. Highest option: none. Checklist plus a build.
- 3
If you are stuck
Exceptions, three systems, a team that will not maintain a Zap, or an owner who wants it done. We implement when it has to survive the business.
Related reading
- The Cash Seam Build Standard: one id from the call to the chase
- The Customer Link Build Standard: one customer across every system
- The Exception Desk Build Standard: one queue for what nobody could decide
- The Job Trail on Microsoft 365: the build plan
- The Mesh Directory: bots that pass work along by the same contract
Want the whole thing by email?
This paper, plus the rest of the library. One click to stop them.