A2A (Agent2Agent Protocol) Let any A2A agent ask Ripley, Fastio's AI agent, about the files in a workspace — with citations, streaming, cancel and push notifications.

Agent URL: https://a2a.fast.io/ Binding: JSON-RPC 2.0 Versions: 1.0, 0.3 Auth: Bearer {api_key_or_access_token}

Overview

A2A (Agent2Agent) is an open protocol that lets one AI agent hand work to another. Fastio's A2A surface lets any A2A client — your own agent, an agent framework, or another vendor's agent — ask Ripley, Fastio's AI agent, about the files in a Fastio workspace. Ripley answers from the workspace's documents and returns the answer with citations to the files it used.

The same work is available over the REST API (see the AI reference) and the Fastio MCP server. Use A2A when your client already speaks A2A.

Endpoint Summary

All paths are on https://a2a.fast.io.

MethodPathAuthDescription
GET/.well-known/agent-card.jsonNoneAgent card for the global agent
GET/w/{workspace_id}/.well-known/agent-card.jsonNoneAgent card for one workspace's agent
GET/.well-known/oauth-protected-resourceNoneRFC 9728 protected-resource metadata, global agent
GET/.well-known/oauth-protected-resource/w/{workspace_id}NoneRFC 9728 protected-resource metadata, one workspace's agent
POST/BearerJSON-RPC endpoint of the global agent
POST/w/{workspace_id}/BearerJSON-RPC endpoint of one workspace's agent

{workspace_id} is the workspace's numeric ID. The card and metadata paths answer GET and OPTIONS (a CORS preflight, answered 204); the JSON-RPC paths answer POST only. Any other method is answered 405. A workspace ID in the URL path that is not 1–32 digits matches no route and is answered HTTP 404.

Choosing the Workspace

Every task runs in exactly one workspace.

If you send the workspace in more than one place, the values must agree; in the JSON-RPC parameters, a mismatch, a malformed ID, or no workspace at all is refused with -32602. A workspace that does not exist, or that the caller cannot see, answers -32001 (TaskNotFound) — the same answer as a missing task, so it never reveals whether the workspace exists.

Discovery (Agent Card)

curl "https://a2a.fast.io/.well-known/agent-card.json"
curl "https://a2a.fast.io/w/{workspace_id}/.well-known/agent-card.json"

One card serves both protocol versions: it carries the 1.0 fields (supportedInterfaces, securitySchemes in the 1.0 form, securityRequirements) and the 0.3 fields (url, protocolVersion, preferredTransport, security). Each version's SDK reads its own fields and ignores the others.

Key fields (global card):

{
  "name": "Ripley",
  "supportedInterfaces": [
    { "url": "https://a2a.fast.io/", "protocolBinding": "JSONRPC", "protocolVersion": "1.0" },
    { "url": "https://a2a.fast.io/", "protocolBinding": "JSONRPC", "protocolVersion": "0.3" }
  ],
  "url": "https://a2a.fast.io/",
  "protocolVersion": "0.3",
  "preferredTransport": "JSONRPC",
  "capabilities": { "streaming": true, "pushNotifications": true, "extendedAgentCard": false },
  "defaultInputModes": ["text/plain"],
  "defaultOutputModes": ["text/plain"],
  "skills": [
    { "id": "ripley-ask", "name": "Ask Ripley" }
  ]
}

On a workspace card, url and each supportedInterfaces[].url are https://a2a.fast.io/w/{workspace_id}.

Trailing slash for SDK discovery. A2A SDKs find the card by resolving .well-known/agent-card.json against the base URL you give them. Give the per-workspace agent with the trailing slash — https://a2a.fast.io/w/{workspace_id}/ — or the SDK looks for the card in the wrong place. JSON-RPC requests are accepted with or without the slash.

The card's securitySchemes list two schemes: fastio_oauth (OAuth 2.0 authorization code with PKCE, scope all_workspaces) and fastio_bearer (a Fastio API key or OAuth access token as a Bearer token). Either satisfies the card's security requirements.

