Skip to main content
Pipecat is an open-source Python framework for building real-time voice and multimodal conversational agents. It runs the audio transport, speech-to-text, LLM, and text-to-speech stages of a conversation as one streaming pipeline. The openinference-instrumentation-pipecat package records each user-to-assistant turn as a parent span, with a child span for every pipeline stage that ran during the turn. Pass a conversation_id to the pipeline and Phoenix groups all of that conversation’s turns into a session.

Install

Match the instrumentor to your Pipecat version. Pipecat 1.3 replaced PipelineTask with PipelineWorker, and only instrumentor 2.0 and later wraps PipelineWorker.

Setup

Set your API keys as environment variables:
Register Phoenix before you build the pipeline. The Pipecat instrumentor is discovered through the openinference_instrumentor entry point, so auto_instrument=True turns it on:
To activate it by hand, for example with your own TracerProvider, use PipecatInstrumentor().instrument(tracer_provider=tracer_provider) from openinference.instrumentation.pipecat.

Run Pipecat

Build the pipeline as usual. The one thing to add is a conversation_id on the PipelineWorker, so every turn of the conversation lands in the same Phoenix session:
Start the bot and talk to it. For a complete runnable bot with tool calling, see the instrumentor’s example.

Observe

Phoenix traces Pipecat’s real-time voice and multimodal pipelines automatically. Each turn is one trace, and turns that share a conversation_id appear together in the Sessions tab.

Conversation & Session Tracking

  • Conversation Sessions: All turns sharing a conversation_id grouped into a single session
  • Turn Boundaries: Each user-to-assistant exchange captured as a parent span
  • End-to-End Latency: The full audio-in to audio-out path for every turn

Pipeline Stage Spans

  • LLM Calls: Prompts, responses, token counts, and model metadata from your LLM service
  • Speech-to-Text (STT): Input audio transcription with latency
  • Text-to-Speech (TTS): Output audio synthesis with latency
  • Tool / Function Calls: When the LLM service invokes tools, their inputs, outputs, and duration

Performance & Reliability Monitoring

  • Stage Latency: Per-stage timing to identify bottlenecks in the audio pipeline
  • Token Usage: Prompt, completion, and total tokens across the conversation
  • Errors: Failures inside any pipeline stage surfaced as span errors

Resources