Kalibr's architecture provides full-stack observability and cost tracking for multi-agent systems. This document outlines the internal components, data flow, and deployment topology.
Location: /sdk/python/kalibr/
Purpose: Zero-config instrumentation for AI SDKs (OpenAI, Anthropic, Google)
Key Modules:
instrumentation/ — Provider-specific monkey patchessimple_tracer.py — Core tracing utilitiescollector.py — OTel span collectortrace_capsule.py — Cross-service context propagationLocation: /tmp/kalibr_otel_spans.jsonl
Purpose: Temporary span storage prior to ingestion
Append-only writes, lock-free, high-speed buffering. Safe fallback when ClickHouse is unavailable.
Location: /backend/collectors/otel_bridge.py
Purpose: Syncs JSONL spans into ClickHouse for persistence and analytics
Performance:
Ports: 9000 (native), 8123 (HTTP)
Purpose: Analytical storage for high-volume traces
Optimizations:
Port: 27017
Purpose: Stores runtime, alert, and user metadata
Collections:
runtimes — agent/service registrationalerts — rule definitionsusers — dashboard accountsPort: 8001
Purpose: Unified REST API for querying traces and metrics
Routers:
/api/otel/* — Trace queries + metrics/api/v1/* — Legacy endpoints/api/health — System health checkPort: 3000
Purpose: Interactive visualization of cost + behavior metrics
Pages:
kalibr SDK/tmp/kalibr_otel_spans.jsonldocker compose up -d
Minimum Requirements:
Kalibr Enterprise provides fully managed Kubernetes deployment with: