TheAgentHealth

← All documentation

Model / LLM examples

Requires a Phase 17 build (released in v0.15.0), a running model API and credentials/model IDs appropriate to that server. These are templates, not claims of tested hosted-provider compatibility.

Configuration Setup and behavior
OpenAI-compatible Set OPENAI_API_KEY; change the required model to one your account advertises. Passive listing only.
Anthropic Set ANTHROPIC_API_KEY; adjust required model ID. Uses x-api-key.
Ollama Start a local OpenAI-compatible /v1 endpoint and install the configured model. Includes active inference.
Functional Set OPENAI_API_KEY; choose a model supporting max_completion_tokens. May incur charges.
Shared graph Start the configured agents and path handler plus local model API. Passive model evidence is shared by agent dependencies.
agenthealth ping llm http://localhost:11434/v1
agenthealth check examples/model-check/openai.yaml --format json
agenthealth doctor examples/model-check/anthropic.yaml

Functional checks require explicit opt-in and are never retried. The requested token bound depends on the server honoring it; reported excess usage is degraded. See the model guide and alignment audit.

Configuration files

openai.yaml

version: v1
targets:
  - name: openai
    type: llm
    endpoint: https://api.openai.com/v1
    auth:
      bearer_env: OPENAI_API_KEY
    model:
      required_models: [gpt-test]
    thresholds:
      latency_ms: 2000

anthropic.yaml

version: v1
targets:
  - name: anthropic
    type: llm
    endpoint: https://api.anthropic.com/v1
    auth:
      bearer_env: ANTHROPIC_API_KEY
    model:
      api: anthropic
      required_models: [claude-test]
    thresholds:
      latency_ms: 2000

ollama.yaml

version: v1
targets:
  - name: local-llm
    type: llm
    endpoint: http://localhost:11434/v1
    checks: [reachability, protocol, capability, functional, latency]
    timeout_ms: 30000
    model:
      required_models: [qwen2.5:0.5b]
      functional:
        safe: true
        model: qwen2.5:0.5b
        prompt: Reply with OK.
        max_output_tokens: 4

functional.yaml

version: v1
targets:
  - name: openai-inference
    type: llm
    endpoint: https://api.openai.com/v1
    auth:
      bearer_env: OPENAI_API_KEY
    checks: [reachability, authentication, capability, functional, latency]
    timeout_ms: 15000
    model:
      required_models: [gpt-test]
      functional:
        safe: true
        model: gpt-test
        prompt: Reply with OK.
        max_output_tokens: 16
        token_parameter: max_completion_tokens

graph.yaml

version: v1
targets:
  - id: first
    name: direct-agent
    type: agent
    endpoint: http://localhost:8080/health
    dependencies:
      - ref: peer
        relationship: downstream
      - ref: communication
        relationship: path
      - ref: shared-model
        relationship: supporting
  - id: peer
    name: composite-agent
    type: agent
    endpoint: http://localhost:8081/health
    dependencies:
      - ref: shared-model
        relationship: supporting
  - id: communication
    name: direct-to-composite-path
    type: http
    endpoint: http://localhost:8080/peer-health
    http:
      method: GET
  - id: shared-model
    name: supporting-model
    type: llm
    endpoint: http://localhost:11434/v1
    model:
      required_models: [qwen2.5:0.5b]