You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A complete starter project for building voice AI apps with [LiveKit Agents for Python](https://github.com/livekit/agents).
16
8
17
-
A simple voice AI assistant built with [LiveKit Agents for Python](https://github.com/livekit/agents).
9
+
The starter project includes:
10
+
11
+
- A simple voice AI assistant based on the [Voice AI quickstart](https://docs.livekit.io/agents/start/voice-ai/)
12
+
- Voice AI pipeline based on [OpenAI](https://docs.livekit.io/agents/integrations/llm/openai/), [Cartesia](https://docs.livekit.io/agents/integrations/tts/cartesia/), and [Deepgram](https://docs.livekit.io/agents/integrations/llm/deepgram/)
13
+
- Easily integrate your preferred [LLM](https://docs.livekit.io/agents/integrations/llm/), [STT](https://docs.livekit.io/agents/integrations/stt/), and [TTS](https://docs.livekit.io/agents/integrations/tts/) instead, or swap to a realtime model like the [OpenAI Realtime API](https://docs.livekit.io/agents/integrations/realtime/openai)
14
+
- Eval suite based on the LiveKit Agents [testing & evaluation framework](https://docs.livekit.io/agents/testing/)
15
+
-[LiveKit Turn Detector](https://docs.livekit.io/agents/build/turns/turn-detector/) for contextually-aware speaker detection, with multilingual support
- Integrated [metrics and logging](https://docs.livekit.io/agents/build/metrics/)
18
+
19
+
This starter app is compatible with [SIP-based telephony](https://docs.livekit.io/agents/start/telephony/) or any [custom web/mobile frontend](https://docs.livekit.io/agents/start/frontend/).
18
20
19
21
## Dev Setup
20
22
@@ -27,30 +29,55 @@ uv sync
27
29
28
30
Set up the environment by copying `.env.example` to `.env` and filling in the required values:
29
31
30
-
-`LIVEKIT_URL`
32
+
-`LIVEKIT_URL`: Use [LiveKit Cloud](https://cloud.livekit.io/) or [run your own](https://docs.livekit.io/home/self-hosting/)
31
33
-`LIVEKIT_API_KEY`
32
34
-`LIVEKIT_API_SECRET`
33
-
-`OPENAI_API_KEY`
34
-
-`DEEPGRAM_API_KEY`
35
+
-`OPENAI_API_KEY`: [Get a key](https://platform.openai.com/api-keys) or use your [preferred LLM provider](https://docs.livekit.io/agents/integrations/llm/)
36
+
-`DEEPGRAM_API_KEY`: [Get a key](https://console.deepgram.com/) or use your [preferred STT provider](https://docs.livekit.io/agents/integrations/stt/)
37
+
-`CARTESIA_API_KEY`: [Get a key](https://play.cartesia.ai/keys) or use your [preferred TTS provider](https://docs.livekit.io/agents/integrations/tts/)
35
38
36
-
You can also do this automatically using the LiveKit CLI:
39
+
You can load the LiveKit environment automatically using the [LiveKit CLI](https://docs.livekit.io/home/cli/cli-setup):
37
40
38
41
```bash
39
42
lk app env -w .env
40
43
```
41
44
42
-
Run the agent in console mode:
45
+
## Run the agent
46
+
47
+
Run this command to speak to your agent directly in your terminal:
43
48
44
49
```console
45
50
uv run python src/agent.py console
46
51
```
47
52
53
+
To run the agent for use with a frontend or telephony, use the `dev` command:
54
+
55
+
```console
56
+
uv run python src/agent.py dev
57
+
```
58
+
59
+
In production, use the `start` command:
60
+
61
+
```console
62
+
uv run python src/agent.py start
63
+
```
64
+
65
+
## Web and mobile frontends
66
+
67
+
To use a prebuilt frontend or build your own, see the [agents frontend guide](https://docs.livekit.io/agents/start/frontend/).
48
68
49
-
This agent requires a frontend application to communicate with. Use a [starter app](https://docs.livekit.io/agents/start/frontend/#starter-apps), our hosted [Sandbox](https://cloud.livekit.io/projects/p_/sandbox) frontends, or the [LiveKit Agents Playground](https://agents-playground.livekit.io/).
69
+
## Telephony
50
70
71
+
To add a phone number, see the [agents telephony guide](https://docs.livekit.io/agents/start/telephony/).
51
72
52
-
Run evals
73
+
## Tests and evals
74
+
75
+
This project includes a complete suite of evals, based on the LiveKit Agents [testing & evaluation framework](https://docs.livekit.io/agents/testing/). To run them, use `pytest`.
53
76
54
77
```console
55
78
uv run pytest evals
56
-
```
79
+
```
80
+
81
+
## License
82
+
83
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
0 commit comments