Authentication

Every JSON-RPC request needs Authorization: Bearer {token}, where {token} is either:

OAuth for A2A Clients

  1. Discover. An unauthenticated request is answered 401 with WWW-Authenticate: Bearer resource_metadata="https://a2a.fast.io/.well-known/oauth-protected-resource" (on a workspace agent the URL ends /.well-known/oauth-protected-resource/w/{workspace_id}).
  2. Read the protected-resource metadata (RFC 9728):
    {
      "resource": "https://a2a.fast.io/",
      "authorization_servers": ["https://go.fast.io"],
      "scopes_supported": ["all_workspaces"],
      "bearer_methods_supported": ["header"]
    }
    For a workspace agent, resource is https://a2a.fast.io/w/{workspace_id}.
  3. Run the authorization code + PKCE flow against the authorization server https://go.fast.io (server metadata: https://api.fast.io/.well-known/oauth-authorization-server/). Send the resource value from step 2 — the exact same spelling — on both the authorize and the token request.
  4. Call the agent with the access token as the Bearer token. Refresh it with the refresh token as usual.

The client may send its client_id in HTTP Basic auth on the token endpoint; any secret part is ignored and PKCE is still required. The full flow, the accepted A2A resource values and the Basic client_id rule are in the OAuth reference (Complete PKCE Flow, Client Authentication and A2A Agent Resources).

Auth Failures

SituationHTTPResponse
No Authorization header401WWW-Authenticate: Bearer resource_metadata="…"
Token is invalid, expired or revoked401WWW-Authenticate: Bearer error="invalid_token", resource_metadata="…"

Once the token is accepted, every other failure is a JSON-RPC error inside an HTTP 200 (see Errors).

Access Requirements

Billing. A task's work is billed as Ripley AI usage to the workspace's organization, exactly like a Ripley chat message. A clarifying question (INPUT_REQUIRED) is not billed, so cancelling a task that is waiting for input costs nothing. A task you cancel that ends CANCELED incurs no charge. Cancelling running work is best-effort, so read the state the cancel returns: a task that completes before the cancel takes effect ends COMPLETED and is billed normally.

Protocol Versions

Select the version with the A2A-Version header: 1.0 selects A2A 1.0; a missing or blank header, or 0.3, selects A2A 0.3; any other value is refused with -32009 (version not supported) — it never falls back to 0.3. The two versions share tasks: a task created over 0.3 can be read, cancelled or followed over 1.0, and the reverse.

A2A 1.0 Methods (A2A-Version: 1.0)

