Skip to content

A2A JSON-RPC to one agent: message/send, tasks/get, tasks/cancel

POST
/api/v1/agents/{name}/a2a
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": {} }'
name
required
string

The agent’s name

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

Media typeapplication/json

A JSON-RPC 2.0 call to one agent, the body of POST /agents/{name}/a2a.

object
id

The caller’s id for this call, echoed in the response; a string or a number

jsonrpc
required

JSON-RPC version; send 2.0. The value is not checked

string
method
required

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

string
params

The method’s params, as the A2A protocol defines them

object
key
additional properties
any

Example generated

{
"id": "example",
"jsonrpc": "example",
"method": "example",
"params": {}
}

A JSON-RPC response: a Message, a Task, or an error

Media typeapplication/json

A JSON-RPC 2.0 response from POST /agents/{name}/a2a, carrying a result or an error, never both.

object
error

On failure, the error; absent on success

object
code
required

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

integer format: int32
message
required

What went wrong, in words for a person to read

string
id

The id of the call this answers, echoed as sent; null when the call carried none

jsonrpc
required

Always 2.0

string
result

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

Media typeapplication/json

The error object of a JSON-RPC response; the A2A card endpoints also answer a refusal with it as the whole body.

object
code
required

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

integer format: int32
message
required

What went wrong, in words for a person to read

string

Example generated

{
"code": 1,
"message": "example"
}

The key does not talk to this agent

Media typeapplication/json

A JSON-RPC 2.0 response from POST /agents/{name}/a2a, carrying a result or an error, never both.

object
error

On failure, the error; absent on success

object
code
required

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

integer format: int32
message
required

What went wrong, in words for a person to read

string
id

The id of the call this answers, echoed as sent; null when the call carried none

jsonrpc
required

Always 2.0

string
result

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

Media typeapplication/json

A JSON-RPC 2.0 response from POST /agents/{name}/a2a, carrying a result or an error, never both.

object
error

On failure, the error; absent on success

object
code
required

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

integer format: int32
message
required

What went wrong, in words for a person to read

string
id

The id of the call this answers, echoed as sent; null when the call carried none

jsonrpc
required

Always 2.0

string
result

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"
}