A2A JSON-RPC to one agent: message/send, tasks/get, tasks/cancel
const url = 'http://localhost:11044/api/v1/agents/example/a2a';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"id":"example","jsonrpc":"example","method":"example","params":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:11044/api/v1/agents/example/a2a \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "id": "example", "jsonrpc": "example", "method": "example", "params": {} }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The agent’s name
Request Bodyrequired
Section titled “Request Bodyrequired”One JSON-RPC 2.0 call, its id echoed in the response. message/send takes a message whose text parts are joined into one turn, continuing the conversation when it names a taskId this agent holds (an unknown one is refused, not restarted); tasks/get and tasks/cancel take the task’s id in params, and no task can be cancelled. Streaming and push-notification methods answer an error naming the alternative
A JSON-RPC 2.0 call to one agent, the body of POST /agents/{name}/a2a.
object
The caller’s id for this call, echoed in the response; a string or a number
JSON-RPC version; send 2.0. The value is not checked
The A2A method: message/send, tasks/get or tasks/cancel. Streaming and push-notification methods answer an unsupported-operation error, any other a method-not-found error
The method’s params, as the A2A protocol defines them
object
Example generated
{ "id": "example", "jsonrpc": "example", "method": "example", "params": {}}Responses
Section titled “Responses”A JSON-RPC response: a Message, a Task, or an error
A JSON-RPC 2.0 response from POST /agents/{name}/a2a, carrying a result or an error, never both.
object
On failure, the error; absent on success
object
JSON-RPC or A2A error code: -32600 invalid request (also an agent that cannot be talked to now, or that this key may not reach), -32601 method not found, -32602 invalid params, -32603 internal error, -32001 task not found, -32002 task not cancelable, -32003 push notifications not supported, -32004 unsupported operation
What went wrong, in words for a person to read
The id of the call this answers, echoed as sent; null when the call carried none
Always 2.0
On success, what the method returned: an A2A Message or Task. Absent on an error
Example generated
{ "error": { "code": 1, "message": "example" }, "id": "example", "jsonrpc": "example", "result": "example"}No API key or session
The error object of a JSON-RPC response; the A2A card endpoints also answer a refusal with it as the whole body.
object
JSON-RPC or A2A error code: -32600 invalid request (also an agent that cannot be talked to now, or that this key may not reach), -32601 method not found, -32602 invalid params, -32603 internal error, -32001 task not found, -32002 task not cancelable, -32003 push notifications not supported, -32004 unsupported operation
What went wrong, in words for a person to read
Example generated
{ "code": 1, "message": "example"}The key does not talk to this agent
A JSON-RPC 2.0 response from POST /agents/{name}/a2a, carrying a result or an error, never both.
object
On failure, the error; absent on success
object
JSON-RPC or A2A error code: -32600 invalid request (also an agent that cannot be talked to now, or that this key may not reach), -32601 method not found, -32602 invalid params, -32603 internal error, -32001 task not found, -32002 task not cancelable, -32003 push notifications not supported, -32004 unsupported operation
What went wrong, in words for a person to read
The id of the call this answers, echoed as sent; null when the call carried none
Always 2.0
On success, what the method returned: an A2A Message or Task. Absent on an error
Example generated
{ "error": { "code": 1, "message": "example" }, "id": "example", "jsonrpc": "example", "result": "example"}No agent of that name may be talked to now
A JSON-RPC 2.0 response from POST /agents/{name}/a2a, carrying a result or an error, never both.
object
On failure, the error; absent on success
object
JSON-RPC or A2A error code: -32600 invalid request (also an agent that cannot be talked to now, or that this key may not reach), -32601 method not found, -32602 invalid params, -32603 internal error, -32001 task not found, -32002 task not cancelable, -32003 push notifications not supported, -32004 unsupported operation
What went wrong, in words for a person to read
The id of the call this answers, echoed as sent; null when the call carried none
Always 2.0
On success, what the method returned: an A2A Message or Task. Absent on an error
Example generated
{ "error": { "code": 1, "message": "example" }, "id": "example", "jsonrpc": "example", "result": "example"}
