Repository navigation
feat(a2a): add recurring liveness probes for A2A agents - #936
Merged
Merged
Conversation
Add periodic liveness probes for both external (URL-configured) and local (docker) A2A agents, mirroring the MCP manager's probe loop pattern. - Add LivenessProbeEnabled and LivenessProbeInterval fields to A2AConfig (default: enabled, 30s interval) - Replace one-shot monitorExternalAgents with a ticker-driven periodic probe per external agent - Add periodic /health endpoint probing for locally started (docker) agents after they first become ready - Emit status updates only on state change (Failed->Ready with Recovered message, Ready->Failed) - Cancel probes cleanly on session shutdown via context cancellation in StopAgents - Bypass A2A agent card cache during probes by creating a fresh ADK client per probe
6 tasks
edenreich
reviewed
Jul 18, 2026
edenreich
reviewed
Jul 18, 2026
edenreich
reviewed
Jul 18, 2026
edenreich
reviewed
Jul 18, 2026
Co-authored-by: Eden Reich <[email protected]>
Co-authored-by: Eden Reich <[email protected]>
edenreich
reviewed
Jul 18, 2026
Co-authored-by: Eden Reich <[email protected]>
- Derive AgentReadinessState.ReadyAgents from the per-agent states instead of a maintained counter, so the A2A: n/m indicator counts down when an agent fails and never exceeds the total after recovery (was showing 2/1) - Refresh the /a2a agents view on entry so it no longer shows a stale snapshot from the last time it was open (e.g. 'pulling' while the status bar already showed all agents ready) - Replace the per-probe cancel funcs (clobbered by each probe start, racy, could deadlock StopAgents) with a single probe-stop channel closed once - Make local health probes context-aware so shutdown aborts in-flight checks - Seed agent state on local agent startup to avoid a duplicate Ready event
edenreich
marked this pull request as ready for review
July 18, 2026 21:01
Closed
3 tasks
3 tasks done
Contributor
|
🎉 This PR is included in version 0.149.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #932
Summary
Add recurring liveness probes for A2A agents (both external URL-configured and local docker agents), mirroring the MCP manager's probe loop pattern. External agents are now re-probed periodically instead of just once at startup, and local agents get periodic /health checks after they first become ready. Status updates are emitted only on state changes, and probes shut down cleanly with the session.
Changes
LivenessProbeEnabledandLivenessProbeIntervalfields toA2AConfig(defaults: enabled, 30s interval)monitorExternalAgentswith a ticker-driven periodic probe per external agent; addprobeExternalAgentthat bypasses the A2A card cache for fresh probes; addstartLocalAgentProbe,probeLocalAgent, andhandleLocalProbeResultfor periodic /health checks on docker agents; addprobeCancel/probeWgfields for clean shutdown; updateStopAgentsto cancel probes and wait before stopping containers