TheAgentHealth

← All documentation

Example configurations

See the all-phase status index for implementation, documentation, and example coverage across Phases 0–26.

These configurations are templates for your own running services. Replace placeholder endpoints, issuer URLs, client IDs, command paths, and required inventories before using them. Most adapter examples do not start an example server or provision an OAuth client. The Kubernetes scenarios separately provide a deterministic HTTP fixture and deployment manifests. Install the CLI using installation instructions, or build it as described in CLI usage. Phase 13 packaging does not change these configurations or their service/runtime prerequisites.

Example What it demonstrates
Agent, peer and communication path First-agent health, A2A peer, safe path probe and optional supporting dependency; requires a runtime probe handler
Agentgateway, backend and path Read-only gateway readiness, direct downstream health and proxied A2A evidence
Agent Router, backend and routes Read-only router readiness, direct and routed A2A evidence, and bounded opt-in route matching
Shared dependency graph Shared node references, separate downstream/path evidence, concurrency and independent edge policies; requires v0.8.0 or newer
Experimental AHP serving Background snapshots, public readiness/liveness, bearer-authorized evidence; requires v0.9.0 or newer
Standalone distribution Local archive/package preparation, verification and native smoke test; requires source tooling from v0.11.0 or newer
Kubernetes deployments Readiness/startup probes, init gates, sidecars, Jobs/CronJobs, Secrets, Helm and Kustomize; source integration pins CLI v0.11.0
HTTP readiness HTTP status checks and latency thresholds
MCP discovery Required tool names and resource URIs, with automatic protocol selection
Modern MCP Pinning stateless MCP 2026-07-28
MCP functional probe One explicitly safe tool invocation
MCP stdio A configured local subprocess
OAuth browser login Authorization code + PKCE, private token storage, and subsequent refresh
OAuth client credentials Noninteractive token acquisition using MCP_CLIENT_SECRET
OAuth refresh token Acquisition using MCP_REFRESH_TOKEN, with persisted token rotation
A2A passive peer A2A 0.3.0 card discovery, required skill, passive protocol/authentication, and latency
A2A bearer credentials Passive checks using AGENT_TOKEN
A2A custom card A custom card path on the target origin
A2A minimal interaction One explicitly safe text interaction

Passive MCP checks

Point the HTTP examples at the actual MCP endpoint, including /mcp only if that is the server's configured route. Default selection probes the modern protocol and falls back to legacy initialization when appropriate. A pinned modern target requires a server supporting 2026-07-28.

agenthealth check examples/mcp-check/agenthealth.yaml
agenthealth check examples/mcp-check/modern.yaml --format json
agenthealth doctor examples/mcp-check/agenthealth.yaml

For stdio, replace the Python command, server script, and working directory with your trusted server's values. Add mcp.stdio.env references if it needs credentials; see stdio setup.

agenthealth check examples/mcp-stdio/agenthealth.yaml

OAuth checks

Register a client with the authorization server first, then configure the matching issuer, client ID, scopes, and MCP endpoint. For the browser example, allow the callback http://127.0.0.1:8765/callback in the client registration. Login prints the authorization URL for you to open and saves credentials under .credentials/. Health checks use saved tokens and refresh them without prompting for browser approval.

agenthealth login examples/mcp-oauth/agenthealth.yaml user-mcp
agenthealth check examples/mcp-oauth/agenthealth.yaml

For automated acquisition, set MCP_CLIENT_SECRET or MCP_REFRESH_TOKEN in your environment as appropriate; keep the actual values out of these files. The refresh-token example persists rotated tokens in its private token file.

agenthealth check examples/mcp-oauth/client-credentials.yaml
agenthealth check examples/mcp-oauth/refresh-token.yaml

See OAuth configuration and security. Existing client registration is required; dynamic registration and JWT client assertions are not implemented.

Functional probes

Review the configured tool and arguments for non-destructive behavior before using the functional example. Its safe: true declaration is an operator assertion. The server must also advertise readOnlyHint: true and destructiveHint: false. Each probe calls the selected tool once, without retries; the example expects a tool named search accepting a query string.

agenthealth check examples/mcp-check/functional.yaml

See functional invocation.

A2A peer checks

A2A configuration checks a local A2A 0.3.0 JSON-RPC peer at port 9000 with a required health skill. Start your own peer and adjust the endpoint and skill expectation to match its card.

agenthealth check examples/a2a-check/agenthealth.yaml --format json

See the A2A example setup guide and A2A adapter guide for bearer credentials, capability expectations, custom card URLs, and opt-in interactions.

Agentgateway checks

Configure your running agent, gateway and downstream endpoints using the gateway setup guide, then run:

agenthealth check examples/gateway-check/agenthealth.yaml --format json

Agent Router checks

Phase 9 is released in v0.7.0. Configure your running agent, router and downstream endpoints using the router setup guide. The functional route must be read-only and support the configured response marker.

agenthealth check examples/router-check/agenthealth.yaml --format json

See the router guide for distinct signal/backend/path evidence, functional bounds, credentials and interface limitations.

Shared dependency graph

Phase 10 example uses explicit node references, downstream/path relationships and independent critical/optional edges.

Experimental AHP serving

Use v0.9.0 or newer and start the serving example:

agenthealth serve examples/ahp-check/agenthealth.yaml

AHP is included in v0.9.0 and is absent from v0.8.0 binaries. See the AHP guide for endpoint access and refresh semantics.

Kubernetes

See Kubernetes scenarios for probes, init gates, sidecars, Jobs/CronJobs, existing Secrets and the published Helm chart. Future releases follow the synchronized distribution policy.