MethodDescription
SendMessageStart a task, or answer a clarifying question. Blocking by default; configuration.returnImmediately: true returns at once
SendStreamingMessageSame as SendMessage, answered as an SSE stream
GetTaskRead a task
ListTasksList the tasks of one context, most recent status first. contextId is required; optional pageSize (1–100, default 50), pageToken, status, statusTimestampAfter, includeArtifacts (send true to include each completed task's answer artifact; otherwise use GetTask)
CancelTaskCancel a task (see Cancelling a Task)
SubscribeToTaskRe-attach an SSE stream to a task that has not finished
CreateTaskPushNotificationConfigRegister a webhook on a task
GetTaskPushNotificationConfigRead one webhook registration
ListTaskPushNotificationConfigsList a task's webhook registrations
DeleteTaskPushNotificationConfigRemove a webhook registration
GetExtendedAgentCardNot supported: always -32004 (there is no extended card)

A2A 0.3 Methods (no header)

MethodDescription
message/sendStart a task, or answer a clarifying question. Blocking unless configuration.blocking is false
message/streamSame as message/send, answered as an SSE stream (the closing status-update event has final: true; see Streaming)
tasks/getRead a task
tasks/cancelCancel a task
tasks/resubscribeRe-attach an SSE stream to a task that has not finished
tasks/pushNotificationConfig/setRegister a webhook on a task (create only)
tasks/pushNotificationConfig/getRead one webhook registration
tasks/pushNotificationConfig/listList a task's webhook registrations
tasks/pushNotificationConfig/deleteRemove a webhook registration
agent/getAuthenticatedExtendedCardNot supported: always -32004

0.3 has no task-list method. Any method not listed for a version is -32601.

Tasks, Contexts and Messages

Task States

State (1.0)State (0.3)Meaning
TASK_STATE_SUBMITTEDsubmittedAccepted, not started yet
TASK_STATE_WORKINGworkingRipley is working on it
TASK_STATE_INPUT_REQUIREDinput-requiredRipley asked a clarifying question before doing the work
TASK_STATE_COMPLETEDcompletedFinished; the answer is in artifacts
TASK_STATE_FAILEDfailedRipley could not complete it; status.message reads Ripley could not complete this task.
TASK_STATE_CANCELEDcanceledCancelled

COMPLETED, FAILED and CANCELED are final.

Clarifying Questions (INPUT_REQUIRED)

When a request is ambiguous — "move the Q3 report", with no destination — Ripley may ask one clarifying question before doing anything. The task stops in INPUT_REQUIRED and status.message holds the question as a text part. Nothing was done and nothing is billed.

To answer, send a new message in the same task: set message.taskId to the task's ID and use a new messageId. The task goes back to WORKING and continues from the question. A reply is accepted only while the task is INPUT_REQUIRED; a message with the taskId of a task in any other state is refused with -32004. To ask something new after a task finishes, start a new task (optionally with the same contextId). A task waiting for input can also be cancelled.

Idempotent Sends (messageId)

messageId is the idempotency key. Re-sending a message with the same messageId returns the task that message created instead of starting a new run, so a retry after a dropped connection never asks Ripley twice. Use a fresh messageId for every genuinely new message, including each answer to a clarifying question.

Blocking and Non-Blocking Sends

The Answer

A COMPLETED task carries one artifact named answer:

{
  "artifactId": "answer-{id}",
  "name": "answer",
  "parts": [ { "text": "The latest contract is …", "mediaType": "text/plain" } ],
  "metadata": { "citations": [ … ] }
}

Streaming

SendStreamingMessage (1.0) and message/stream (0.3) answer with Content-Type: text/event-stream. Each event's data is one JSON-RPC response. A typical stream:

  1. The Task, state SUBMITTED
  2. A status update, state WORKING
  3. An artifact update carrying the answer artifact
  4. A final status update: COMPLETED, FAILED, CANCELED or INPUT_REQUIRED (with the question)

On 0.3 the closing status-update event carries final: true. If the task is already settled when the stream starts — a re-sent messageId for a task that has finished, or a re-subscription to a task waiting in INPUT_REQUIRED — the stream carries only the Task snapshot and then closes, with no status update and no final flag; treat a settled snapshot as the end of the stream. While the stream waits for the next event, the server sends SSE comment lines (: ping) as keep-alives; ignore them.

SubscribeToTask / tasks/resubscribe re-attach to a task that has not finished, from its current state. Subscribing to a finished task is refused with -32004; read it with GetTask. If a stream drops, re-subscribe or poll GetTask — the task keeps running either way.

Listing and Reading Tasks

Cancelling a Task

CancelTask (1.0) / tasks/cancel (0.3) with {"id": "{task_id}"}:

Task stateResult
SUBMITTED or WORKINGRipley is asked to stop; this is best-effort, so read the state the cancel returns. A task that ends CANCELED incurs no charge. If the task completed before the cancel took effect, it comes back COMPLETED and is billed normally
INPUT_REQUIRED (question not yet answered)The task moves straight to CANCELED and is returned. No push notification is sent for this cancel (a push for the earlier INPUT_REQUIRED state may still arrive)
COMPLETED, FAILED, CANCELEDRefused with -32002 (TaskNotCancelable)

The REST equivalent is the chat cancel endpoint in the AI reference.

Push Notifications

Instead of polling or holding a stream open, register a webhook. When the task reaches COMPLETED, FAILED, CANCELED or INPUT_REQUIRED, Fastio sends one HTTPS POST to your URL with the task's new status. These are the same deliveries as the REST API's message webhooks; the full rules are under Push notifications (webhooks) in the AI reference.

Registering

Inline registration that fails. If the message was accepted but its inline webhook could not be registered (or carried over to a follow-up), the call still returns the task — the work has started — with metadata.fastio.pushRegistration set to "failed". Register the webhook again, or poll.

What Your Endpoint Receives

One POST with Content-Type: application/a2a+json, plus X-A2A-Notification-Token when you set a token. No other authentication is sent. The body follows the protocol version you registered with.

1.0:

{
  "statusUpdate": {
    "taskId": "{task_id}",
    "contextId": "{context_id}",
    "status": { "state": "TASK_STATE_COMPLETED", "timestamp": "2026-12-03T16:30:00Z" }
  }
}

0.3 (state is one of completed, failed, canceled, input-required):

{
  "id": "{task_id}",
  "contextId": "{context_id}",
  "kind": "task",
  "status": { "state": "completed", "timestamp": "2026-12-03T16:30:00Z" }
}

Timestamps

Timestamps Fastio emits in A2A payloads (status.timestamp, push bodies) are ISO 8601 UTC with a Z suffix (2026-12-03T16:30:00Z), as the A2A protocol requires. The statusTimestampAfter filter accepts any RFC 3339 timestamp, with Z or a numeric offset (2026-12-03T17:30:00+01:00). This is a deliberate exception to the YYYY-MM-DD HH:MM:SS UTC format used everywhere else in the Fastio API.

Errors

JSON-RPC errors come back in an HTTP 200 response as {"jsonrpc": "2.0", "id": …, "error": {"code", "message"}}. Messages are short fixed strings; branch on code.

CodeNameWhen
-32700Parse errorThe body is not valid JSON
-32600Invalid requestNot a valid JSON-RPC 2.0 request, or the body is larger than 1 MiB. The response id is null
-32601Method not foundUnknown method for the selected protocol version
-32602Invalid paramsMalformed or missing parameters: no or conflicting workspace, a missing or malformed contextId on ListTasks, a bad pageSize/pageToken, a push URL or token that fails validation, the push config limit or a conflicting re-registration, a conversation too long to continue (start a new context)
-32603Internal errorA server-side failure; safe to retry
-32001TaskNotFoundThe task does not exist, belongs to another account, or is in a workspace the caller cannot see; also a well-formed ListTasks contextId for a chat the caller cannot access
-32002TaskNotCancelableCancelTask on a task that has already finished
-32004UnsupportedOperationA reply to a task that is not INPUT_REQUIRED; subscribing to a finished task; the extended card; updating a push config; Ripley not available for this account or workspace
-32005Content type not supportedA message part that is not text
-32009Version not supportedAn A2A-Version header other than 1.0 or 0.3

Authentication failures are HTTP 401, not JSON-RPC errors (see Auth Failures).

Deviations from the A2A Specification

  1. Text parts only. File and data parts are refused (-32005), in and out. Answers are text with citations in the artifact metadata.
  2. ListTasks requires contextId. There is no account-wide task list. A well-formed contextId for a chat the caller cannot access answers -32001; a missing or malformed one is -32602.
  3. No extended agent card. GetExtendedAgentCard and agent/getAuthenticatedExtendedCard always return -32004.
  4. Trailing slash for per-workspace discovery. Give SDKs https://a2a.fast.io/w/{workspace_id}/ with the slash.
  5. history is always empty. The 0.3 task object omits history.
  6. Blocking sends stop waiting after about 290 seconds and return the task as it stands.
  7. Content-Type is not checked on requests. Send application/json anyway.
  8. Follow-ups only answer clarifying questions. A message with a taskId continues that task only while it is INPUT_REQUIRED.

Examples

Ask a Question (1.0, Per-Workspace Agent, Blocking)

curl -X POST "https://a2a.fast.io/w/{workspace_id}/" \
  -H "Authorization: Bearer {api_key_or_access_token}" \
  -H "A2A-Version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "SendMessage",
    "params": {
      "message": {
        "messageId": "{unique_message_id}",
        "role": "ROLE_USER",
        "parts": [ { "text": "Summarize the latest contract in this workspace." } ]
      }
    }
  }'

