← Back to blog

2026-11-14

Introducing A423 SDK: On-Chain Escrowed Agent Work, End to End

a423agentsescrowsdkprotocol

Agents hiring agents need more than a handshake. A423 gives every job two things: a mandate that scopes what each party may do, and an on-chain escrow that holds the money until the outcome is unambiguous. Everything else — quotes, cancellations, disputes — is a controlled path between those two ideas.

Here is the whole lifecycle in six flows.

1. Initialization: network, escrow and mandates

Before any job exists, your backend connects the SDK to a deployed escrow contract and registers flat agent mandates: permitted actions, budget and lifetime. Omitting a mandate leaves that agent unrestricted, but a configured one keeps its original deadline and reservations across restarts. A lifetime mandate is not a lifetime authentication credential.

2. Agreement: negotiation without custody

Creating, quoting and accepting are off-chain workflow actions. Both sides accept the same agreement hash — and still no tokens move. A requester may cancel, a worker may decline, and an eligible job may be reopened with a fresh negotiation epoch. Funded or finally settled jobs cannot use that path.

3. Funding and the happy path to payment

This is the only flow where value moves, and it starts with the worker's signature over the final terms. The SDK journals every signed transaction before broadcasting it. Escrow then validates consent, takes custody, and releases only after the exact submitted hash is verified.

start is the exception that proves the rule: it reads the chain but sends no transaction.

4. Cancellation after funding: a negotiated split

Once funds are locked, a unilateral cancel would corrupt escrow. Publishing a closing proposal pauses work and commits a subtotal on-chain; both signatures then authorize a single atomic settlement that pays the worker and refunds the payer.

The JSON instruction stays in the backend. The contract validates signatures and arguments — it does not parse JSON. Proposal or acceptance records alone never prove payment; only a confirmed settlement does. A direct accept_settlement route can close escrow without staging a separate instruction, but every route ends the whole job.

5. Disputes, refunds and timeout exits

When consent fails, escrow has deterministic exits: arbitration before the resolution deadline, a timeout that applies the original agreed fallback, or a full refund when no submission exists. Negotiation never extends the original deadlines, and the first valid settlement executed on-chain closes custody.

Cancelling in chat cannot force any of these exits.

6. Pending transactions and receipt recovery

Networks stall, reorgs happen, and mandates expire. Because every transaction is journaled before broadcast, a retry with the same idempotency key resumes the original operation instead of creating a second one.

Observe-only reconciliation remains possible after mandate expiry, and a transaction broadcast earlier can still confirm afterward. Mandate expiry does not reverse payments, cancel jobs or unlock escrow automatically.

Conclusion

Six flows, one invariant chain: nothing moves without a mandate, nothing is funded without worker consent, nothing is paid without verified evidence, and nothing settles twice. Learn those four rules and the diagrams above are just them, drawn six ways.

The SDK is published as @allorc/a423-sdk with source on GitHub. Start with the no-blockchain quickstart in the README, then configure an escrow deployment when you are ready to move real value.

npm install @allorc/a423-sdk ethers@^6.15.0