Send AI data to Squasher
Prompt and output text are off by default in the Agent SDK. Squasher still records tokens, cost,
model, and timing.
Find your AI data
Select AI observability under Telemetry in the sidebar. Choose a time range from Last 30 minutes to Last 30 days; the default is Last 24 hours.
Select a request to open its record. Overview shows latency, cost, and input and output tokens
with their cached and reasoning parts, and a bar that splits the tokens. Below that, it shows the
conversation when you capture content:
- The request settings, the system instructions, and the tools the model could call.
- Each message, labeled User, Assistant, or Tool. The model’s reply is marked Response.
- Thinking, closed by default. Select it to read it.
- Each tool call with its arguments and the result it returned. Failed calls open by default.
- Code in tool arguments and in replies, for example JavaScript or SQL, in color.
Find where a run failed
When a step failed, its page starts with Failed: the error type and the error message that the step recorded (exception.message), with a copy button. The trace waterfall follows, with the
failed step selected.
A step that did not fail but holds failed steps shows N failed inside beside its status, and a
Failures list: each failed step in time order, with its kind, the step it ran under, how long
into the run it failed, and its error message. Select a failure to open it.
On the waterfall, a failed step has an error icon and an outlined bar. A step that holds failed steps
shows a warning triangle and their number. Errors only keeps the failed steps and the steps
above them. Next error opens and selects each failed step in turn.
From a trace, you see its steps on a waterfall and its failures beside it. Select a step, or press
j and k, to see its error, its conversation, or the arguments and result of a tool call,
beside the waterfall.
Read a session
A session page shows the totals of one chat or agent run, its requests, and its traces. A session includes every call of each trace in which a call has the session ID, so model calls without a session ID still add their tokens and cost. Needs attention lists the checks for the session and the number of calls that failed each one: rate limits, context window, refusals, tool errors, timeouts, and provider errors. The session’s verdict is the first check that failed, or Completed when all pass. Squasher reads the finish reason (gen_ai.response.finish_reasons), the HTTP status, and the error type and message of each
call.
How Squasher counts cost
- If the call reports its own cost, Squasher uses that number. The Agent SDK reads the cost that
OpenRouter returns. In HTTP ingest, send
costDetails.total. - If not, Squasher computes the cost from the token counts and a public price list for each model. Cached input tokens use the cached price, and tokens written to the cache use the cache-write price. As in the OpenTelemetry GenAI conventions, the input tokens include the cache reads and writes. Squasher updates the prices every 24 hours.
- If Squasher does not know the model, the cost is
0.
Record scores and feedback
Scores tell you whether an answer was good, not only fast and cheap. Send them with the Agent SDK:captureFeedback for thumbs and ratings from users, and captureScore for automated checks. They
appear on the Scores tab, linked to the trace or call that they judge. See
Record quality scores.
Check AI telemetry in CI
squasher agent-observations quality checks the last 24 hours for missing traces, prompts, outputs,
models, tokens, and cost. It exits with an error when a check fails:
--min-scores or --min-scored-observations to check that scores still arrive, and
--require-privacy-mode to check that every call was recorded in privacy mode.
Export data for evaluation
squasher agent-observations export writes model calls and their scores as JSON Lines, for
offline evaluation or fine-tuning. Filter with --score-name, --min-score, --model, and other
flags. The API key needs the ai:export scope. Session IDs, user IDs, and metadata are left out
unless you add --include-identifiers or --include-metadata.
Read complete model and tool content
When your integration sends full content, the call detail includes the prompt, input messages, output, returned reasoning, and tool arguments and results. Sensitive fields are redacted before capture. Squasher can record only the reasoning that the model provider returns. For complete coverage, send canonical tool arguments and results along with the model call. If content is omitted or fails to serialize, mark that in the record. Use the telemetry quality check above to confirm the coverage of your integration.Limits
- The plans list an AI request allowance, but Squasher does not enforce or bill it yet. Squasher does not drop AI data when you pass the allowance. See Plans and limits.
- AI observability records the calls that your app makes. It does not include Squasher’s own AI triage and fixes.
Next steps
Agent SDK
Record every Vercel AI SDK call with one wrapper.
OpenRouter
Record OpenRouter calls with their exact cost.
Agent Observations API
Query and export AI data over HTTP.
Send OpenTelemetry
Send
gen_ai.* spans from any language.