Skip to the content.

Agent observability

What an agent run records, how much of it, where you see it, and how to send it elsewhere. For the settings themselves see Agent definition; for what happens during a turn see Agent runtime.

What is recorded

Every turn records a span tree in the run store database. The root is invoke_agent <agent id> (kind agent); its children are:

Span name Kind One per Notable attributes
chat model model call gen_ai.system, gen_ai.request.model, gen_ai.usage.cost_usd, input and output tokens
execute_tool <tool id> tool tool call gen_ai.tool.name; status error when the tool failed
invoke_agent <callee id> sub_agent sub-agent call gen_ai.tool.name (agent:<id>)
approval <tool id> gate ask-first pause stageflow.approval.outcome (approved, denied, expired, aborted)
guardrail guardrail blocked reply stageflow.guardrail.pattern
eval groundedness guardrail scored reply gen_ai.evaluation.name, gen_ai.evaluation.score.value

The root also carries gen_ai.agent.name, stageflow.agent.revision and, when the definition sets a model, gen_ai.request.model. A turn that failed before any child ran has a root with error.type set to the error code. Span names and attributes follow the OpenTelemetry GenAI conventions where one exists.

Each turn has a 32-character trace id, shown on the run page, and each span has its start, end, duration and status (ok, error, cancelled).

Tokens and cost are summed per turn (agent_turns) and shown per session and per agent.

Capture modes

observability.capture decides how much content is kept:

Mode Spans Prompt, argument and result text
off None. No span is stored, so there is no timeline, nothing to export and nothing to push live. Turns, messages, approvals, tokens and cost are still stored. No
metadata (default) Yes: names, timings, status, tokens, attributes. No
full Yes. Yes: the user message and reply on the root, tool arguments and results on tool spans, after secret redaction.

chat spans never carry text, whatever the mode.

Redaction

Text is redacted before it is stored (secret-shaped strings and any named secret the Host knows are replaced), and again when a trace is exported, so a later change to storage cannot leak through export. Redaction removes known secret shapes; it does not understand your data. If an agent handles personal or confidential content, keep metadata.

Eval sessions {#eval-sessions}

When an agent eval runs, each conversation is an agent session marked as an eval session. Eval sessions are recorded like any other (messages, turns, spans, tokens, cost) with two differences: capture is forced to full so graders and the transcript can see tool arguments and results, and OTLP push and the groundedness judge are off. They are hidden from the agent's session list, the Agent sessions page, the Inbox, approval counts and statistics, so they never mix with real use.

You can still open one by its id. In the console the eval result's Transcript tab links to the Agent run page, which shows the usual steps and waterfall for that conversation. Deleting the eval run deletes its eval sessions; a crashed run's leftovers are removed when the Host next starts, once they are 7 days old and no result refers to them.

Where you see it

Groundedness

evals.groundedness: true scores how well a reply is supported by what the tools returned, from 0 (unsupported or contradicted) to 1 (fully supported).

Export

The export is an OTLP ExportTraceServiceRequest with the resource service.name = stageflow-agent-runtime and gen_ai.agent.name, and the scope stageflow.agents. Spans keep their ids, so the trace id and parent links survive. Text appears as gen_ai.input.messages and gen_ai.output.messages.