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 aTask 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.
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
FAILEDof an agent that raised; - a task settled
FAILEDwhen its server shut down, withaion:settledReasonset toserver_shutdown; - a task settled
FAILEDas abandoned afterAION_STALE_TASK_TIMEOUT, withaion:settledReasonset totask_abandoned.
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.