steep-balloon-41261
09/03/2025, 3:20 AMtall-airline-16756
09/03/2025, 3:20 AMtall-airline-16756
09/03/2025, 3:20 AMagents.cli.run_app(opts). But if you’re dealing with something a bit different, there are a couple of other options you might find handy:
• Using the run_worker function directly: This one’s in the _run.py module and gives you more programmatic control. It skips the CLI wrapper, which is great if you’re working in an environment without command-line access.
• Running it through the jupyter.py module: If you’re in a Jupyter notebook, you can call _run.run_worker(args, jupyter=True) directly with a CliArgs object. This method uses nest_asyncio to handle the event loop, making it perfect for interactive notebook setups.
These alternatives give you some extra flexibility for things like custom deployments or fitting LiveKit into bigger applications. If you want me to walk you through any of these or have questions, just let me know—I’m here to help!
Sources: livekit-agents/livekit/agents/jupyter.py | Worker options | LiveKit Docs | Voice AI quickstart | LiveKit Docs