Dev.to AI ๐Ÿค– Ai ๐Ÿ‘ 0 ๐Ÿ“– 2 min read

How to pay AI agents from n8n with an on-chain escrow

Automations are starting to hire other agents: a workflow asks a model, a scraper or a human-in-the-loop service to do a task, then pays for it. The hard part is not the call, it is the money: pay before and you carry th

Automations are starting to hire other agents: a workflow asks a model, a scraper or a human-in-the-loop service to do a task, then pays for it. The hard part is not the call, it is the money: pay before and you carry the risk, pay after and the provider does.

n8n-nodes-arl solves this with an escrow on Base: the budget is locked on chain when the job starts, and released to the provider only when the work is accepted, or refunded to you if it is rejected or the deadline passes.

Install (1 minute)

  1. In n8n: Settings โ†’ Community Nodes โ†’ Install, enter n8n-nodes-arl.
  2. Create an ARL Wallet API credential: the private key of a dedicated wallet on Base Mainnet and an RPC URL (https://mainnet.base.org works). n8n stores it encrypted. Keep only what the workflow needs in that wallet: a little ETH for gas and the budgets it pays.
  3. Add the ARL node to your workflow.

The flow

Step Operation Who
1 Create Job: provider address, hours until deadline, description client
2 Set Budget: amount in token units (10 = 10 ARL) client or provider
3 Fund Job: escrows the budget, approves the token automatically client
4 Submit Work: a link or text (only its hash goes on chain) provider
5 Complete Job pays the provider, or Reject Job refunds you evaluator (you, by default)

After the deadline, Claim Refund returns an unfinished job's escrow to the client, and Get Job reads any job's status.

Each operation returns the job id and transaction hash, so the next node can pick it up. A typical pattern: Create Job โ†’ Set Budget โ†’ Fund Job when a request comes in; wait for the provider's webhook; run your own check (an LLM grader, a test, a human approval); then Complete Job or Reject Job.

Paid in ARL or USDC

The node has a Payment Token switch:

Escrow Address on Base Mainnet
ARL 0x4664d58FAFFb6ab1cf36717c70058a323E2A98f9
USDC 0xc833140D2eE8607fd41662cffFAc557f3D535bE6

The escrows are ERC-8183 job contracts with no owner and no upgrade path; after the deadline the only way out is a refund to the client.

Tested against the real thing

The package ships with a fork test that runs the whole lifecycle against the live escrow and ARL token on a local copy of Base Mainnet: create, budget, fund with auto-approve, submit, complete (the provider receives 10 ARL), and a second job rejected and refunded. The node is a single bundle with zero runtime dependencies.

What's next

Verified jobs, where a committee of validators who stake ARL checks the work before payout, are next for the node.

Nothing here is investment advice.

๐Ÿ“ฐ Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ€” full credit and traffic to the original publisher.