This message was deleted.
# ask-ai
s
This message was deleted.
t
Thanks for reaching out, Mok. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! The usual and recommended way to run a worker in LiveKit is by using
agents.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