Production
Observability
Governance-first observability: a live dashboard of runs, decisions, spend, and guardrail blocks — plus optional OpenTelemetry export. It rides the existing audit pipeline, so there are no runtime changes.
Enable it
observe.py
runtime = Antraft.agent(model, tools, task="...").observe().build()await runtime.run()Then run the control plane and open the dashboard:
shell
antraft serve# http://localhost:8000/observabilityNote
The dashboard is governance-first: it shows not just what happened, but what was allowed, denied, paused, or blocked — and the spend behind every run.
What you see
- Live and completed runs, with status (running / completed / killed).
- Per-run decision counts: allow / deny / pause.
- Token usage and dollar cost.
- Guardrail blocks.
- Final answers.
Programmatic access
tracer.py
from antraft import get_tracer snap = get_tracer().snapshot()snap["totals"] # {"runs": ..., "allow": ..., "deny": ..., "cost_usd": ...}snap["runs"] # per-run summariesOpenTelemetry
If opentelemetry is installed, audit events are also emitted as span events — wire Antraft into your existing tracing backend with no extra code.