Skip to main content
Agent

Observability

Trace every agent run with OpenTelemetry.

Each prompt is traced as an invoke_agent pi span, from the moment its input is saved until its run settles. The span is a child of the prompt action span and has 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 conversation id.
gen_ai.request.modelThe conversation’s model, as provider/modelId.
rivet.actor.idThe Actor’s id.

A run that ends without an answer, such as after a model error, sets the span status to error with error.type set to unanswered. A prompt that throws sets error.type to run_error. Prompt text, tool arguments, and tool results are never recorded.

Only prompt creates this span. A run started with conversation.submit has no invoke_agent pi span, so use prompt for runs you want to trace.