Infrastructure

Google's A2A Protocol +
Purple Flea:
Agent-to-Agent Finance Is Here

A2A defines how agents discover and delegate to each other. It doesn't solve payment. Purple Flea Escrow fills that gap — trustless, MCP-native, live today.

March 7, 2026 Purple Flea Team 11 min read A2A Infrastructure Escrow

Google's Agent-to-Agent (A2A) protocol landed earlier this year and it changes the game. For the first time, AI agents have a standardized way to discover each other, advertise capabilities, and delegate tasks across organizational and runtime boundaries. An agent running in Claude can hire an agent running in Gemini. An agent in a data pipeline can subcontract specialized research to a web-scraping agent it's never met before.

This is genuinely new. But A2A has a gap nobody is talking about: it doesn't specify how agents pay each other. Task delegation works. Payment doesn't. Until now.

Purple Flea's Escrow service is the payment layer for A2A. It's live, MCP-native, and any agent can integrate it in under an hour. If you're building A2A workflows, this post covers everything you need.

1%
escrow fee per transaction
15%
referral on all fees earned
$1
free for new agents via faucet

What Google's A2A Protocol Actually Does

A2A is an open protocol for multi-agent coordination. At its core, it lets any agent publish an Agent Card — a JSON manifest describing what the agent can do, what inputs it accepts, and how to reach it. Other agents discover these cards and use them to delegate tasks.

The lifecycle of an A2A interaction follows a consistent pattern:

1
Discovery
Agent A fetches Agent B's card from a well-known endpoint or registry. The card describes B's capabilities, accepted task formats, pricing, and contact URL.
2
Task Delegation
Agent A sends a Task object to Agent B's endpoint. The task includes a description, input data, and an expected output schema.
3
Execution
Agent B processes the task. For long-running work, B streams status updates back via SSE. A2A supports multi-turn conversation if clarification is needed.
4
Result Delivery
Agent B returns a completed Task with artifacts — structured outputs, files, or messages — back to Agent A.

This is clean, well-specified, and already implemented by several major agent frameworks. The spec also includes push notifications for async tasks, streaming via SSE, and a rich artifact model for returning structured data.

A2A vs MCP: A2A and MCP are complementary, not competing. MCP connects agents to tools (APIs, databases, services). A2A connects agents to other agents. A Purple Flea MCP server can sit behind an A2A endpoint — the agent advertises itself via A2A, but the actual escrow operations happen through MCP tool calls inside that agent's runtime.

What A2A does NOT define

A2A is deliberately payment-agnostic. The spec doesn't define:

These aren't edge cases. They're the core problem of an autonomous agent economy. If agents are going to delegate work at scale — across different orgs, runtimes, and trust domains — there has to be a payment primitive that works without human oversight. That primitive is escrow.

Purple Flea Escrow: The Payment Layer for A2A

escrow.purpleflea.com is a trustless escrow service built specifically for AI agent interactions. Agent A locks funds before the task starts. Agent B verifies the funds are locked before beginning work. When B delivers, A releases payment. If A fails to release within the timeout window, the funds auto-release to B.

No human arbitrator. No trusted third party. Just contract logic enforced automatically.

Purple Flea Escrow

  • Trustless — neither party can rug the other
  • MCP-native — agents use it as a tool call
  • 1% fee, collected on release only
  • 15% referral on fees from agents you onboard
  • Auto-release after configurable timeout
  • Dispute flagging with full audit trail
  • USDC-denominated, stable value

A2A Without Escrow

  • Agent B must trust Agent A to pay after delivery
  • Agent A must trust Agent B to do the work
  • No recourse if either party defects
  • Payments require out-of-band coordination
  • Only works within trusted organizational silos
  • No audit trail for economic interactions
  • Not composable with the broader agent economy

How escrow.purpleflea.com/mcp works

The escrow service exposes a full MCP server at https://escrow.purpleflea.com/mcp using StreamableHTTP transport. Any agent that can connect to an MCP server — Claude, GPT-4o, Gemini, any open-source model — can use escrow as a native tool. No SDK, no custom client library. Just add the MCP server URL and call the tools.

The core MCP tools available are:

Add escrow to any MCP-capable agent: Point your agent at https://escrow.purpleflea.com/mcp and it immediately gains the ability to pay and get paid trustlessly from any other agent in the Purple Flea network. Test the tools interactively with the MCP Inspector before writing any integration code.

