Expose Agent Studio through A2A
Publish the Agent Studio A2A manifest and accept synchronous or SSE-streamed tasks.
Expose Agent Studio as an Agent-to-Agent (A2A) server so trusted clients can discover its capabilities and delegate tasks. The server publishes a manifest and accepts either a complete JSON response or a Server-Sent Events (SSE) stream.
Before you begin
You need a running Agent Studio instance, a configured LLM provider, and an HTTPS origin that the intended A2A clients can reach. The examples use https://agent-studio.example.com; replace it with your own protected origin.
auth.type as none, and POST /api/a2a/tasks does not authenticate callers. Do not expose the task route directly to an untrusted network. Configure authentication, request-size controls, rate limiting, and logging at a reverse proxy or API gateway before making the origin reachable.Request flow
Discovery tells the client which endpoint and capability to use. The client then chooses one response mode for the same task payload.
Publish and verify the server
Place Agent Studio behind an HTTPS gateway that authenticates callers before forwarding /api/a2a/manifest and /api/a2a/tasks. Restrict the routes to the client identities and networks that need them.
The application returns Access-Control-Allow-Origin: * on these routes. Do not treat Cross-Origin Resource Sharing (CORS) as authentication; enforce access at the gateway.
Request the manifest from the protected origin:
curl --fail-with-body \
'https://agent-studio.example.com/api/a2a/manifest'The response identifies agent-studio-orchestrator, protocol version 1.0.0, provider information, endpoint URLs, and advertised capabilities. Because endpoint URLs are built from the request origin, verify that your gateway forwards the intended public host and scheme.
Confirm that the manifest contains these endpoint roles:
| Manifest field | Purpose |
|---|---|
endpoints.tasks | Synchronous task delegation at /api/a2a/tasks |
endpoints.stream | Streamed task delegation at /api/a2a/tasks?stream=true |
endpoints.messages | Authenticated A2A messages at /api/a2a/messages |
endpoints.health | Service health at /api/health |
The manifest advertises visual_graph_orchestration and mcp_tool_execution. An advertised capability describes the public contract; test it with synthetic input before relying on it operationally.
Post a bounded task to the protected task endpoint:
curl --fail-with-body --request POST \
--header 'Content-Type: application/json' \
--data '{
"taskId": "integration_check_01",
"capability": "visual_graph_orchestration",
"input": {
"prompt": "Return a two-item checklist for reviewing a synthetic document. Do not call tools."
}
}' \
'https://agent-studio.example.com/api/a2a/tasks'The response should preserve integration_check_01, set status to completed, and place the generated text in result.output. It also reports the runtime, selected capability, duration, and output-token count when the provider supplies one.
Send the same payload to the stream URL and disable client-side buffering:
curl --no-buffer --fail-with-body --request POST \
--header 'Content-Type: application/json' \
--data '{
"taskId": "integration_stream_01",
"capability": "visual_graph_orchestration",
"input": {
"prompt": "Return a two-item checklist for reviewing a synthetic document. Do not call tools."
}
}' \
'https://agent-studio.example.com/api/a2a/tasks?stream=true'Each content event has the form data: {"chunk":"...","taskId":"integration_stream_01"}. The server finishes a successful stream with data: [DONE].
Repeat both checks through the exact hostname that clients will use, not a private application URL. Confirm that an authorized request succeeds, an unauthorized request is rejected by the gateway, the manifest contains the public origin, and the stream remains open until [DONE].
Response behavior
If taskId, capability, or input is omitted, the route generates a task ID, defaults the capability to visual_graph_orchestration, and uses an empty input object. When input.prompt is a string, Agent Studio sends that text to the LLM; otherwise, it serializes the input object as formatted JSON.
Synchronous processing failures return HTTP 500 with taskId: "error", status: "failed", an error string, and duration. Once an SSE response has begun, a generation failure is sent as an error data event and the stream closes without [DONE]. Clients must distinguish that condition from successful completion.
Troubleshooting
Next steps
Use Delegate an A2A task to test a client workflow, then review API authentication, errors, and limits before expanding access to other Agent Studio APIs.