> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getbluejay.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Pipecat

> Capture Pipecat transcripts, recordings, and native pipeline spans.

Use the Pipecat integration to capture transcripts, audio, and spans. Bluejay builds the conversation when the pipeline ends.

## Set up the SDK

Set `BLUEJAY_API_KEY` as shown in the [quickstart](https://docs.getbluejay.ai/sdk/overview.md), then install the Pipecat extra.

```bash Python icon="https://mintcdn.com/bluejay/73RDPPJpgHtl6PiO/logo/python.svg?fit=max&auto=format&n=73RDPPJpgHtl6PiO&q=85&s=ce56f186813559443f877804e7aef209" theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
pip install "bluejay-sdk[pipecat]>=0.4.0"
```

```typescript TypeScript icon="https://mintcdn.com/bluejay/73RDPPJpgHtl6PiO/logo/typescript.svg?fit=max&auto=format&n=73RDPPJpgHtl6PiO&q=85&s=d4b45d3e44d76cf40cfb09b3d24831f5" theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
// Pipecat is available through the Python SDK.
```

Create the client once at startup. In your existing pipeline, leave the user and assistant context aggregators in place. The tap uses their finalized turn events to write the transcript.

```python Python icon="https://mintcdn.com/bluejay/73RDPPJpgHtl6PiO/logo/python.svg?fit=max&auto=format&n=73RDPPJpgHtl6PiO&q=85&s=ce56f186813559443f877804e7aef209" theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from bluejay import BluejayClient
from pipecat.pipeline.pipeline import Pipeline
from pipecat.pipeline.worker import PipelineWorker

client = BluejayClient(tracing=True)

# In your bot, after creating the transport, services, and aggregators:
tap = client.instrument_pipecat(external_agent_id="support-voice")
pipeline = Pipeline([
    transport.input(), stt, user_aggregator, llm, tts,
    transport.output(), tap, assistant_aggregator,
])
worker = PipelineWorker(
    pipeline,
    enable_tracing=True,
    conversation_id=tap.session_id,
)
```

```typescript TypeScript icon="https://mintcdn.com/bluejay/73RDPPJpgHtl6PiO/logo/typescript.svg?fit=max&auto=format&n=73RDPPJpgHtl6PiO&q=85&s=d4b45d3e44d76cf40cfb09b3d24831f5" theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
// Pipecat is available through the Python SDK.
```

Use the external ID configured on your Bluejay agent. You can also pass `agent_id` with its Bluejay ID. The tap goes immediately after `transport.output()`. The worker flag makes Pipecat emit its native spans. Pass `record_audio=False` to the tap if you want spans and transcript without uploading audio.

## Verify a call

Place a call and end the pipeline. Open the conversation in [Logs](https://docs.getbluejay.ai/monitor/logs) to inspect its transcript, audio, and trace. If you're using a realtime speech model, enable input transcription on the model to capture the caller's text.

## Attach traces to a simulation

If Bluejay starts your Pipecat Cloud bot, read `X-Simulation-Result-Id` from the start request body and pass it as `simulation_result_id` to `instrument_pipecat()`. See [Connect Pipecat](https://docs.getbluejay.ai/integrations/pipecat.md) for the start request and [Run simulations](https://docs.getbluejay.ai/sdk/simulations.md) to queue a test from Python.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.