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.
| Attribute | Value |
|---|---|
gen_ai.operation.name | invoke_agent |
gen_ai.agent.name | pi |
gen_ai.conversation.id | The Pi session id. |
gen_ai.request.model | The model id. |
rivet.actor.id | The 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.