miniature-nail-35141
08/22/2025, 7:37 AMtall-airline-16756
08/22/2025, 7:37 AMtall-airline-16756
08/22/2025, 7:38 AMstart (not dev) and has a specific agent_name set up.
◦ The agent is ready to say something first—like a friendly greeting.
◦ Your LiveKit project credentials (URL, API key, and secret) are all set, either as environment variables or using lk project set-default.
1. Now, run the load test with this command:
lk perf agent-load-test \
--rooms 30 \
--agent-name your-agent-name \
--duration 5m
Here’s what this will do for you:
• Create 30 separate rooms.
• Send your chosen agent into each room.
• Simulate an echo participant in every room that listens and plays back the agent’s audio.
• Run everything for 5 minutes before wrapping up.
Once the test finishes, you’ll see stats like room names, how quickly agents joined, and details about track subscriptions and publishing. Feel free to tweak the --duration if you want the test to run longer or shorter, or use --echo-speech-delay to adjust how quickly the echo responds.
Sources: autocomplete/fish_autocompleteminiature-nail-35141
08/22/2025, 7:47 AMtall-airline-16756
08/22/2025, 7:47 AMlk perf agent-load-test \
--rooms 30 \
--agent-name your-agent-name \
--duration 5m
Just swap out your-agent-name with your actual agent’s name and feel free to tweak the --duration to fit your needs.
2. Verify Agent Dispatch and Room Behavior:
◦ Check that 30 rooms have been created.
◦ Make sure your specified agent is dispatched to each room.
◦ Confirm there’s an echo participant in each room that’s receiving and playing back the agent’s audio.
1. Check Test Statistics:
◦ Once the test wraps up, take a look at the statistics table for each room.
◦ Keep an eye out for:
▪︎ Room names and when the agent was dispatched.
▪︎ Whether the agent joined successfully and how long it took.
▪︎ Successful subscription to the agent’s audio track.
▪︎ Successful publication of the echo track.
◦ Green checks (✓) mean things went well, while red crosses (✗) highlight any hiccups.
Also, just a heads-up: make sure your agent is running with start (not dev) and is set up to speak first, like sending a friendly greeting. Don’t forget to double-check that your LiveKit project credentials are properly set as environment variables or via lk project set-default.
By reviewing the stats, you’ll get a clear picture of how the test went and spot any issues to troubleshoot. If you need a hand, I’m here to help!
Sources: autocomplete/fish_autocompleteminiature-nail-35141
08/22/2025, 7:48 AMtall-airline-16756
08/22/2025, 7:48 AMlk perf isn’t recognized as a command, no worries—let’s walk through some easy steps to get you back on track:
1. Double-check the CLI Installation:
◦ Make sure the LiveKit CLI is actually installed. Here’s how you can do it depending on your operating system:
▪︎ macOS: brew install livekit-cli
▪︎ Linux: curl -sSL https://get.livekit.io/cli | bash
▪︎ Windows: winget install LiveKit.LiveKitCLI
1. Check Your CLI Version:
◦ It’s a good idea to be on the latest version. You can update it through your package manager or grab the newest binary from the GitHub releases page.
1. Make Sure the Binary Is in Your PATH:
◦ Try running lk --help to see if the CLI responds. If it doesn’t, the lk binary might not be in your system’s PATH.
1. Use the Right Syntax:
◦ Remember, perf is a subcommand. Running lk perf --help will show you if it’s available and how to use it.
If you’re still stuck after this, try reinstalling the CLI and double-check that there aren’t any naming conflicts or environment quirks getting in the way. You’ve got this!
Sources: cmd/lk/project.go | CLI Setup | LiveKit Docs