You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Give Google ADK Go model, MCP and A2A Activities a 10-second default heartbeat timeout #511
Is your feature request related to a problem? Please describe.
In Google ADK Go, InvokeModel gets a 30-second HeartbeatTimeout only when it streams (WithStreaming). The MCP and A2A Activities get none. They all heartbeat on a timer, but only when a heartbeat timeout is set. So by default:
A cancel never reaches a running MCP call, A2A send, or model call that doesn't stream. It runs to the end. A streamed model call hears it, but slowly.
A lost worker goes unnoticed until the start-to-close timeout: 2 minutes for a model call, 1 minute for the others.
Default HeartbeatTimeout to 10 seconds for InvokeModel (streamed or not), ListMcpTools, CallMcpTool, ResolveA2AAgentCard, SendA2AMessage and CancelA2ATask. A timeout you set wins.
A negative HeartbeatTimeout turns heartbeats off. In Go, zero already means "not set". Today the server rejects a negative one and the workflow task fails, so no working code changes meaning. If we ever need more, we can add a boolean.
Heartbeat every half of the timeout, like the other plugins, with the first heartbeat half the timeout into a call instead of as soon as it starts. Then a short call sends none.
Document it all in the README, with the cancel's limits: the server caps its heartbeat timeout at its 5-second start-to-close timeout, and nothing cancels a cancellation, so its heartbeats only notice a lost worker.
ActivityAsTool runs your own Activity, so it stays as it is.
Additional context
What does it cost? In Temporal Cloud, each heartbeat that reaches the server is an Action. With the first one 5 seconds in, a shorter call sends none, and a 30-second call sends four. I counted them against a dev server.
Activity
Give Google ADK Go model, MCP and A2A Activities a 10-second default …