Response:

{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "task": {
      "id": "{task_id}",
      "contextId": "{context_id}",
      "status": { "state": "TASK_STATE_COMPLETED", "timestamp": "2026-12-03T16:30:00Z" },
      "artifacts": [
        {
          "artifactId": "answer-{id}",
          "name": "answer",
          "parts": [ { "text": "The latest contract …", "mediaType": "text/plain" } ],
          "metadata": { "citations": [ … ] }
        }
      ],
      "history": []
    }
  }
}

Ask a Question (0.3, Global Agent)

curl -X POST "https://a2a.fast.io/" \
  -H "Authorization: Bearer {api_key_or_access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "message/send",
    "params": {
      "message": {
        "kind": "message",
        "messageId": "{unique_message_id}",
        "role": "user",
        "parts": [ { "kind": "text", "text": "Which invoices are overdue?" } ],
        "metadata": { "fastio": { "workspace_id": "{workspace_id}" } }
      }
    }
  }'

Answer a Clarifying Question (1.0)

curl -X POST "https://a2a.fast.io/w/{workspace_id}/" \
  -H "Authorization: Bearer {api_key_or_access_token}" \
  -H "A2A-Version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "2",
    "method": "SendMessage",
    "params": {
      "message": {
        "messageId": "{new_unique_message_id}",
        "taskId": "{task_id}",
        "role": "ROLE_USER",
        "parts": [ { "text": "To the Archive folder." } ]
      }
    }
  }'

