🎙️ Starter Agent
A starter agent optimized for voice conversations.
Code
|
🔄 Multi-user push to talk
Responds to multiple users in the room via push-to-talk.
Code
|
🎵 Background audio
Background ambient and thinking audio to improve realism.
Code
|
🛠️ Dynamic tool creation
Creating function tools dynamically.
Code
|
☎️ Outbound caller
Agent that makes outbound phone calls
Code
|
📋 Structured output
Using structured output from LLM to guide TTS tone.
Code
|
🔌 MCP support
Use tools from MCP servers
Code
|
💬 Text-only agent
Skip voice altogether and use the same code for text-only integrations
Code
|
📝 Multi-user transcriber
Produce transcriptions from all users in the room
Code
|
🎥 Video avatars
Add an AI avatar with Tavus, Bithuman, LemonSlice, and more
Code
|
🍽️ Restaurant ordering and reservations
Full example of an agent that handles calls for a restaurant.
Code
|
👁️ Gemini Live vision
Full example (including iOS app) of Gemini Live agent that can see.
Code
|
## Running your agent
### Testing in terminal
```shell
python myagent.py console
```
Runs your agent in terminal mode, enabling local audio input and output for testing.
This mode doesn't require external servers or dependencies and is useful for quickly validating behavior.
### Developing with LiveKit clients
```shell
python myagent.py dev
```
Starts the agent server and enables hot reloading when files change. This mode allows each process to host multiple concurrent agents efficiently.
The agent connects to LiveKit Cloud or your self-hosted server. Set the following environment variables:
- LIVEKIT_URL
- LIVEKIT_API_KEY
- LIVEKIT_API_SECRET
You can connect using any LiveKit client SDK or telephony integration.
To get started quickly, try the [Agents Playground](https://agents-playground.livekit.io/).
### Running for production
```shell
python myagent.py start
```
Runs the agent with production-ready optimizations.
## License
The Agents framework is licensed under [Apache-2.0](LICENSE). The LiveKit turn detection models are licensed under the [LiveKit Model License](MODEL_LICENSE).
## Contributing
The Agents framework is under active development in a rapidly evolving field. We welcome and appreciate contributions of any kind, be it feedback, bugfixes, features, new plugins and tools, or better documentation. You can file issues under this repo, open a PR, or chat with us in the [LiveKit community](https://docs.livekit.io/intro/community/).
### Development setup
This project uses [uv](https://docs.astral.sh/uv/) for package management. To install dependencies for development:
```shell
uv sync --all-extras --dev
```
### Examples
This project includes many examples in the [`examples`](examples/) directory. To run them, create the file `examples/.env` with credentials for LiveKit Server and any necessary model providers (see `examples/.env.example`), then run:
```shell
uv run examples/voice_agents/basic_agent.py dev
```
For more information, see the [examples README](examples/README.md).
### Tests
Unit tests are in the `tests` directory and can be run with:
```shell
uv run pytest --unit
```
Integration tests for each plugin require various API credentials and run automatically in GitHub CI for PRs submitted by project maintainers. See the [tests workflow](.github/workflows/tests.yml) for details.
### Formatting
This project uses [ruff](https://github.com/astral-sh/ruff) for formatting and linting:
```shell
uv run ruff format
uv run ruff check --fix
```
### Documentation
To generate docs locally with [pdoc](https://github.com/pdoc3/pdoc):
```shell
uv sync --all-extras --group docs
uv run --active pdoc --skip-errors --html --output-dir=docs livekit
```