A pizza order you check by calling the shop every five minutes is the customer paying with calls. One where the shop texts you is the shop paying with an open line to your phone. Learning that a long A2A job finished costs somebody something. The three mechanisms spend it differently.
In plain words: polling spends the caller's requests, streaming spends an open connection for the job's whole length, and push spends a public receiver the server must be trusted to call correctly.
The venue agent has a "thorough search" that takes 20 virtual seconds. There are three ways to learn it is done, and each was measured.
Requests and bytes for one 20-second job.
Mechanism
Requests
Bytes
Learned it was done
Poll every 1 s
102
77,964
on time
Poll every 7 s
17
13,415
5 s late
Poll every 30 s
6
5,031
20 s late
Stream (server-sent events)
1
2,373
on time (6 events)
Push notification
1 (+5 webhook posts)
2,578
on time (5 events)
The trade-off is the usual one. Polling costs requests (or lateness). Streaming needs an open connection for the whole job. Push needs a public receiver and a way to trust what arrives. The server will make an HTTP request to an address the client gave it. That is a server-side request forgery (SSRF) opening the server must guard against:
# from code/mini-a2a/net.pydefguarded_fetch(net:Network,req:Request,allow_loopback:bool=False,max_hops:int=3,pin:bool=True)->Response:host=p.hostnameips=net.resolve(host)loop=all(ipaddress.ip_address(i).is_loopbackforiinips)ifany(is_internal(i)foriinips)andnot(allow_loopbackandloop):raiseBlocked(f"{host} resolves to an internal address ({ips[0]})")ifp.scheme=="http"andnot(allow_loopbackandloop):raiseBlocked("plain http is only allowed to loopback during development")ip=ips[0]ifpinelsenet.resolve(host)[0]# connect to the address we just checked, not to a second lookup
Read it as: the name is resolved once and checked against private, loopback, link-local and reserved ranges before any connection is made. The comment on the last line is the point. The connection uses the address already checked, not a second lookup. So a name cannot change between the check and the use. Three honeypots (10.0.0.5, 169.254.169.254, 127.0.0.1) record any hit. The tests assert there are none. That includes when an agent's own executor tries to fetch a URL it found in a message.
Server-sent events, push notification
Server-sent events are a stream of updates sent over one open HTTP connection, which the client reads as they arrive. A push notification is the server calling back to an address the client registered, after the client has disconnected.
Example: streaming costs one open connection for 20 seconds; push costs the server a trip to the client's own webhook, which is why that address must be checked for SSRF before it is ever called.
Streaming has two details that matter. The first event is the full task (a client that subscribes to a running task gets a snapshot of what exists, including artifacts so far, and then changes), and a dropped connection is repaired by subscribing again. The test cuts a stream after two events, resubscribes, and gets the final state and the artifacts.
Three more push details:
Credentials travel with the notification (a Bearer credential, and a token header). The choice: the specification's 1.0 text does not say where the extra token is sent; the example uses the 0.3 header X-A2A-Notification-Token. And configuration is redacted on reads: a client can list its configs and see the scheme, never the secret.
A race. Webhook events can arrive before the reply to the send call, so a receiver cannot be told "expect task X" up front. The example's receiver instead binds a credential to a task on first use and refuses the same credential for a different task. A receiver written the obvious way, which must already know the task id, got 15 delivery attempts, all answered 404.
Retries. A failing receiver gets retried three times and then dropped; an unreachable one must not fail the task. (One planted defect, no_push_retry, escapes the suite; see part 8.)