A2A support is in preview: available to every account with no extra rate limits, but the surface may still change.
Endpoints
A2A lives under the API base URL,https://api.datalinks.com/api/v1. Each agent is reachable at three endpoints under {host}/a2a:
Authentication
ThePOST endpoint requires a bearer token: your DataLinks API token, sent as Authorization: Bearer <token>. The same token you use for the REST API and Python SDK works here.
The AgentCard declares a single security scheme named bearer (bearerFormat: JWT). A compliant client reads card.security_requirements and registers the token for each declared scheme rather than assuming a scheme name.
See Get an API token for issuing a token.
Agent Catalog
GET /a2a returns the two agents DataLinks exposes:
Example response:
Don’t hardcode a single agent name. Call
GET /a2a and select from the returned list so your client keeps working as the catalog changes.Message Format
Send messages with the JSON-RPC methodSendMessage (single response) or SendStreamingMessage (SSE stream). The message parts carry your question. The target namespace is passed in the message metadata, not in the URL or body:
JSON-RPC methods
Streaming Events
A streaming call (SendStreamingMessage) returns Server-Sent Events. Each SSE data: line is a JSON-RPC response wrapping one event under result:
payload is exactly one of the following (proto3-JSON oneof; the wrapper key is shown in parentheses):
Task states are reported via
TaskState, for example TASK_STATE_WORKING, TASK_STATE_COMPLETED, TASK_STATE_FAILED. Read response.WhichOneof("payload") to branch on the event type.
nl2ql stream sequence
nl2ql emits four events: a working status, the generated query as an artifact, the rows as an artifact, then a completed status. A real stream for “list the tickets” (taskId / contextId / timestamp elided):
assistant stream sequence
assistant streams its planning and execution: a submitted task, working statuses (with the plan carried as a text + data part, then each step’s instruction), one step-N artifact per query step, then the final answer artifact and a completed status. A real (trimmed) stream:
Artifacts
Part Types
Messages and artifacts contain parts. A2A 1.0 parts are proto3-JSON, so a part has nokind discriminator; its content is one of:
Convert a
DataPart to native Python with google.protobuf.json_format.MessageToDict(part.data).
Rows preserve DataLinks internal
__-prefixed fields (for example __metadata, which carries a match score), matching the /query/ask wire format. Filter them out if your consumer doesn’t need them.AgentCard
The discovery document a client fetches before connecting. A livenl2ql card:
The
assistant card is identical in shape, with the assistant skill (tags: ["assistant", "rag", "query"]).
Related
- Connect an Agent to DataLinks over A2A - step-by-step guide.
- A2A Client example - complete runnable client.
- Get an API token - issuing the bearer credential.