A2A Setup Guide

Connect your AI agent to Willform via the Agent-to-Agent (A2A) protocol — JSON-RPC over HTTPS with x402 payment.

What is A2A?

The Agent-to-Agent (A2A) protocol lets AI agents interact with Willform programmatically via JSON-RPC 2.0. Unlike MCP which connects human-operated AI assistants, A2A is designed for autonomous agent-to-agent communication with built-in x402 payment.

Agent Card Discovery

Willform publishes an Agent Card at the standard well-known URL. Your agent can discover capabilities, supported skills, and payment requirements automatically:

https://willform.ai/.well-known/agent.json

Key fields in the Agent Card:

  • skills — 14 available operations (agent management, credits, budget, x402, identity status)
  • securitySchemes — x402 payment with USDC on 6 networks (Ethereum, Base, Arbitrum, Optimism, Polygon, BSC)
  • identity — ERC-8004 on-chain identity (Base mainnet)

Authentication via x402

A2A uses x402 payment protocol for authentication — no API keys needed. Your agent signs a payment header with its wallet.

How it works:

  1. Send a POST request to /a2a without a PAYMENT-SIGNATURE header
  2. Willform responds with 402 Payment Required and a payment request (minimum 0 USDC)
  3. Your agent signs the payment request with its wallet and resends with the PAYMENT-SIGNATURE header
  4. Willform verifies the signature, identifies the wallet, and processes the request
Zero-amount signatures: For read-only operations, you can sign a 0 USDC payment. This authenticates your wallet without spending anything.
Top-up payments: Include USDC in the payment to add credits to your Willform account. The payment is processed before the operation executes.

Endpoint

All A2A requests go to a single endpoint via POST:

https://willform.ai/a2a

JSON-RPC Methods

Willform A2A supports three JSON-RPC 2.0 methods:

MethodDescription
message/sendExecute an operation on the Willform platform. The message content specifies the operation and parameters.
tasks/getRetrieve the status and result of a previously submitted task by ID.
tasks/cancelCancel a running task by ID.

Example: List Namespaces

Here's a minimal JSON-RPC request to list your namespaces:

POST /a2a HTTP/1.1
Host: willform.ai
Content-Type: application/json
PAYMENT-SIGNATURE: <your-x402-signature>

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "message/send",
  "params": {
    "message": {
      "role": "user",
      "parts": [{ "type": "text", "text": "namespace_list" }]
    }
  }
}

Per-Namespace Agent Endpoint

Each user namespace also exposes a dedicated A2A endpoint for interacting with the Willy agent:

https://willform.ai/a2a/ns/{shortId}
  • GET GET — Returns the namespace-specific agent card
  • POST POST — Send messages to the Willy agent (agent_chat, agent_invoke)
Per-namespace endpoints use standard SIWE authentication instead of x402.

Available Skills

The main A2A endpoint exposes 14 skills:

SkillDescription
namespace_manageCreate, list, update, or delete namespaces
credits_manageCheck balance, get deposit info, verify deposits
agent_configureCreate, list, get, update, or delete managed AI agents
agent_lifecycleDeploy or undeploy agent VMs
agent_knowledgeUpload, list, remove, and search agent knowledge base documents
agent_self_improvePropose, list, approve, or reject self-improvement proposals
agent_manageInteract with per-namespace Willy agent (status, invoke, chat, recover)
ask_willyGet platform guidance (free, no token cost)
budget_policyCreate, list, update, or delete agent budget policies
x402_proxyMake outbound HTTP requests through the x402 budget proxy
x402_transactionsList x402 external payment transaction history
toolpack_listList available tool packs for agents
agent_designDesign an AI agent through multi-turn conversation
agent_identityCheck identity availability and status while ERC-8004 writes are paused during migration

MCP vs A2A

Choose the right protocol for your use case:

FeatureMCPA2A
Designed forHuman-operated AI assistantsAutonomous agent-to-agent
AuthenticationOAuth 2.0 or API Keyx402 payment signature
Built-in paymentNo (pre-fund account)Yes (pay-per-request)
ProtocolMCP over Streamable HTTPJSON-RPC 2.0 over HTTPS
DiscoveryMCP tool listingAgent Card (/.well-known/agent.json)