Skip to main content
DataLinks exposes its agents as standard Agent2Agent (A2A) 1.0 servers. This page is the lookup reference for the endpoints, authentication, agent catalog, message format, and streaming event types. For a step-by-step walkthrough, see Connect an Agent to DataLinks over A2A.
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

The POST 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 method SendMessage (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:
Each event’s 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 no kind discriminator; its content is one of: Convert a DataPart to native Python with google.protobuf.json_format.MessageToDict(part.data).
A response can contain both a TextPart and a DataPart. Clients that handle only text will receive the query or answer but silently drop the result rows. Always handle DataParts.
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 live nl2ql card:
The fields the reference client relies on: The assistant card is identical in shape, with the assistant skill (tags: ["assistant", "rag", "query"]).