steep-balloon-41261
03/24/2026, 4:01 PMtall-airline-16756
03/24/2026, 4:02 PMtall-airline-16756
03/24/2026, 4:02 PMLiveKitAPI from the livekit Python package (version >= 1.1.3).
You can import it from the livekit.api module. Example usage:
from livekit import api
lk_api = api.LiveKitAPI(
url="https://your-instance.livekit.cloud",
api_key="your-api-key",
api_secret="your-api-secret"
)
Installation note:
• Install the package with: pip install livekit-api
If you’d like, tell me:
• which environment you’re running (local, Docker, serverless), and
• the exact import error you’re seeing (if any),
and I’ll help troubleshoot further.
Sources: Python SDKs | livekit/livekit_composite | DeepWiki, with interactive elementstall-airline-16756
03/24/2026, 4:52 PMstart) to run workers with graceful shutdown and stable performance.
◦ Monitor health, metrics, and logs centrally so you can detect if workers are overloaded or failing.
Example flow (high level)
1. Your service receives a "start-call" webhook or request.
2. Service creates/ensures the LiveKit room exists.
3. Service calls the Agent Dispatch API to request an agent for the room.
4. A running worker picks up the dispatch and starts the agent session for that room.
5. Worker manages the session until call end, then becomes available for the next dispatch.
If you want, I can help you next with any of these specifics:
• Example code for sending an agent dispatch request from Python.
• How to run the worker in production mode (command + options).
• Suggestions for autoscaling policy and metrics to monitor.
• Debugging advice if your worker currently isn’t picking up dispatches.
Which of these would be most helpful right now, and can you share how you currently start workers (command/container config) and how you send the dispatch today?
Sources: Server startup modes | LiveKit Documentation | Introduction | LiveKit Documentation | Agent dispatch | LiveKit Documentation | Agents (Python) | livekit/livekit_composite | DeepWiki | Outbound Calling Script | LiveKit Documentation, with interactive elementstall-airline-16756
03/24/2026, 5:01 PMabundant-dawn-64266
03/24/2026, 5:15 PMabundant-dawn-64266
03/24/2026, 5:27 PM