Test Setup
- Internal Users: 5
- Stack: LiveKit Agent JS (hosted on LiveKit Agent Cloud)
- SDK Version: {please confirm current version if needed}
- Plan: Pro (20 users)
Scenario 1 – Normal Usage
Five users joined the voice agent simultaneously and stayed connected for about 5–6 minutes.
Everything worked as expected — audio, STT/TTS, and agent responses were stable, with concurrency reaching around 5–6 users.
Scenario 2 – Reconnect Workflow
We repeated the same test, but this time each user:
- Spoke for ~30 seconds
- Closed the voice session
- Reopened it shortly after
During this flow, we observed:
- STT/TTS utilization quickly rising to ~80% despite still having only five users.
- Agent sessions beginning to fail or behave inconsistently.
- Previously closed sessions appearing to remain active for a noticeable duration before being released.
Although our plan allows up to 20 concurrent users, we seemed to hit limits with just these repeated reconnects. This makes us suspect that STT/TTS resources (or related workers) may not be terminating immediately after session closure, which could also have cost implications.
Help in explaining:
- Whether there are recommended lifecycle or teardown steps we should be explicitly handling on our side?
- If there are known considerations around rapid reconnect patterns?
- How STT/TTS session cleanup is managed and how we can ensure resources are released promptly?