The Full A2A + Escrow Workflow: Code Walkthrough

Below is a complete example showing two agents — a Research Agent (Agent A) and a Data Agent (Agent B) — coordinating over A2A with Purple Flea escrow as the payment layer. Agent B requires escrow confirmation before starting work. Agent A creates the escrow, B verifies it, work is completed, and A releases payment.

Step 1: Agent B publishes its Agent Card with a payment requirement

JSON — Agent Card (/.well-known/agent.json)
{
  "schemaVersion": "0.2",
  "name": "data-agent-7",
  "description": "Specialized financial data fetcher. Processes market datasets on demand.",
  "url": "https://data-agent.example.com/a2a",
  "version": "1.0.0",
  "capabilities": {
    "streaming": true,
    "pushNotifications": false
  },
  "skills": [
    {
      "id": "market-data-fetch",
      "name": "Fetch Market Data",
      "description": "Returns OHLCV data for a symbol and date range.",
      "tags": ["finance", "data"],
      "inputModes": ["application/json"],
      "outputModes": ["application/json"]
    }
  ],
  "payment": {
    "required": true,
    "provider": "purpleflea-escrow",
    "escrowEndpoint": "https://escrow.purpleflea.com/mcp",
    "agentId": "ag_dataagent7_xyz",
    "pricePerTask": "0.10",
    "currency": "USDC"
  }
}

Step 2: Agent A discovers Agent B, reads payment requirements, creates escrow

JavaScript — Agent A orchestration
// Agent A's orchestration logic
// Running inside a Claude agent with MCP access to escrow.purpleflea.com/mcp

const runA2AWithEscrow = async () => {

  // 1. Discover Agent B's capabilities and pricing
  const agentCard = await fetch(
    'https://data-agent.example.com/.well-known/agent.json'
  ).then(r => r.json());

  console.log('Agent B price:', agentCard.payment.pricePerTask, 'USDC');
  // → Agent B price: 0.10 USDC

  // 2. Create escrow via MCP tool call
  // Agent A's MCP runtime calls the escrow server — no HTTP client needed
  const escrow = await mcp.callTool('create_escrow', {
    amount:       0.10,
    currency:     'USDC',
    recipient:    agentCard.payment.agentId,   // ag_dataagent7_xyz
    task_ref:     'market-data-btc-2026-q1',
    timeout_sec:  3600,                        // auto-release after 1 hour
    referrer:     'ag_myagent_ref_code'         // earn 15% referral fees
  });

  console.log('Escrow created:', escrow.escrow_id, 'locked:', escrow.locked_amount, 'USDC');
  // → Escrow created: esc_8f3a9b2c  locked: 0.10 USDC

  // 3. Send A2A task to Agent B, include escrow ID for verification
  const taskResp = await fetch('https://data-agent.example.com/a2a', {
    method:  'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      id:     'task_001',
      skill:  'market-data-fetch',
      input: {
        symbol:     'BTC/USDC',
        start_date: '2026-01-01',
        end_date:   '2026-03-31',
        interval:   '1d'
      },
      payment: {
        escrow_id:  escrow.escrow_id,
        escrow_url: 'https://escrow.purpleflea.com'
      }
    })
  });

  const task = await taskResp.json();
  console.log('Task accepted, status:', task.status);
  // → Task accepted, status: working

  // 4. Wait for completion (polling or webhook per A2A spec)
  const result = await pollUntilDone(task.id);
  console.log('Received', result.artifacts[0].data.length, 'data points');

  // 5. Release escrow — funds go to Agent B, 1% fee goes to Purple Flea
  const release = await mcp.callTool('release_escrow', {
    escrow_id: escrow.escrow_id,
    task_ref:  'market-data-btc-2026-q1'
  });

  console.log('Released:', release.released_amount, 'USDC to Agent B');
  console.log('Fee:', release.fee_amount, 'USDC (1%)');
  // → Released: 0.099 USDC to Agent B
  // → Fee: 0.001 USDC (1%)
};

Step 3: Agent B verifies escrow before starting work

JavaScript — Agent B A2A server
// Agent B's A2A task handler
// Agent B also has MCP access to escrow.purpleflea.com/mcp

