chilly-plumber-14235
10/20/2025, 12:18 PMtall-airline-16756
10/20/2025, 12:18 PMtall-airline-16756
10/20/2025, 12:19 PMlivekit.toml file. This file holds all the important agent-specific settings, like a unique agent ID, and it’s what the LiveKit CLI uses to know exactly which agent you’re working with.
To make this easy to manage, try organizing your agents into separate folders, with each one having its own livekit.toml file. Here’s a simple example:
project/
├── agent-1/
│ ├── livekit.toml # Contains agent-1's ID and config
│ └── main.py
├── agent-2/
│ ├── livekit.toml # Contains agent-2's ID and config
│ └── main.py
Doing it this way keeps everything nicely separated and fits perfectly with how LiveKit expects things to be set up. If you need any more help or have questions, I’m here for you!
Sources: CLI Tools & Token Management | livekit/livekit_composite | DeepWiki | Deploying to production | LiveKit Docs | Agent deployment CLI reference | LiveKit Docs | cmd/lk/agent.gochilly-plumber-14235
10/20/2025, 12:20 PMtall-airline-16756
10/20/2025, 12:21 PMlivekit.toml files for multiple agents. Here’s a simple way to do it:
1. First, create separate directories for each agent:
mkdir agent1
mkdir agent2
mkdir agent3
2. Next, generate configuration files for your existing agents:
# For agent1
cd agent1
lk agent config --id AGENT_ID_1
# For agent2
cd ../agent2
lk agent config --id AGENT_ID_2
# For agent3
cd ../agent3
lk agent config --id AGENT_ID_3
3. If you prefer, you can also create new agents like this:
# Create first agent
mkdir agent1 && cd agent1
lk agent create
# Create second agent
cd .. && mkdir agent2 && cd agent2
lk agent create
Each time you run lk agent create or lk agent config, it will generate a unique livekit.toml file for that agent. Just make sure each directory holds the agent’s source code along with its configuration file. This way, everything stays nicely organized and easy to manage.
Sources: CLI Tools & Token Management | livekit/livekit_composite | DeepWiki | Agent deployment CLI reference | LiveKit Docs | cmd/lk/agent.go | Deploying to production | LiveKit Docschilly-plumber-14235
10/20/2025, 12:22 PMAGENT_ID_1 randomly generated by livekit?tall-airline-16756
10/20/2025, 12:23 PMAGENT_ID is automatically generated by LiveKit when you create an agent. So, when you run lk agent create, LiveKit Cloud takes care of assigning a unique ID to your agent and saves it in the livekit.toml file for you. The ID follows the format AG_xxxxxxxxxxxxx, which helps ensure that every agent has its own unique identifier. If you have any more questions about this, feel free to ask—I’m here to help!
Sources: Deploying to production | LiveKit Docs | cmd/lk/agent.go | CLI Tools & Token Management | livekit/livekit_composite | DeepWikichilly-plumber-14235
10/20/2025, 12:25 PMlk agent deploy ?tall-airline-16756
10/20/2025, 12:25 PMagent-1! You have two friendly options:
1. First, you can navigate to the agent folder:
`cd agent1
lk agent deploy`This way, the deployment uses the livekit.toml file right there in your current directory.
2. Or, you can specify the agent folder directly without changing directories:
`lk agent deploy /path/to/agent1`This is super handy if you want to keep your current location in the terminal.
Both methods work perfectly, so feel free to pick whichever feels more comfortable for you. If you have any questions along the way, I’m here to help!
Sources: Deploying to production | LiveKit Docs | Agent deployment CLI reference | LiveKit Docs | CLI Tools & Token Management | livekit/livekit_composite | DeepWiki | README.mdchilly-plumber-14235
10/20/2025, 12:32 PMtall-airline-16756
10/20/2025, 12:33 PMproject-root/
├── agent-1/
│ ├── livekit.toml # Configuration for agent-1
│ ├── main.py # Source code for agent-1
│ └── Dockerfile # Optional Dockerfile for agent-1
├── agent-2/
│ ├── livekit.toml # Configuration for agent-2
│ ├── main.py # Source code for agent-2
│ └── Dockerfile # Optional Dockerfile for agent-2
└── shared-resources/ # Optional shared resources for both agents
This setup is great because it keeps each agent’s configuration and code nicely separated, while still giving you the option to share resources if that’s something you need. If you have any questions or want to explore this further, I’m here to help!
Sources: Python Agents Core Architecture | livekit/livekit_composite | DeepWikichilly-plumber-14235
10/20/2025, 12:46 PMtall-airline-16756
10/20/2025, 12:46 PMlk agent init (Highly Recommended):
`lk agent init [AGENT-NAME] --lang python`This command will gently set up a new project for you, including all the necessary files and configurations.
2. Create project files manually:
◦ If you’re working with Python: simply add a requirements.txt or pyproject.toml file.
◦ If you prefer Node.js: add a package.json and run npm install to get things ready.
1. Create a custom Dockerfile:
You can also add a Dockerfile to the folder if you want a custom build process tailored to your needs.
Honestly, using the lk agent init command is the smoothest way to start, as it takes care of the setup automatically for you. If you have any questions or need a hand, I’m here to help!
Sources: cmd/lk/agent.go | CLI Tools & Token Management | livekit/livekit_composite | DeepWiki | Agent deployment CLI reference | LiveKit Docs