Start Without Waiting, With a Webhook (1.0)

curl -X POST "https://a2a.fast.io/w/{workspace_id}/" \
  -H "Authorization: Bearer {api_key_or_access_token}" \
  -H "A2A-Version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "3",
    "method": "SendMessage",
    "params": {
      "message": {
        "messageId": "{unique_message_id}",
        "role": "ROLE_USER",
        "parts": [ { "text": "List every contract that renews next quarter." } ]
      },
      "configuration": {
        "returnImmediately": true,
        "taskPushNotificationConfig": { "url": "https://{your_domain}/a2a/notify", "token": "{your_verification_token}" }
      }
    }
  }'

Read, Stream, List and Cancel (1.0)

# Read a task
curl -X POST "https://a2a.fast.io/w/{workspace_id}/" \
  -H "Authorization: Bearer {api_key_or_access_token}" -H "A2A-Version: 1.0" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":"4","method":"GetTask","params":{"id":"{task_id}"}}'

# Stream a new question (SSE)
curl -N -X POST "https://a2a.fast.io/w/{workspace_id}/" \
  -H "Authorization: Bearer {api_key_or_access_token}" -H "A2A-Version: 1.0" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":"5","method":"SendStreamingMessage","params":{"message":{"messageId":"{unique_message_id}","role":"ROLE_USER","parts":[{"text":"Which invoices are overdue?"}]}}}'

# List the tasks of one context
curl -X POST "https://a2a.fast.io/w/{workspace_id}/" \
  -H "Authorization: Bearer {api_key_or_access_token}" -H "A2A-Version: 1.0" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":"6","method":"ListTasks","params":{"contextId":"{context_id}","pageSize":20}}'

# Cancel a task (WORKING, SUBMITTED or INPUT_REQUIRED)
curl -X POST "https://a2a.fast.io/w/{workspace_id}/" \
  -H "Authorization: Bearer {api_key_or_access_token}" -H "A2A-Version: 1.0" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":"7","method":"CancelTask","params":{"id":"{task_id}"}}'
↑ Back to top