Skip to main content

Module server

Module server 

Source
Expand description

RavenClaws

Provides a long-running HTTP server with health, readiness, metrics, and agent execution endpoints. RavenClaws to run as a stable workload in Kubernetes and other container orchestration platforms.

§Endpoints

  • GET /health — Liveness probe (always 200 when server is running)
  • GET /ready — Readiness probe (200 when fully initialized, 503 during startup)
  • GET /metrics — Prometheus-style metrics (requests, tokens, tool calls, errors)
  • GET /health/deep — Deep health check (verifies LLM connectivity)
  • POST /chat — Send a message and get an agent response
  • POST /execute — Submit a background task, returns task ID
  • GET /tasks/{id} — Poll background task status and result
  • GET /tools — List available tools with schemas
  • GET /tools/{name} — Get details of a specific tool
  • POST /tools/{name} — Execute a specific tool by name
  • POST /reload — Reload configuration (distroless-friendly SIGHUP alternative)

§Architecture

HttpServer
  ├── /health      → always 200 OK
  ├── /ready       → 200 OK when ready, 503 during startup
  ├── /metrics     → Prometheus text format
  ├── /health/deep → LLM connectivity check
  ├── /chat        → POST: agent response (JSON or SSE)
  ├── /execute     → POST: background task submission
  ├── /tasks/{id}  → GET: task status/result
  ├── /tools       → GET: list tools with schemas
  └── /tools/{name}→ POST: execute tool by name

Structs§

ServerMetrics
Shared metrics state for the HTTP server
ServerState
Shared state for the HTTP server

Functions§

run_server
Run the HTTP server