examples/

directory
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2026 License: Apache-2.0

README

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.14.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
OpenAI model Model listing, bearer credentials and a required model
Anthropic model api: anthropic listing with x-api-key credentials
Ollama model Local OpenAI-compatible server with a bounded inference
Model minimal inference Opt-in inference using max_completion_tokens

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.

Python SDK example: sync/async checks using reviewed CLI configurations.

Phase 18 adds native database health for PostgreSQL, MySQL, Redis and MongoDB. Fixed SQL queries require explicit functional opt-in. See the alignment audit and disposable examples.

Phase 19 implements Qdrant and Pinecone vector-store checks with explicit read-only query opt-in. See the phase alignment audit.

Run the vector-store examples for passive metadata and explicit top-1 query checks against the disposable Qdrant service.

Phase 20 supplies the supported LangGraph/FastAPI runtime integration with safe peer hooks and an SDK consumer node. Other framework products remain planned.

CI/CD deployment validation

Provider templates cover GitHub Actions, GitLab, Jenkins, Azure DevOps and shell with JUnit failure reports. Existing agent, gateway/router and graph examples supply the configuration evidence; use reviewed deployment targets.

Observability export (Phase 22)

Released in v0.20.0: --format prometheus|logs|otlp|webhook produces redacted snapshots. See the export guide and cross-phase alignment. Delivery is explicit and external; SDK JSON, AHP, health codes and adapter checks remain unchanged.

Executable adapter ecosystem (Phase 23)

Released in v0.21.0: explicit local manifests and SHA-256-pinned executable adapters with bounded JSON transport, cancellation and normalized engine output. See the guide and all-phase alignment. Processes retain the invoking user’s OS permissions; no sandbox or certification is implied. Built-in adapters and AHS/AHP v1 contracts remain compatible.

Conformance (Phase 24)

Implemented in source: offline result validation and reference behavioral conformance. agenthealth conformance test <result.json> validates bounded local v1 JSON evidence without executing checks. It returns 0 for conformant evidence and 6 otherwise; health command exits are unchanged. Run python3 scripts/test_conformance.py --report conformance-report.json from the source root for mandatory behavioral evidence. Neither profile establishes certification or product interoperability.

Directories

Path Synopsis
This example exercises Phase 2 without implementing the Phase 3 CLI.
This example exercises Phase 2 without implementing the Phase 3 CLI.
This executable demonstrates the v1 wire protocol without making network calls.
This executable demonstrates the v1 wire protocol without making network calls.
reference
go
Package agenthealthref provides a reference application contract, not an SDK.
Package agenthealthref provides a reference application contract, not an SDK.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL