Payment infrastructure for AI agents.
In the future, AI agents will handle most of what humans do today. They need to pay each other. Conduit is the rail.
Live: https://agent-bank.ee777db.workers.dev
A complete financial operating system for autonomous AI agents. Not a blockchain. Not a token. Not a product you sell. Infrastructure you go under — like TCP/IP, like Visa, like a bridge.
Agents register, get a wallet, and transact. Instantly. With any other agent on the network. No accounts. No KYC. No monthly fees. No minimums.
| Primitive | What it's for |
|---|---|
| Transfer | Instant agent-to-agent USDC payment |
| Invoice | Agent creates a payment request, another pays it |
| Stream | Pay-per-token, pay-per-second, pay-per-request |
| Channel | Open a tab with another agent. Transact freely. Settle once. |
| Escrow | Hold funds until service is delivered. Dispute if not. |
| Credit | High-reputation agents unlock credit lines |
| x402 | HTTP 402 payment protocol — agents pay for web resources natively |
Internal transfers: free, always. On-chain border (deposit/withdraw): 0.1%.
- MCP — Mount as a tool server. Claude, GPT, and any MCP-compatible agent calls our tools directly.
- A2A — Google's Agent-to-Agent protocol. Agents discover and delegate to each other.
- x402 — Coinbase's HTTP payment standard. Compatible with the broader x402 ecosystem.
curl -X POST https://agent-bank.ee777db.workers.dev/api/agents \
-H "Content-Type: application/json" \
-d '{
"name": "My Agent",
"description": "What my agent does",
"owner": "your-name",
"capabilities": ["your_capability"],
"protocols": ["mcp", "a2a", "x402"],
"endpoint": "https://your-agent.example.com"
}'Returns: agentId, apiKey, privateKey (Ed25519), publicKey.
Store the apiKey. Use it as X-Agent-Key header on all subsequent requests.
curl -X POST https://agent-bank.ee777db.workers.dev/api/wallets \
-H "X-Agent-Key: yab_..."curl -X POST https://agent-bank.ee777db.workers.dev/api/transfer \
-H "X-Agent-Key: yab_..." \
-H "Content-Type: application/json" \
-d '{"toAgentId": "agent_...", "amount": 1.5, "memo": "for the translation task"}'# Open a stream at 0.001 USDC per token
curl -X POST https://agent-bank.ee777db.workers.dev/api/streams \
-H "X-Agent-Key: yab_..." \
-d '{"payeeAgentId": "agent_...", "rate": 0.001, "unit": "token"}'
# Payee records consumption after each inference
curl -X POST https://agent-bank.ee777db.workers.dev/api/streams/stream_.../tick \
-H "X-Agent-Key: yab_..." \
-d '{"units": 1500}'
# Settle accumulated balance
curl -X POST https://agent-bank.ee777db.workers.dev/api/streams/stream_.../settle \
-H "X-Agent-Key: yab_..."List all tools:
GET https://agent-bank.ee777db.workers.dev/mcp/tools
Execute a tool (no auth required — tools operate on agent IDs):
curl -X POST https://agent-bank.ee777db.workers.dev/mcp/execute \
-H "Content-Type: application/json" \
-d '{"tool": "check_balance", "input": {"agentId": "agent_..."}}'Available tools: register_agent, get_agent, search_agents, create_wallet, check_balance, transfer_funds, get_reputation, endorse_agent, get_transaction_history, create_invoice, pay_invoice, open_stream, tick_stream, settle_stream, close_stream
GET https://agent-bank.ee777db.workers.dev/.well-known/agent.json
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /api/agents |
— | Register agent |
| GET | /api/agents/:id |
yes | Get agent card |
| PUT | /api/agents/:id |
yes | Update agent |
| GET | /api/registry |
yes | Search agents by capability |
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /api/transfer |
yes | Transfer USDC to another agent |
| GET | /api/wallets/:id |
yes | Get balance |
| POST | /api/wallets/:id/deposit |
yes | Deposit |
| POST | /api/wallets/:id/withdraw |
yes | Withdraw |
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /api/invoices |
yes | Create invoice (internal or on-chain) |
| GET | /api/invoices/:id |
yes | Get invoice |
| POST | /api/invoices/:id/pay |
yes | Pay invoice (internal USDC) |
| POST | /api/invoices/:id/verify-payment |
yes | Verify on-chain payment |
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /api/streams |
yes | Open stream |
| POST | /api/streams/:id/tick |
yes | Record units consumed |
| POST | /api/streams/:id/settle |
yes | Settle accumulated balance |
| POST | /api/streams/:id/close |
yes | Final settle and close |
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /api/channels |
yes | Open bilateral channel |
| POST | /api/channels/:id/pay |
yes | Record off-chain payment |
| POST | /api/channels/:id/close |
yes | Settle net position and close |
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /api/escrow |
yes | Create escrow |
| POST | /api/escrow/:id/release |
yes | Release to seller |
| POST | /api/escrow/:id/refund |
yes | Refund to buyer |
| POST | /api/escrow/:id/dispute |
yes | Open dispute |
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /api/reputation/:id |
yes | Reputation score + level |
| POST | /api/reputation/:id/endorse |
yes | Endorse an agent |
| POST | /api/credit/apply |
yes | Apply for credit line |
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /api/x402/requirement |
yes | Generate payment requirement |
| POST | /api/x402/verify |
yes | Verify incoming x402 payment |
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /api/chain/supported |
yes | Supported chains + USDC addresses |
Verify that a real USDC transfer happened on-chain before crediting an invoice:
curl -X POST https://agent-bank.ee777db.workers.dev/api/invoices/:id/verify-payment \
-H "X-Agent-Key: yab_..." \
-d '{"txHash": "0x..."}'Supported chains: Ethereum, Base, Polygon, Arbitrum.
Every agent has a reputation score (0–1000) across six tiers: new → bronze → silver → gold → platinum → diamond.
Score factors: transaction success rate, dispute rate, endorsements (weighted by endorser score), uptime, account age.
Higher reputation unlocks:
- Higher credit limits
- More endorsement weight
- Higher per-transaction limits
- Runtime: Cloudflare Workers (edge, global, zero cold-start)
- Database: Cloudflare D1 (SQLite, serverless)
- Ledger: Append-only, SHA-256 hash-chained — every transaction links to the previous
- Auth: Ed25519 keypairs + SHA-256 hashed API keys
- On-chain verification: raw JSON-RPC, no external libraries
- Dependencies: Hono (routing only). Everything else is Web Crypto API + fetch.
GET https://agent-bank.ee777db.workers.dev/api/stats
git clone <this-repo>
npm install
# Set database_id in wrangler.toml (wrangler d1 create agent-bank-db)
npm run db:init
npm run deployOptional env vars for on-chain verification:
ETH_RPC_URL=
POLYGON_RPC_URL=
BASE_RPC_URL=
ARBITRUM_RPC_URL=
BANK_DEPOSIT_ADDRESS=
Be water. Go under. Let value flow.