A2A
Send a task from your agent
Andru is an A2A agent. Your agent sends a JSON-RPC task naming a skill and a tool; Andru answers from your account. 13 skills, 29 tools.
Discovery
| What | Where |
|---|---|
| Agent card | https://api.andru-ai.com/.well-known/agent.json |
| Priced tool catalog, with input schemas | https://api.andru-ai.com/api/a2a/capabilities |
| OpenAPI spec | andru-ai.com/docs/openapi.json |
Authentication
Send your API key in X-API-Key, or as Authorization: Bearer. Create one at Settings › Developer; it is the same key MCP uses.
Send a task
POST a tasks/send request to https://api.andru-ai.com/api/a2a/tasks. Name the skill in skillId (or skill), then give the tool and its arguments in a data part. tasks/send waits for the answer.
curl https://api.andru-ai.com/api/a2a/tasks \
-H "X-API-Key: sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "1",
"method": "tasks/send",
"params": {
"skillId": "buyer-understanding",
"message": {
"role": "user",
"parts": [{
"kind": "data",
"data": {
"tool": "get_icp_fit_score",
"args": { "companyName": "Datadog", "productDescription": "Observability platform for cloud infrastructure teams" }
}
}]
}
}
}'{
"jsonrpc": "2.0",
"id": "1",
"result": {
"taskId": "6756c689-…",
"status": "completed",
"output": { "result": { "content": [{ "type": "text", "text": "{ \"companyName\": \"Datadog\", \"totalScore\": 67.5, … }" }] } }
}
}The shorter form below also works, and wins if both are sent. Text parts are accepted but are not used as product context; put context in the tool's arguments.
"params": {
"skill": "buyer-understanding",
"input": { "tool": "get_icp_fit_score", "args": { "companyName": "Datadog" } }
}When Andru needs more
Some tools need to know what you sell. Andru asks once: if it has nothing saved for your account, the task pauses with status input-required and the reply lists the fields it needs, with a JSON schema and a ready-to-send example. For product context your website is enough. Nothing is charged while a task waits.
Answer on the same task: send tasks/send with its taskId and the fields in a data part. The task resumes and finishes, and Andru remembers your product for later calls. You can also save it up front with the free set_product_context tool.
{
"jsonrpc": "2.0",
"id": "2",
"method": "tasks/send",
"params": {
"taskId": "TASK_ID",
"message": { "role": "user", "parts": [{ "kind": "data", "data": { "website": "datadoghq.com" } }] }
}
}Long tasks
Send with tasks/sendSubscribe to get a taskId back immediately, then follow the task over server-sent events or poll it. The stream ends with a complete, input-required or error event carrying the output. Cancel with POST /api/a2a/tasks/TASK_ID/cancel.
# 1. Submit and return at once
curl https://api.andru-ai.com/api/a2a/tasks -H "X-API-Key: $ANDRU_API_KEY" -H "Content-Type: application/json" \
-d '{ "jsonrpc": "2.0", "id": "2", "method": "tasks/sendSubscribe", "params": { … same as tasks/send … } }'
# 2. Follow it (server-sent events), or poll
curl -N https://api.andru-ai.com/api/a2a/tasks/TASK_ID/stream -H "X-API-Key: $ANDRU_API_KEY"
curl https://api.andru-ai.com/api/a2a/tasks/TASK_ID -H "X-API-Key: $ANDRU_API_KEY"| Status | Meaning |
|---|---|
| submitted | Accepted, not started |
| working | Running |
| input-required | Paused until you send the fields it asks for |
| completed | Done; the answer is in output |
| failed | Could not finish; the reason is in error. Nothing is charged. |
| canceled | Stopped at your request |
Other methods
| Method | What it does |
|---|---|
tasks/get | Read a task by id (same as GET /api/a2a/tasks/TASK_ID) |
tasks/cancel | Cancel a running task |
tasks/batch | Run one skill over a list of items, such as scoring many companies |
ap2/quote | Price a call before buying it (AP2) |
ap2/purchase | Buy with a signed AP2 mandate |
Agents that pay with AP2 mandates can also use POST /api/a2a/quote and POST /api/a2a/purchase. Receipts are signed with Ed25519 and can be checked against https://api.andru-ai.com/.well-known/jwks.json.
What it costs
Same work, same price as the Andru platform. One price list and one free allowance for MCP and A2A. Lookups are always free. On top of that, 25 free calls a month, shared across MCP and A2A, cover paid calls priced $5 or less (consultations and catalog assets are always paid). Calls that only ask for more information never count. Check what is left with GET /api/a2a/quota.