Use Your Pipelines as A2A AgentsBeta
Make your deployed pipelines and runnable deployments available to other AI applications and agents that support the A2A (Agent2Agent) protocol. These clients can discover your pipeline through its agent card and call it with authenticated JSON-RPC messages. For background, see Agent2Agent Protocol.
About This Task
Beta A2A is an open protocol that lets AI applications discover and call agents over a standard JSON-RPC interface. In Haystack Enterprise Platform, each eligible deployed pipeline or deployment exposes its own A2A agent card, which describes how to reach and call it. Clients authenticate with the same bearer credential used for other API calls, then send request-bound, stateless messages to the agent.
A2A support is disabled by default and made available on request. Contact your Haystack Enterprise Platform administrator to have it enabled for your organization.
Only SendMessage and SendStreamingMessage are supported. For other restrictions, see Limitations.
Prerequisites
- A2A support enabled for your organization.
- A pipeline or deployment that meets the eligibility requirements.
- A valid API key or bearer token with access to the workspace.
Eligibility Requirements
Only these resources can be used as A2A agents:
- Pipelines: The pipeline agent must be deployed, and its output type must be chat or generative. This matches the requirements for the existing pipeline execution API.
- Deployments: The deployment must be runnable.
If a pipeline or deployment doesn't meet these requirements, its agent card and endpoints aren't available.
Discover an Agent Card
To find out where and how to call an agent, get its agent card. Send a GET request to this endpoint, using the workspace ID and the pipeline or deployment ID:
GET /api/v2/workspaces/{workspace_id}/{pipelines|deployments}/{resource_id}/a2a/.well-known/agent-card.json
The response includes the agent's interface URL, the security scheme it expects, and metadata such as its name and description.
Send a Message to an Agent
Send requests to the interface URL returned in the agent card:
POST /api/v2/workspaces/{workspace_id}/{pipelines|deployments}/{resource_id}/a2a
Include your normal bearer credential, Content-Type: application/json, and the A2A-Version: 1.0 header.
Each request must contain one or more non-empty user text parts. This example shows a SendMessage request body:
{
"jsonrpc": "2.0",
"id": "request-1",
"method": "SendMessage",
"params": {
"message": {
"messageId": "message-1",
"role": "ROLE_USER",
"parts": [{"text": "What is the answer?"}]
}
}
}
To receive a streamed response instead, use SendStreamingMessage with the same body shape. The agent returns standard A2A Server-Sent Events as the underlying pipeline runs.
Limitations
A2A agents in Haystack Enterprise Platform have these limitations:
- Only text-based, stateless messages are supported. Files and structured data parts aren't accepted.
- Tasks exist only for the duration of a single request and are discarded once the response ends.
- Task retrieval and continuation aren't available — you can't fetch a past task or resume a conversation by task ID.
- Push notifications aren't supported.
Related Information
Was this page helpful?