Skip to main content
A run belongs to the agent server, not to the request that started it. It goes on when the client disconnects, and the task stores its outcome either way. A client follows the task through one of the A2A methods below.

Durable and ephemeral updates

An ephemeral update reaches only the streams open on the server running the task, as it happens. Everything durable can be read again later.

Delivery methods

SendMessage always answers with a Task, never a bare Message, and every stream closes with the stored Task. How a subscription is served when several servers share one database is described in Multiple Instances.

When a stream ends early

A stream that closes on a Task that is still SUBMITTED or WORKING, and a SendMessage answered with one, did not see the run end. Two things cause it:
  • a2a-sdk drops a subscriber that falls 1024 events behind, and logs Evicting event queue sink.
  • A stopping server closes its connections.
The run itself is not affected. Resubscribe with SubscribeToTask, or poll GetTask, for the outcome. To stop a run, call CancelTask; disconnecting does not stop it.

Push notifications

A webhook receives exactly what the task stores, and never an ephemeral update. That includes every outcome the task stores, also those the run did not write itself:
  • a cancel written by another server of the agent;
  • the FAILED of an agent that raised;
  • a task settled FAILED when its server shut down, with aion:settledReason set to server_shutdown;
  • a task settled FAILED as abandoned after AION_STALE_TASK_TIMEOUT, with aion:settledReason set to task_abandoned.
See Multiple Instances for when the server settles a task. Each delivery carries the configuration’s token as X-A2A-Notification-Token, and its authentication as Authorization: <scheme> <credentials>; credentials without a scheme are sent as Bearer. CreateTaskPushNotificationConfig answers with the configuration as stored: an id the request left empty is the task’s id. Deliveries are made one at a time from the task’s event loop, each after its change is stored. A webhook that answers slowly therefore holds back the delivery of the run’s later events, on every channel, for up to PUSH_NOTIFICATION_TIMEOUT_SECONDS (default 5 seconds) per delivery. Connecting to the webhook is limited to 5 seconds. On a server the Aion platform hosts, a webhook URL must be http or https and resolve to public addresses only; see Environment Variables.