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

# LiveKit Agent Integration

> Set up and run a LiveKit Agent server for Streaming Avatar integration

## Overview

[LiveKit Agents](https://docs.livekit.io/agents/) is a framework for building server-side AI agents that interact with users in real time. By integrating with AKOOL's Streaming Avatar, you can build AI-powered avatar experiences using LiveKit's agent infrastructure.

This guide walks you through setting up the AKOOL LiveKit Agent server locally and testing it with the LiveKit Playground.

**Repository:** [AKOOL LiveKit Agents](https://github.com/AKOOL-Official/livekit_agents)

## Prerequisites

* Python (LTS version)
* [uv](https://docs.astral.sh/uv/) package manager
* A [LiveKit Cloud](https://cloud.livekit.io/) account (for API key, secret, and server URL)
* An [OpenAI](https://platform.openai.com/) API key
* AKOOL Client ID and Client Secret (available from your [AKOOL dashboard](https://akool.com))

## Setup

**1. Clone the repository**

```bash theme={null}
git clone https://github.com/AKOOL-Official/livekit_agents.git
cd livekit_agents
```

**2. Switch to the feature branch**

```bash theme={null}
git checkout feature/livekit-plugins-akool
```

**3. Install dependencies**

Run the following command in the project root directory:

```bash theme={null}
uv sync
```

**4. Configure environment variables**

Navigate to the `examples` folder and create a `.env` file from the template:

```bash theme={null}
cd examples
cp env.example .env
```

Fill in the following credentials in the `.env` file:

```
LIVEKIT_API_KEY=""
LIVEKIT_API_SECRET=""
LIVEKIT_URL=""
OPENAI_API_KEY=""
AKOOL_CLIENT_ID=""
AKOOL_CLIENT_SECRET=""
```

**5. Start the agent server**

```bash theme={null}
uv run examples/avatar_agents/akool/agent_worker.py dev
```

**6. Test in the playground**

Open the [LiveKit Agents Playground](https://agents-playground.livekit.io/) and sign in with your LiveKit account to interact with the agent.


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