Skip to main content

Overview

Heartbeat commands provide real-time monitoring of AI provider availability, latency, quota usage, and model discovery.

Commands

status

Check health status of all configured providers.
Output:
The status command automatically discovers providers from your config.yaml and environment variables.

check

Check health of a specific provider.
string
required
Provider name to check. Available providers:
  • gemini - Google Gemini (CLI)
  • claude - Anthropic Claude (CLI)
  • ollama - Local Ollama instance
  • gemini-api - Gemini via API
  • claude-api - Claude via API
  • openai - OpenAI API
  • groq - Groq API
  • Custom provider names from config
Output:
Error Example:

quota

Display quota usage for all API-based providers.
Output:
Quota information is extracted from API response headers during health checks. Values represent token usage or request counts depending on the provider.

discover

Force model discovery for local providers.
Output:
No Models:
Error:
Model discovery requires the memory system to be initialized:

Provider Types

Heartbeat monitors three types of providers:

CLI-Based Providers

  • gemini-cli - Google Gemini via gcloud CLI
  • claude-cli - Anthropic Claude via CLI
These providers don’t report quotas but are checked for availability.

API-Based Providers

  • gemini-api - Google Gemini via REST API
  • claude-api - Anthropic Claude via REST API
  • switchai-api - SwitchAI proprietary API
  • groq - Groq inference API
These providers report quota usage and rate limits.

Local Providers

  • ollama - Local Ollama instance
  • vibe - Local Vibe AI
Local providers support model discovery and typically have low latency.

Configuration

Providers are auto-registered from your config.yaml:

Environment Variable Fallbacks

If providers aren’t in your config, heartbeat checks these environment variables:

Health Check Details

A provider is marked healthy when:
  • Connection succeeds within 5 seconds
  • Authentication is valid
  • At least one model is available
  • Latency is under 3 seconds
A provider is marked degraded when:
  • Connection succeeds but latency > 3 seconds
  • Some models unavailable
  • Quota approaching limits
Degraded providers remain usable but may have performance issues.
A provider is marked unavailable when:
  • Connection fails
  • Authentication fails
  • No models available
  • Quota exceeded

Status Interpretation

healthy

All systems operational. Provider ready for requests.

degraded

Provider functional but experiencing issues. Fallback recommended.

unavailable

Provider offline or inaccessible. Requests will fail.

unknown

Provider not yet checked or check timed out.

Steering and Hooks Integration

Heartbeat status can trigger automated responses:

Steering Rules

Automatically route around unhealthy providers:

Hooks

Receive alerts when providers become unhealthy:

Troubleshooting

Providers are auto-registered from config:
  1. Check your config.yaml has provider sections
  2. Verify API keys are set (not placeholders)
  3. Set environment variables as fallback:
Ensure Ollama is running:
Verify API keys are valid:
Quota info requires:
  1. API-based provider (not CLI)
  2. Valid authentication
  3. Provider supports quota headers