A2A agent
Send the drive a task in words. Our agent does it with the MCP server's tools, on the text model you picked in the app, and it can wait for things to happen before it finishes.
- Endpoint
- mcp.freakingfast.io/a2a
- Protocol
- A2A 1.0JSON-RPC
- Updates
- Poll or push
Sign in#
The agent signs in the way MCP clients do: OAuth through the drive, with the same consent page and the same limits. An API token works as a bearer token too, with or without limits. The card at /.well-known/agent-card.json lists both, with the OAuth endpoints.
Every request carries A2A-Version: 1.0. A request without it is treated as 0.3, which this agent doesn't speak.
Send a task#
SendMessage starts a task. By default it answers when the task is done. With returnImmediately it answers at once, while the task carries on.
curl https://mcp.freakingfast.io/a2a \
-H "Authorization: Bearer $TOKEN" \
-H "A2A-Version: 1.0" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "SendMessage",
"params": {
"message": {
"messageId": "b7f0c2d4-5e61-4a8f-9d3b-1c2e4f6a8b90",
"role": "ROLE_USER",
"parts": [
{ "text": "When the client sends the raw footage, make a review link for it" }
]
},
"configuration": { "returnImmediately": true }
}
}'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"task": {
"id": "8d2f0b6e-41c9-4b1e-a2f3-5c7d9e0f1a2b",
"contextId": "c51e7a90-2b4d-4f6e-8a1c-3d5e7f9a0b1c",
"status": {
"state": "TASK_STATE_WORKING",
"timestamp": "2026-10-01T09:12:44.000Z"
}
}
}
}params
- message.
messageIdstringrequired - Your id for the message.
- message.
rolestringrequired ROLE_USER- message.
partsPart[]required - Each part is one of
text,raw(base64 bytes, saved to the drive as a private file when the connection can add files),url(a link it can bring in) ordata. - message.
contextIdstring - Continue an earlier conversation. See below.
- configuration.
returnImmediatelyboolean - Answer before the task is done.
- configuration.
historyLengthinteger - How much history the answer carries.
- configuration.
taskPushNotificationConfigobject - A webhook for this task, set before it starts. See Push notifications.
Follow a task#
GetTask takes an id and an optional historyLength. ListTasks pages through yours, newest first.
ListTasks params
- contextIdstring
- Only tasks in this conversation.
- statusTaskState
- Only tasks in this state.
- statusTimestampAfterstring
- Only tasks whose status changed after this ISO 8601 time.
- pageSizeinteger
- 1 to 100. 50 when left out.
- pageTokenstring
- The nextPageToken of the page before.
- historyLengthinteger
- How much of each task’s history to include.
- includeArtifactsboolean
- Include each task’s artifacts.
| State | Means |
|---|---|
TASK_STATE_SUBMITTED | Taken, not started yet. |
TASK_STATE_WORKING | Running, or waiting on something it set up to wait for. |
TASK_STATE_COMPLETED | Done. The reply is the status message, and the Reply artifact. |
TASK_STATE_FAILED | It couldn’t finish. The status message says why. |
TASK_STATE_CANCELED | Canceled by you, from the app, or by CancelTask. |
CancelTask stops a task that is still working. A task belongs to the credential that started it: another app or token on the same account can't see it.
Conversations#
Tasks that share a contextId are one conversation, and the agent reads the earlier ones before it starts. Leave it out and you get a new one, returned on the task.
A task can't be picked up again once it has finished. Send the follow-up as a new message with the same contextId and no taskId.
Tasks that wait#
When a task needs something that hasn't happened yet, the agent sets it up and waits. The task stays TASK_STATE_WORKING, and picks up again with what happened. It can wait for files to arrive at a request, notes on a review, someone to open a file, files to land in a folder, or an image to finish.
| Limit | Value |
|---|---|
| Waiting at once, per account | 20 |
| Longest wait | 30 days, or until what it waits on closes |
Everything waiting shows under API tokens in the app. Stopping one there cancels its task.
Push notifications#
Give a task a webhook and every change to it is posted there: the whole task, without its history, as { "task": … }. Set one with configuration.taskPushNotificationConfig on SendMessage, or later with CreateTaskPushNotificationConfig.
Push notification config
- urlstringrequired
- An https URL on the public internet.
- tokenstring
- Sent back as
X-A2A-Notification-Token, so you know it's us. - authentication{ scheme, credentials }
- Sent as
Authorization: scheme credentials. - idstring
- Your id for the config. One with the same id replaces it.
POST https://your-app.example/hooks/a2a
Content-Type: application/json
X-A2A-Notification-Token: the token you gave
Authorization: Bearer the credentials you gave
{
"task": {
"id": "8d2f0b6e-41c9-4b1e-a2f3-5c7d9e0f1a2b",
"contextId": "c51e7a90-2b4d-4f6e-8a1c-3d5e7f9a0b1c",
"status": {
"state": "TASK_STATE_COMPLETED",
"message": { "role": "ROLE_AGENT", "parts": [{ "text": "The footage is in. Here is the review link." }] },
"timestamp": "2026-10-02T15:03:10.000Z"
},
"artifacts": [{ "artifactId": "…", "name": "Reply", "parts": [{ "text": "…" }] }]
}
}- Up to 5 webhooks a task. Tokens and credentials are kept encrypted.
- Redirects aren't followed, and names that point at private addresses are refused as it connects.
- A failed delivery is tried twice more, after 2 and 10 seconds, unless a newer status has gone out since.
Methods#
| Method | |
|---|---|
SendMessage | Start a task. |
GetTask | One task, by id. |
ListTasks | Your tasks, a page at a time. |
CancelTask | Stop a task that is still working. |
CreateTaskPushNotificationConfig | Add a webhook: taskId plus a config. |
GetTaskPushNotificationConfig | One webhook, by taskId and id. |
ListTaskPushNotificationConfigs | A task's webhooks, by taskId. |
DeleteTaskPushNotificationConfig | Remove one, by taskId and id. |
SendStreamingMessage | Not supported. Use SendMessage, then GetTask or a webhook. |
Errors#
| Code | When |
|---|---|
-32001 | No task of yours has that id. |
-32002 | The task has already finished, so it can’t be canceled. |
-32004 | Not supported, like streaming or continuing a finished task. |
-32009 | The request didn't say A2A-Version: 1.0. |
-32602 | A parameter is missing or wrong. The message names it. |