Agent, peer and communication-path checks
This Phase 7 configuration is a template for your running services. Phase 7 requires v0.5.0 or newer; see installation.
Before running agenthealth.yaml:
- Expose the first agent's HEAD/GET health resource at port 8080, implementing the agent health document.
- Expose the A2A peer at port 8081 with an agent card advertising skill
answer. - Implement a safe POST probe handler in the first agent. When it receives
downstream: peer, it must contact that peer using its configured direct or A2A integration and report completed success/failure with the same peer ID. - Replace the optional model-health HTTP URL with your supporting service's health endpoint. This checks HTTP health, not model inference.
AgentHealth implements sending and evaluating probes. This example does not start servers or install the receiving handler. Peer endpoint health alone cannot prove the first agent can communicate with the peer.
go run ./cmd/agenthealth check examples/agent-check/agenthealth.yaml --format json
go run ./cmd/agenthealth doctor examples/agent-check/agenthealth.yaml
The result tree separates first, peer, first-to-peer, and model-health.
The peer and path are critical; the model-health dependency is optional.
The path probe is explicitly active and executes once. Configure credentials
independently for each target when your services require authentication.
Phase 10 compatibility
This nested example remains valid. To share a backend across paths, give that node an explicit id and use ref edges. Each communication path keeps a distinct node and its own checks; edge policy remains independent. See the graph example. Graph fields require v0.8.0 or newer; v0.7.0 binaries reject them.
Kubernetes compatibility
This example includes an active first-to-peer probe; do not copy it unchanged into periodic readiness checks. The passive Kubernetes fixture keeps peer health and supporting path evidence distinct. See deployment scenarios and the deployment guide.
Configuration files
agenthealth.yaml
version: v1
targets:
- name: first
type: agent
endpoint: http://localhost:8080/health
agent:
required_capabilities: [answer]
dependencies:
- name: peer
type: a2a
endpoint: http://localhost:8081
a2a:
required_skills: [answer]
- name: first-to-peer
type: agent
endpoint: http://localhost:8080/health
checks: [functional]
agent:
functional:
safe: true
text: Return a fixed health acknowledgement without tools or writes.
downstream: peer
- name: model-health
type: http
endpoint: http://localhost:8082/health
critical: false