This is the result of my load test. What could be ...
# ask-ai
b
This is the result of my load test. What could be the reason for agent track not being subscribed?
Copy code
Test Statistics:
┌───┬─────────────────────┬───────────────────────────┬──────────────┬──────────────────┬────────────────────────┬──────────────────────┐
│ # │ Room                │ Agent Dispatched At       │ Agent Joined │ Agent Join Delay │ Agent Track Subscribed │ Echo Track Published │
├───┼─────────────────────┼───────────────────────────┼──────────────┼──────────────────┼────────────────────────┼──────────────────────┤
│ 1 │ room-0-RShBoJafDSRa │ 2025-08-16T00:00:19-05:00 │ ✓            │ 269.388916ms     │ ✗                      │ ✓                    │
│ 2 │ room-1-qX7z5kUUaBRn │ 2025-08-16T00:00:20-05:00 │ ✓            │ 241.635125ms     │ ✗                      │ ✓                    │
└───┴─────────────────────┴───────────────────────────┴──────────────┴──────────────────┴────────────────────────┴──────────────────────┘
t
Thanks for reaching out, Harsh. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The failure to subscribe to an agent's track in your load test could be happening for a few reasons: • Agent Identification: Double-check that the agent is correctly identified as a
ParticipantAgent
. If it’s misidentified, the subscription might not go through. • Track Subscription Handling: Make sure the
onTrackSubscribed
callback is firing properly since it’s responsible for setting the subscription flag. • Track Publication: Confirm that the agent's track is being published and sent out without any hiccups. • Timeouts or Errors: Take a look at your logs for any subscription timeouts or errors that could point to network or server issues. • Participant Disconnect: Check that the agent participant stays connected and that the subscription isn’t getting cleaned up too soon. Give these a look in your setup, and if you’re still stuck or notice any error messages, just let me know—I’m here to help!
b
Can I add meta data while executing this command to perform load test -
Copy code
lk perf agent-load-test --rooms 1 --agent-name calling_agent --echo-speech-delay 10s --duration 3m
t
The
lk perf agent-load-test
command doesn’t support adding metadata directly, but it does let you use these handy flags: • `--rooms`: Number of rooms to open • `--agent-name`: Name of the running agent to dispatch to the room • `--echo-speech-delay`: Delay between when the echo track speaks and when the agent starts speaking • `--duration`: Time duration to run If you want to include metadata, here are a couple of ways to do it: 1. Use the
lk dispatch create
command — it has a --metadata flag that lets you add metadata when creating agent dispatches. 2. Set up metadata through your agent implementation. Feel free to reach out if you want a hand with this or have any other questions! Sources: cmd/lk/dispatch.go