Skip to content

Logs

Session logs and conversation analysis for observability.

Key response fields

FieldDescription
ewma / avg_ewmaAlignment trend score (0–100). Higher = more on-topic.
alignment_scorePer-round alignment score (0–1)
stateEcho alignment state — see Echo state values
drift_roundsNumber of rounds in any drift state
drift_rateFraction of total rounds that were in drift
user_on_or_off_topic_streakCurrent consecutive on/off-topic round count

GET /logs/conversations

List accessible chats for session logs.

Query parameters

ParamTypeDescription
agent_iduuidFilter by agent
statestringFilter by Echo state
date_fromstringISO 8601 start date (inclusive)
date_tostringISO 8601 end date (inclusive)
qstringSearch query
cursorstringKeyset pagination cursor
limitintegerPage size
include_totalbooleanInclude total count in response (default false)

Response 200

json
{
  "items": [
    {
      "id": "uuid",
      "title": "Billing question",
      "description": null,
      "agent_id": "uuid",
      "agent": "Customer Support Bot",
      "total_rounds": 5,
      "avg_ewma": 82.4,
      "started_at": "2026-01-20T14:00:00Z"
    }
  ],
  "next_cursor": "eyJ...",
  "total": 120
}

GET /logs/stats

Aggregate conversation metrics across chats readable by the caller.

Query parameters

ParamTypeDescription
agent_iduuidFilter by agent
date_fromstringISO 8601 start date (inclusive)
date_tostringISO 8601 end date (inclusive)

Response 200

json
{
  "total_chats": 120,
  "total_rounds": 842,
  "avg_ewma": 81.3,
  "total_input_tokens": 420000,
  "total_completion_tokens": 98000,
  "total_tokens": 518000,
  "total_cost_usd": 12.45,
  "avg_latency_ms": 920.5,
  "drift_rounds": 38,
  "stable_rounds": 790,
  "refusal_rounds": 14,
  "drift_rate": 0.045
}

GET /logs/conversations/

Get session detail with paginated rounds.

Query parameters

ParamTypeDescription
cursorstringKeyset pagination cursor for round summaries
limitintegerPage size (1–500)

Response 200

json
{
  "session": {
    "run_id": "uuid",
    "agent": "Customer Support Bot",
    "model": "<chat-model-id>",
    "started_at": "2026-01-20T14:00:00Z",
    "summary": {
      "total_rounds": 5,
      "avg_ewma": 82.4,
      "stable_rounds": 4,
      "drift_rounds": 1,
      "refusal_rounds": 0
    }
  },
  "round_summaries": [
    {
      "round": 1,
      "type": null,
      "user_content": "How do I update my plan?",
      "assistant_reply": "You can update...",
      "scoring_pending": false,
      "state": "stable",
      "ewma": 85.0,
      "latency_ms": 820
    }
  ],
  "next_cursor": null,
  "avg_latency_ms": 780.0,
  "chat_title": "Billing question",
  "chat_description": ""
}

GET /logs/conversations/{chat_id}/rounds/

Get detailed data for a single round.

Response 200

json
{
  "chat_id": "uuid",
  "round_index": 1,
  "session": { "..." },
  "round": {
    "round": 1,
    "state": "stable",
    "ewma": 85.0,
    "alignment_score": 0.88,
    "input_tokens": 450,
    "completion_tokens": 200,
    "latency_ms": 820,
    "user_on_or_off_topic_streak": 0,
    "events": []
  },
  "scoring_pending": false
}

GET /logs/recent

Most recently updated chats, ordered by updated_at descending.

Query parameters

ParamTypeDefaultDescription
limitintegerMax items (1–31)
minebooleanfalseWhen true, only chats created by the caller

Response 200

json
[
  {
    "id": "uuid",
    "title": "Billing question",
    "updated_at": "2026-01-20T14:05:00Z"
  }
]

GET /logs/agents

List agents that have at least one logged chat visible to the caller. Used for filter dropdowns.

Response 200

json
[
  { "id": "uuid", "name": "Customer Support Bot" }
]