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

SourceWhat it records
callLifecycle transitions, end reasons, duration, and cost.
modelTurn latency, token counts, model used, and fallbacks.
transcriberStream connect/disconnect, endpointing, and confidence.
ttsTime to first byte, cancellations, and voice fallbacks.
toolArguments, results, status codes, and timeouts.
webhookDelivery attempts, response codes, and retry state.
authAPI 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:1h

Trace 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

PlanRetentionExport
Free7 daysManual CSV/JSON download.
Starter30 daysManual download and scheduled daily export.
Growth90 daysStreaming export to an HTTPS sink or S3 bucket.
Scale13 monthsStreaming 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.