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

# LiveKit

> Run a LiveKit Agents voice agent on 60db Realtime with LiveKit's OpenAI Realtime model

Instead of wiring STT, LLM and TTS separately, you can run the whole turn on one [60db Realtime](https://docs.60db.ai/realtime/overview.md) connection. 60db speaks the OpenAI Realtime GA protocol, so LiveKit's OpenAI Realtime model works once you point it at 60db. Turn detection, barge-in and function calling run on the 60db server.

**1. Install the OpenAI plugin**

```bash theme={null}
pip install "livekit-agents[openai]~=1.8"
export SIXTYDB_API_KEY="sk_your_api_key"
```

**2. Point RealtimeModel at 60db**

```python agent.py theme={null}
import os

from livekit.agents import Agent, AgentServer, AgentSession, JobContext, cli
from livekit.plugins import openai

server = AgentServer()


@server.rtc_session()
async def entrypoint(ctx: JobContext):
    session = AgentSession(
        llm=openai.realtime.RealtimeModel(
            base_url="https://api.60db.ai/v1",  # connects to wss://api.60db.ai/v1/realtime
            api_key=os.environ["SIXTYDB_API_KEY"],
            model="60db-realtime-v1-mini",
            voice="alloy",  # or a 60db voice ID
        ),
    )
    await session.start(
        room=ctx.room,
        agent=Agent(instructions="You are a friendly voice assistant. Keep answers short."),
    )
    await session.generate_reply(instructions="Greet the user.")


if __name__ == "__main__":
    cli.run_app(server)
```

**3. Run the agent**

```bash theme={null}
python agent.py dev
```

Join the room from the [LiveKit Agents Playground](https://agents-playground.livekit.io) and start talking.

| Setting | Value for 60db |
| - | - |
| `base_url` | `https://api.60db.ai/v1` (the plugin adds `/realtime` and switches to `wss://`) |
| `api_key` | Your 60db API key. Falls back to `OPENAI_API_KEY` if omitted |
| `model` | `60db-realtime-v1-mini`. `gpt-realtime*` names also map to it |
| `voice` | A 60db voice ID from [List voices](https://docs.60db.ai/api-reference/voices/get-voices.md). OpenAI voice names map to 60db stock voices |
| `turn_detection` | Optional. `server_vad` and `semantic_vad` both work; see [Audio and turn detection](https://docs.60db.ai/realtime/audio-and-turn-detection.md) |

> [!NOTE]
>
> With a realtime model, 60db decides turns and interruptions server-side, so LiveKit's own turn detection and interruption settings on `AgentSession` don't apply. Tools you add to your `Agent` with `@function_tool` are sent to 60db and run in your agent, as with OpenAI.

> [!TIP]
>
> Using Pipecat instead of LiveKit? See [Pipecat](https://docs.60db.ai/realtime/pipecat.md).

## Related

* [Pipecat](https://docs.60db.ai/realtime/pipecat.md)
* [Audio and turn detection](https://docs.60db.ai/realtime/audio-and-turn-detection.md)
* [LiveKit plugin for 60db STT, TTS and LLM](https://docs.60db.ai/integrations/livekit.md)


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