Operations
Keep dashboard queries bounded by time when supported. Use observation filters when you need the exact prompt, output, tool call, token count, or cost row.
ai.stats reports prompt, completion, total, cached-input, and reasoning token totals alongside tool-call counts, p95 latency, and error counts, and ranks top models, providers, tools, sessions, and users. Each topTools row has calls, error_calls, error_rate, avg_duration_ms, p50_duration_ms, p95_duration_ms, session_count, and last_called_at.
Sessions and verdicts
A session includes every call of each trace in which a call has the session ID. Agent frameworks often put the session ID only on the agent step, so the model calls of that trace still count toward the session’s tokens and cost. Tokens and cost come from the model calls of a trace; an agent step that also reports the trace totals is not counted again. Session rows fromai.sessions and ai.stats, and the summary of ai.getSession, have these
fields in addition to the totals:
errored covers timeouts, provider errors, and failed calls of no known class. Each trace in
ai.getSession has the same counters and verdict. Each observation has finish_reason (from
gen_ai.response.finish_reasons, lower case, comma separated) and error_class. Data recorded
before these fields existed has empty values; failed tool calls still count as tool errors.
CLI and MCP
Usesquasher ai ... or squasher agent-observations ... depending on the workflow. squasher ai session <session_id> --from <time> --to <time> prints one session with its verdict. In MCP Code Mode, call search("ai") or search("agentObservations") first.