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

# Beyond Presence

> Real-time video avatar transport for Pipecat agents using Beyond Presence

export const CommunityMaintained = ({maintainer, maintainerUrl, repo}) => <Note>
    <strong>Community-maintained integration.</strong> This service is built and
    maintained by{" "}
    <a href={maintainerUrl} target="_blank" rel="noreferrer">
      {maintainer}
    </a>
    . Pipecat does not test or officially support it. Please report issues and
    request changes on the{" "}
    <a href={repo} target="_blank" rel="noreferrer">
      source repository
    </a>
    . Learn more about{" "}
    <a href="/api-reference/server/services/community-integrations">
      community integrations
    </a>
    .
  </Note>;

<CommunityMaintained maintainer="bey-dev" maintainerUrl="https://github.com/bey-dev" repo="https://github.com/bey-dev/pipecat-bey" />

## Overview

`BeyTransport` generates real-time video avatars for your Pipecat agents using
[Beyond Presence](https://www.beyondpresence.ai/). The Beyond Presence avatar
provides synchronized video and audio output while your bot handles the
conversation logic. The transport is built on top of the Daily transport: the
Pipecat bot, the Bey avatar, and the user all join the same Daily room.

<CardGroup cols={2}>
  <Card title="Source Repository" icon="github" href="https://github.com/bey-dev/pipecat-bey">
    Source code, examples, and issues for the Beyond Presence integration
  </Card>

  <Card title="PyPI Package" icon="cube" href="https://pypi.org/project/pipecat-ai-bey/">
    The `pipecat-ai-bey` package on PyPI
  </Card>

  <Card title="Beyond Presence" icon="image" href="https://www.beyondpresence.ai/">
    Learn more about Beyond Presence video avatars
  </Card>

  <Card title="Beyond Presence Docs" icon="book" href="https://docs.bey.dev">
    Documentation, including the default avatar IDs
  </Card>
</CardGroup>

## Installation

This is a community-maintained package distributed separately from `pipecat-ai`:

```bash theme={null}
pip install pipecat-ai-bey
```

## Prerequisites

Before using the Beyond Presence transport, you need:

* A [Beyond Presence API key](https://www.beyondpresence.ai/)
* A [Daily.co API key](https://www.daily.co/) (the transport is built on Daily)
* API keys for your STT/TTS/LLM services (e.g., OpenAI)

### Required Environment Variables

* `BEY_API_KEY`: Your Beyond Presence API key
* `DAILY_API_KEY`: Your Daily API key
* `DAILY_ROOM_URL`: The Daily room URL where the session takes place

## Configuration

`BeyTransport` constructor parameters:

<ParamField path="bot_name" type="str" required>
  The name of the Pipecat bot.
</ParamField>

<ParamField path="session" type="aiohttp.ClientSession" required>
  aiohttp session used for async HTTP requests.
</ParamField>

<ParamField path="bey_api_key" type="str" required>
  Beyond Presence API key for authentication.
</ParamField>

<ParamField path="daily_api_key" type="str" required>
  Daily API key for Daily services.
</ParamField>

<ParamField path="avatar_id" type="str" required>
  ID of the avatar to use for video generation. See the [Beyond Presence
  docs](https://docs.bey.dev) for available avatar IDs.
</ParamField>

<ParamField path="room_url" type="str" required>
  Daily room URL for the session.
</ParamField>

<ParamField path="params" type="BeyParams" default="BeyParams()">
  Bey-specific configuration parameters. See [Params](#params) below.
</ParamField>

<ParamField path="input_name" type="str" default="None">
  Optional name for the input transport.
</ParamField>

<ParamField path="output_name" type="str" default="None">
  Optional name for the output transport.
</ParamField>

### Params

`BeyParams` extends Pipecat's `DailyParams` and adds the following fields. Pass
it via the `params` constructor argument using `BeyParams(...)`.

| Parameter                | Type   | Default | Description                                      |
| ------------------------ | ------ | ------- | ------------------------------------------------ |
| `audio_in_enabled`       | `bool` | `True`  | Whether to enable audio input from participants. |
| `audio_out_enabled`      | `bool` | `True`  | Whether to enable audio output to participants.  |
| `microphone_out_enabled` | `bool` | `False` | Whether to enable the microphone output track.   |

<Note>
  `BeyParams` inherits all `DailyParams` fields (for example, `vad_analyzer`).
  See the [source repository](https://github.com/bey-dev/pipecat-bey) for the
  authoritative, up-to-date list.
</Note>

## Usage

```python theme={null}
import os

import aiohttp
from pipecat.audio.vad.silero import SileroVADAnalyzer
from pipecat.audio.vad.vad_analyzer import VADParams
from pipecat.pipeline.pipeline import Pipeline

from pipecat_bey import BeyParams, BeyTransport

async with aiohttp.ClientSession() as session:
    transport = BeyTransport(
        bot_name="Pipecat bot",
        session=session,
        bey_api_key=os.environ["BEY_API_KEY"],
        daily_api_key=os.environ["DAILY_API_KEY"],
        avatar_id="b9be11b8-89fb-4227-8f86-4a881393cbdb",  # Default "Ege" avatar
        room_url=os.environ["DAILY_ROOM_URL"],
        params=BeyParams(
            audio_in_enabled=True,
            audio_out_enabled=True,
            microphone_out_enabled=False,
            vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=0.2)),
        ),
    )

    pipeline = Pipeline(
        [
            transport.input(),
            stt,
            context_aggregator.user(),
            llm,
            tts,
            transport.output(),
            context_aggregator.assistant(),
        ]
    )
```

See [example.py](https://github.com/bey-dev/pipecat-bey/blob/main/example.py) in
the source repository for a complete working example.

## Compatibility

Tested with Pipecat v0.0.89. Check the [source
repository](https://github.com/bey-dev/pipecat-bey) for the latest tested
version and changelog.
