Observability
Logging
Every call, model turn, tool invocation, and webhook delivery emits a structured JSON log line. Read them in the dashboard, query them by field, or stream them to your own log platform.
Log structure
json
{
"ts": "2026-08-02T15:07:41.284Z",
"level": "info",
"source": "tool",
"workspace_id": "ws_42",
"agent_id": "agt_123",
"call_id": "cl_889",
"trace_id": "tr_5f2c",
"event": "tool.completed",
"tool": "book_appointment",
"duration_ms": 412,
"status_code": 200
}Sources
| Source | What it records |
|---|---|
| call | Lifecycle transitions, end reasons, duration, and cost. |
| model | Turn latency, token counts, model used, and fallbacks. |
| transcriber | Stream connect/disconnect, endpointing, and confidence. |
| tts | Time to first byte, cancellations, and voice fallbacks. |
| tool | Arguments, results, status codes, and timeouts. |
| webhook | Delivery attempts, response codes, and retry state. |
| auth | API key usage, scope denials, and key rotations. |
Levels
- debug โ Per-turn detail including partial transcripts. Off by default; enable per agent while investigating.
- info โ Normal operation. Everything a healthy call emits.
- warn โ Recovered problems โ a fallback fired, a retry succeeded, a tool was slow.
- error โ Something failed and affected the call. These drive alerts.
Querying
Open Data โ Logs and filter by any field. Queries support equality, negation, and ranges, and every result links back to the call it belongs to.
text
source:tool status_code:>=400 last:24h
agent_id:agt_123 event:pipeline-error-llm last:7d
level:warn -tool:check_calendar last:1hTrace IDs
Every call gets a trace_id shared by all its log lines across sources. Pass it through to your own systems โ it is sent on webhooks as x-katexs-trace-id โ so a customer complaint can be resolved end to end from one identifier.
Export and retention
| Plan | Retention | Export |
|---|---|---|
| Free | 7 days | Manual CSV/JSON download. |
| Starter | 30 days | Manual download and scheduled daily export. |
| Growth | 90 days | Streaming export to an HTTPS sink or S3 bucket. |
| Scale | 13 months | Streaming export plus custom retention windows. |
json
{
"log_export": {
"type": "https",
"url": "https://logs.example.com/ingest/katexs",
"auth": { "type": "bearer", "secret_ref": "LOG_SINK_KEY" },
"format": "ndjson",
"sources": ["call", "tool", "webhook"],
"min_level": "info"
}
}Transcripts and recordings are governed by your data retention policy in Settings, not by log retention. Deleting a call removes both.
