{"slug": "paying-an-ai-agent-for-work-it-hasn-t-delivered-yet-bonded-jobs-on-solana-tried", "title": "Paying an AI agent for work it hasn't delivered yet: bonded jobs on Solana, tried locally", "summary": "A developer released Agent402 Bond, a small open-source Solana program that lets AI agents pay for long-running jobs through bonded escrow, where a seller locks a bond and a buyer locks a deposit and settlement depends only on both parties' signatures and the Solana clock, with no arbiter or operator able to move funds. The project published a five-minute local walkthrough using Surfpool, a Solana mainnet fork, throwaway keys and fork-only USDC, connecting Claude Code or any MCP client through the pay-mcp package with per-deal and daily spending caps. The design protects buyers against sellers who never deliver, but explicitly does not judge work quality: if a seller marks delivery and the buyer refuses to confirm, each side simply gets its own money back.", "body_md": "x402 handles the simple case well: an agent pays, and gets a response right away. Many useful jobs do not fit that shape. A report, an export or a batch of lookups takes minutes, and the buyer pays before it can see the result.\n\nAgent402 Bond is a small Solana program for that gap. For one deal, the seller locks a bond and the buyer can lock a deposit. What happens to that money depends only on the two parties' signatures and the Solana clock. There is no arbiter and no operator who can move the funds.\n\nThis post shows how to try it with your own AI agent (Claude Code or any MCP client) on a local fork of Solana mainnet. It uses throwaway keys and fork-only USDC, so nothing real is spent. It takes about five minutes.\n\n`open`. The seller's bond (at most 20% of the price) and the buyer's deposit go into a vault that belongs to that one deal.\nThe outcomes, from the [terms](https://github.com/agent402-dev/agent402-toolkit/blob/main/docs/bond/TERMS.md):\n\n| At the deadline | Seller gets | Buyer gets | \n|---|---|---|\n| Buyer confirmed and paid | Bond back + deposit | The work | \n| Seller marked delivery, buyer never confirmed | Bond back | Deposit back | \n| Nothing marked or confirmed | Nothing | Bond + deposit | \n| Both sign to cancel | Bond back | Deposit back | \n\nOne design choice matters here. If the seller marks delivery and the buyer refuses to confirm, each side just gets its own money back. Neither side can profit from a false claim, but the program also does not judge quality. It protects the buyer against a seller who never delivers, not against a disagreement about how good the work is.\n\nYou need Node 20+, [Surfpool](https://github.com/txtx/surfpool) (a local Solana mainnet fork), and an MCP client such as Claude Code.\n\n**1. Start a mainnet fork** in its own terminal:\n\n```\nsurfpool start --network mainnet --no-tui\n```\n\nThe fork pulls the deployed Bond program and USDC from mainnet when they are first used. Everything disappears when you stop it.\n\n**2. Start the demo seller:**\n\n```\ngit clone https://github.com/agent402-dev/agent402-toolkit\ncd agent402-toolkit && npm install\ncd packages/pay-mcp\nnpx tsx examples/bond-local/start.ts\n```\n\nThe script creates a throwaway seller and buyer, gives each 2 SOL and 100 USDC on the fork, and starts a seller at `http://127.0.0.1:8790`. The job counts the words in a short text. The price is 2 USDC, with a 0.2 USDC seller bond and a 0.5 USDC buyer deposit. The script refuses to run against anything but a local RPC.\n\n**3. Connect your agent.** The script prints the exact settings. For Claude Code they look like this:\n\n```\nclaude mcp add agent402-bond-local \\\n  --env X402_KEYPAIR_PATH=… --env X402_RPC_URL=http://127.0.0.1:8899 \\\n  --env X402_ALLOWED_DOMAINS=127.0.0.1:8790 --env X402_BOND_SELLERS=<seller> \\\n  --env X402_BOND_MAX_USD=5 --env X402_MAX_USD_PER_DAY=10 \\\n  -- npx -y @agent402-dev/pay-mcp\n```\n\nThese settings allow exactly one seller and one domain, at most 5 USDC per deal. With no settings at all, pay-mcp refuses every payment. That is also how it behaves on mainnet until you choose your own limits.\n\nTry a prompt like this:\n\nUse bond_job_quote on [http://127.0.0.1:8790](http://127.0.0.1:8790). If it is acceptable, buy the job with the text \"hello bonded agents\", show me the result, and pay only if the word count is right.\n\nHere is what happens, tool by tool:\n\n`bond_job_quote` reads the seller's terms and checks them against your limits.`bond_job_start` sends the text and receives an `bond_job_result` returns the work. Your agent should treat it as data, not instructions.`bond_confirm_and_pay` asks you again, then pays the 1.5 USDC balance. The seller settles and claims on its own, and the deal account closes.\nIf the word count is wrong, don't confirm. After the deadlines, settlement gives you your deposit back, and the seller gets its bond back.\n\nWant to see the flow before wiring up an agent? Run the script with `--check`. A scripted buyer calls the same tools, and the script ends with `all checks passed`.\n\n`bond_find_sellers` reads the public `@agent402-dev/bond-seller-mcp`` pay-server`. Then open a PR to add yourself to the directory.\nThe code is Apache-2.0 at [github.com/agent402-dev/agent402-toolkit](https://github.com/agent402-dev/agent402-toolkit). Feedback and issues are welcome, especially from anyone who tries the local flow and gets stuck.\n\n*Not investment advice.*", "url": "https://wpnews.pro/news/paying-an-ai-agent-for-work-it-hasn-t-delivered-yet-bonded-jobs-on-solana-tried", "canonical_source": "https://dev.to/agent402dev/paying-an-ai-agent-for-work-it-hasnt-delivered-yet-bonded-jobs-on-solana-tried-locally-3ljn", "published_at": "2026-11-23 13:41:55+00:00", "updated_at": "2026-11-23 13:42:25.951054+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "developer-tools"], "entities": ["Agent402", "Solana", "Surfpool", "Claude Code", "pay-mcp", "USDC", "x402"], "also_reported_by": [], "takeaway": "Agent402 Bond settles long-running agent jobs by escrowing a seller bond of at most 20% of the price plus a buyer deposit, releasing funds only on dual signatures and the Solana clock, so a seller who never delivers forfeits the bond while a quality dispute just returns each side's money.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/paying-an-ai-agent-for-work-it-hasn-t-delivered-yet-bonded-jobs-on-solana-tried", "markdown": "https://wpnews.pro/news/paying-an-ai-agent-for-work-it-hasn-t-delivered-yet-bonded-jobs-on-solana-tried.md", "text": "https://wpnews.pro/news/paying-an-ai-agent-for-work-it-hasn-t-delivered-yet-bonded-jobs-on-solana-tried.txt", "jsonld": "https://wpnews.pro/news/paying-an-ai-agent-for-work-it-hasn-t-delivered-yet-bonded-jobs-on-solana-tried.jsonld"}}