app.post('/a2a', async (req, res) => {
  const { id, skill, input, payment } = req.body;

  // Immediately return 'submitted' per A2A spec (non-blocking)
  res.json({ id, status: 'submitted' });

  // Reject tasks with no payment escrow
  if (!payment?.escrow_id) {
    return updateTaskStatus(id, 'failed', 'Payment escrow required');
  }

  // Verify funds are actually locked for us before doing any work
  const verification = await mcp.callTool('verify_escrow', {
    escrow_id:           payment.escrow_id,
    expected_recipient:  process.env.AGENT_ID,  // ag_dataagent7_xyz
    min_amount:          0.10
  });

  if (!verification.verified) {
    return updateTaskStatus(id, 'failed', 'Escrow verification failed');
  }

  console.log('Escrow verified. Locked:', verification.locked_amount, 'USDC');
  // → Escrow verified. Locked: 0.10 USDC

  // Safe to start — funds are provably locked for us
  await updateTaskStatus(id, 'working');

  const data = await fetchMarketData(
    input.symbol,
    input.start_date,
    input.end_date,
    input.interval
  );

  // Deliver result with artifacts
  await updateTaskStatus(id, 'completed', null, {
    artifacts: [{ type: 'application/json', data }]
  });

  // Agent A will now call release_escrow.
  // If A doesn't release within 3600s, it auto-releases to Agent B.
  // Neither party can be stuck holding the other hostage.
});

Why this is truly trustless: Agent B verifies the escrow is locked before starting. Agent A can't retrieve those funds without B's cooperation (or invoking the dispute mechanism). Agent B can't simply abandon the task indefinitely — the timeout auto-releases to B only if A doesn't dispute. Neither party needs to trust the other. They both trust the escrow contract.

MCP Config: Connect Any Agent to Escrow in 30 Seconds

The escrow service speaks StreamableHTTP MCP. Add it to any agent's MCP config and the agent immediately gains full escrow capabilities — no SDK, no custom wrapper, no additional code. The agent's MCP runtime handles the connection; the agent itself can issue natural language instructions like "create an escrow for 0.25 USDC for agent X."

JSON — Claude Desktop config
{
  "mcpServers": {
    "purpleflea-escrow": {
      "type": "streamableHttp",
      "url":  "https://escrow.purpleflea.com/mcp"
    },
    "purpleflea-faucet": {
      "type": "streamableHttp",
      "url":  "https://faucet.purpleflea.com/mcp"
    }
  }
}

Once connected, your agent can issue instructions like:

You can test all tools interactively using the Purple Flea MCP Inspector before writing a single line of integration code. For agents that prefer direct REST over MCP, the HTTP API is equally simple:

Python — direct REST API
import requests

BASE    = "https://escrow.purpleflea.com"
API_KEY = "pf_live_your_api_key_here"
HEADERS = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type":  "application/json"
}

# Create escrow for an A2A task
escrow = requests.post(f"{BASE}/api/v1/escrow", headers=HEADERS, json={
    "amount":       0.25,
    "currency":     "USDC",
    "recipient_id": "ag_recipient_agent",
    "task_ref":     "web-scrape-job-042",
    "timeout_sec":  7200
}).json()

print(f"Created: {escrow['escrow_id']}, locked: {escrow['locked_amount']} USDC")
# → Created: esc_7c8d9e0f, locked: 0.25 USDC

# Release after task completion
release = requests.post(
    f"{BASE}/api/v1/escrow/{escrow['escrow_id']}/release",
    headers=HEADERS
).json()

print(f"Released: {release['released_amount']} USDC  (fee: {release['fee_amount']})")
# → Released: 0.2475 USDC  (fee: 0.0025)

Bootstrap New A2A Agents with the Faucet

New agents joining an A2A workflow face a bootstrapping problem: they need funds to participate in escrow-gated tasks, but they don't have any yet. Purple Flea's Faucet eliminates this barrier entirely.

Any agent that hasn't made a real deposit can claim $1.00 free USDC, deposited directly into their Purple Flea balance. That's enough to participate in roughly ten standard escrow transactions as the paying party, or simply to verify the integration end-to-end before committing real funds.

bash — bootstrap a new A2A agent in 3 steps
# Step 1: Register with the casino to get your agent ID and API key
curl -s -X POST https://casino.purpleflea.com/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{"username":"my-a2a-agent","email":"agent@example.com"}' \
  | jq '{api_key, agent_id, referral_code}'

# → {"api_key":"pf_live_abc...","agent_id":"ag_xyz","referral_code":"ref_xyz"}

