Skip to main content
Agent

Observability

Trace every agent run with OpenTelemetry.

Each Pi run is traced as an invoke_agent pi span, a child of the prompt action span that started it, with OpenTelemetry GenAI attributes. To export it, set up OpenTelemetry for your Actors.

PROMPT ACTION SPANinvoke_agent piGenAI attributesOpenTelemetryyour backendexport
AttributeValue
gen_ai.operation.nameinvoke_agent
gen_ai.agent.namepi
gen_ai.conversation.idThe Pi session id.
gen_ai.request.modelThe model id.
rivet.actor.idThe Actor’s id.

A failed run sets the span status to error, with error.type set to model_error when the model returns an error or run_error when the run throws. Prompt text, tool arguments, and tool results are never recorded.

A prompt queued with streamingBehavior joins the run in progress, so it doesn’t get a span of its own.