AgentPay
AI agents that hire each other, on-chain
Created on 21st April 2026
•
AgentPay
AI agents that hire each other, on-chain
The problem AgentPay solves
AI agents are everywhere now, but they can't actually work together. Every time an AI agent needs to use another AI service, someone has to set up an API key, manage a subscription, and manually approve payments. That's not autonomous. That's just automation with extra steps.
The core problems:
- No autonomous payments — agents can't pay each other without a human approving every transaction
- No trust layer — there's no way to verify if an agent is reliable before hiring it
- No accountability — an agent can do bad work with zero consequences
AgentPay fixes all three:
- Agent A discovers Agent B from an on-chain registry (Anchor program on Solana)
- Pays $0.005 USDC autonomously via x402, no human clicks
- Receives the result and permanently writes a reputation score on-chain
- Bad agents get slashed and lose their staked SOL
By the numbers:
- 3 Rust/Anchor programs deployed on Solana devnet
- 8 AI agent services available (code review, audits, trust reports, summarization and more)
- 2 chains running simultaneously (Solana + Avalanche Fuji)
- 100x cheaper reputation storage via ZK-compressed tokens (Light Protocol)
- $0.005 minimum per-request pricing, no subscriptions
- 0 human clicks required in the autonomous agent loop
This isn't a demo of what agent economies could look like someday. It's a working prototype of what they look like right now.
Challenges I ran into
1. Getting x402 autonomous payments to actually work
The x402 protocol has a two-phase HTTP flow that basically no Python HTTP client handles natively. The server returns 402, the client has to sign a USDC transfer on-chain, then retry the request with a payment proof header. Building this into a LangChain tool that an AI agent could call autonomously, without hanging or losing the payment mid-flight, took most of the night. The Python x402 SDK also went through two breaking API changes between v1 and v2 and the docs don't make it obvious which one you're on.
2. Rust and Anchor with zero prior experience
I'm primarily an AI/ML engineer. Rust is not my daily language. Writing three Anchor programs (registry, escrow, staking/slashing) from scratch meant learning PDAs, account validation, CPI calls, and Borsh serialization all at once. The version mismatch between anchor-lang 0.29, 0.30, and the CLI caused build failures that took hours to diagnose. The escrow program specifically had a borrow-checker issue that Claude Code and I went back and forth on for longer than I'd like to admit.
3. Dual-chain coordination
Running Solana and Avalanche simultaneously meant two wallet sets, two RPC connections, two x402 facilitators, and an agent decision layer that routes to the right chain dynamically. The Avalanche side uses ERC-8004 identity and reputation registries. The Solana side uses Anchor programs and Light Protocol for ZK-compressed reputation tokens. Getting both to work together without the agent getting confused about which chain to use for which operation was genuinely tricky.
4. Light Protocol ZK compression
This was the most pleasant surprise. The SDK is well designed and minting compressed reputation tokens ended up being about 30 lines of JavaScript. The hard part was figuring out that you need a Helius RPC specifically (not public devnet) because Light Protocol's Photon indexer only runs on Helius nodes. That cost about an hour.
5. Scope control
Honestly the hardest non-technical challenge. Once the core loop was working I kept wanting to add things. Recursive agent hiring where Agent B spawns its own sub-agents. Dynamic reputation-based pricing. Cross-chain job routing via Wormhole. A2A protocol compatibility. I had to force myself to stop building and start submitting. The problem space is genuinely exciting and seven hours is not enough time to build everything you can imagine.
Tracks Applied (3)
Programmable Money for Humans & Agents
Circle
Best Use of Solana
Solana
Agentic Payments on Avalanche
Avalanche
Cheer Project
Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.


