Skip to main content

Observability & CLI

Production plumbing (metrics, cost, caching, retries) and operating Chronos from the command line. All run with no API key.


hooks_observability

All 6 hooks in action: metrics, cost tracking, rate limiting, caching, retry, and structured logging.

go run ./examples/hooks_observability/

Demonstrates:

  • MetricsHook — latency tracking, call counting, per-call metrics
  • CostTracker — per-model pricing, budget limits, token accounting
  • CacheHook — LLM response caching with TTL and max entries
  • RateLimitHook — token-bucket rate limiting
  • RetryHook — exponential backoff with retry callbacks
  • LoggingHook — structured event logging
  • Hook chain composition

See the Cost Tracking and Hooks guides for details.


cli_agent

Build, inspect, and run an agent from YAML via the Chronos CLI.

go run ./examples/cli_agent/

Demonstrates:

  • Loading an agent definition from YAML
  • Inspecting the resolved agent configuration
  • Running it headlessly from the CLI

Source: examples/cli_agent


cli_ops

Operate Chronos from the CLI: serve the control plane, monitor runs, inspect the database, manage sessions, pipe input, and deploy teams.

go run ./examples/cli_ops/

Demonstrates:

  • serve — start the ChronosOS control plane
  • monitor — watch live runs and events
  • db / sessions — inspect persisted state
  • pipe — headless batch input
  • deploy — launch a team from a deployment config

Source: examples/cli_ops