The Pipecat integration requires
langsmith[pipecat]. It is in development, so its API may change.Install
Install the integration along with the Pipecat service extras your pipeline uses:Set environment variables
The integration reads your LangSmith credentials from the environment and exports to LangSmith for you:.env
Set up tracing
Importconfigure_pipecat and call it once before building your pipeline. Enable tracing on the PipelineTask:
Set
enable_tracing=True, enable_turn_tracking=True, and enable_metrics=True. Turn tracking is required for tracing, and metrics drive the latency and token data on each span.configure_pipecat(llm_span_kind="chain") so its model and tool runs nest correctly inside Pipecat’s llm span.
Use your own tracer provider
There are two ways to install the tracing provider.configure_pipecat() is the quick path: it installs an OpenTelemetry TracerProvider and registers the LangSmith span processor on it for you. To send spans through a TracerProvider you already manage (for example, one that also exports to another OpenTelemetry backend), skip configure_pipecat and add the processor to your provider directly:
Group a conversation into a thread
To group a conversation’s runs into a LangSmith thread — for thread-level views and token and cost aggregation — callset_thread_id once per conversation, before its spans are emitted:
set_thread_id stores the id in a ContextVar, a server handling many conversations concurrently keeps them correctly separated as long as each runs in its own task.
Record the conversation audio
Attach the conversation audio to the trace using Pipecat’sAudioBufferProcessor. Place it after transport.output() so it captures what was actually played (after any barge-in truncation), hand it to the integration, and start it once the session is running:
Next steps
Voice fundamentals
Core conventions for tracing voice agents.
Upload files with traces
Attach the conversation audio recording to your trace.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

