Send A2A task Technical Preview; added in 9.2.0

View as markdown
POST /api/agent_builder/a2a/{agentId}

Spaces method and path for this operation:

post /s/{space_id}/api/agent_builder/a2a/{agentId}

Refer to Spaces for more information.

WARNING: This endpoint is designed for A2A protocol clients and should not be used directly via REST APIs. Use an A2A SDK or A2A Inspector instead.

[Required authorization] Route required privileges: read_onechat.

Path parameters

  • agentId string Required

    The unique identifier of the agent to send the A2A task to.

application/json

Body

Responses

  • 200 application/json

    Indicates a successful response

POST /api/agent_builder/a2a/{agentId}
curl \
 --request POST 'http://localhost:5601/api/agent_builder/a2a/{agentId}' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"id":"task-123","method":"complete","params":{"messages":[{"role":"user","content":"Hello from A2A protocol"}]},"jsonrpc":"2.0"}'
Request example
WARNING: DO NOT USE THIS ENDPOINT VIA REST API. These examples are auto-generated and should not be run. Integrate with A2A using an A2A SDK or A2A Inspector instead.
{
  "id": "task-123",
  "method": "complete",
  "params": {
    "messages": [
      {
        "role": "user",
        "content": "Hello from A2A protocol"
      }
    ]
  },
  "jsonrpc": "2.0"
}
Response examples (200)
Example response from A2A Task Endpoint with results of task execution
{
  "id": "task-123",
  "result": {
    "type": "response",
    "response": {
      "message": "Hello! How can I help you today?"
    },
    "conversation_id": "conv-456"
  },
  "jsonrpc": "2.0"
}