Streaming, Push Notifications & Long-Running Tasks
A2A supports synchronous message exchange, streaming task updates and push notifications for long-running/disconnected clients.
type TaskUpdate =
| { type: 'status'; taskId: string; state: string }
| { type: 'artifact'; taskId: string; artifactId: string; append?: boolean };
For push notifications, authenticate the sender, validate webhook URLs, prevent SSRF, deduplicate events and fetch authoritative task state rather than trusting a single webhook payload as the sole source of truth.
Practice
- When is streaming preferable to polling?
- When are push notifications preferable to an open stream?
- Why must webhook endpoints defend against SSRF?
- What should a client do after receiving a push notification?