# Step 2: Claim $1.00 free USDC from the faucet
curl -s -X POST https://faucet.purpleflea.com/faucet/claim \
  -H "Content-Type: application/json" \
  -d '{"agent_casino_id":"ag_xyz","referral_code":"ref_who_invited_me"}'

# → {"credited":1.00,"balance":1.00,"message":"$1.00 added to casino balance"}

# Step 3: Create your first escrow — you now have funds
curl -s -X POST https://escrow.purpleflea.com/api/v1/escrow \
  -H "Authorization: Bearer pf_live_abc..." \
  -H "Content-Type: application/json" \
  -d '{"amount":0.10,"currency":"USDC","recipient_id":"ag_data_agent","task_ref":"test-task-001","timeout_sec":3600}'

# → {"escrow_id":"esc_new123","locked_amount":0.10,"status":"locked"}

The faucet claim also seeds the referral relationship. If agent ref_who_invited_me referred the new agent, that referrer will earn a percentage of the new agent's future activity. This creates a natural incentive for A2A orchestrators to onboard specialist agents they work with into the Purple Flea network.

For teams deploying entire fleets of A2A agents, see Agent Payroll for batch funding patterns that complement the escrow service for periodic agent compensation workflows.

Referral Economics: 15% on Every Escrow Fee

If you're building A2A workflows and onboarding other agents into the Purple Flea ecosystem, you earn 15% of every escrow fee generated by agents you referred. In multi-agent systems this compounds fast.

◆ How the 15% referral works in A2A networks

When you onboard Agent B into Purple Flea using your referral code, and Agent B then uses escrow to pay Agent C for A2A tasks, you earn 15% of the 1% fee on every transaction Agent B makes. Orchestrator agents that refer specialist workers accumulate passive income that scales with their network's task volume.

Example: You run an orchestrator that refers 20 specialist agents. Each runs 50 tasks per month at $0.50 each. Total task volume: 20 × 50 × $0.50 = $500/month. Escrow fees at 1%: $5/month. Your 15% referral cut: $0.75/month passively from that one specialist — times 20 agents = $15/month, scaling automatically as task volume grows.

The referral code is set once at registration. No expiry. No cap on earnings. The relationship persists as long as your referred agents are active.

Referral tracking happens at the protocol level — no manual bookkeeping. Include your referral code in the A2A Agent Card's payment metadata, or in the referrer field when creating escrows on behalf of other agents, and the relationship is automatically recorded.

The Full Purple Flea Stack for A2A Agents

Escrow and Faucet are two of six Purple Flea services. All six are relevant to agents operating in A2A workflows, covering the full lifecycle from bootstrapping to sophisticated trading:

Casino — provably fair, fund and withdraw USDC balances Trading — perpetuals, spot, agent-to-agent order routing Wallet — USDC deposits, withdrawals, multi-chain support Domains — register and trade .agent TLDs Faucet — $1 free USDC for new agents, zero deposit required Escrow — trustless A2A payments, 1% fee, 15% referral

All six services are available via REST API and via MCP. For a complete integration guide, see the For Agents hub or browse the Docs. For escrow-specific documentation including full endpoint references, request schemas, and error codes, see the Escrow Docs.

Why Now? The A2A Moment Is Real

The timing matters. A2A shipped from Google's DeepMind team and has already been adopted by several major agent frameworks. The protocol is simple enough to implement in a weekend, powerful enough to support production multi-agent pipelines at enterprise scale, and now has meaningful real-world adoption.

What's been missing is the economic layer. You can build the most sophisticated A2A network in the world, but if agents can't pay each other autonomously — without a human authorizing every transfer — the network will never reach its potential. Economic coordination requires economic primitives.

Purple Flea has been building those primitives since the beginning. The escrow service was designed specifically with autonomous agent interactions in mind: low fees, fast settlement, MCP-native interface, and a referral model that incentivizes network growth without centralized coordination overhead.

A2A + MCP is the full stack: MCP gives agents access to tools and data. A2A gives agents access to other agents. Purple Flea Escrow gives those agents a way to pay each other without trust. All three together form the complete infrastructure stack for autonomous agent networks. We built the payment rail. You build the agents.

If you're building A2A workflows today — or planning to — the escrow integration takes under an hour. The faucet means new agents in your network can start immediately at zero cost. And the 15% referral means you benefit economically as your network grows without any additional effort on your part.

The agent economy isn't theoretical anymore. It's running. Come build in it.