What's the difference between starting the livekit...
# ask-ai
b
What's the difference between starting the livekit agent in prod vs dev?
t
Thanks for reaching out, Anuar. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Let’s chat about how starting the LiveKit agent differs between production and development environments — it mainly comes down to configuration defaults, logging, resource management, and a few handy operational tweaks: • Logging: In development mode, you get friendly, colored logs that are easy on the eyes, with a default
DEBUG
level so you can see all the details. Production mode switches to raw JSON logs with a higher default level like
INFO
to keep things efficient. • Health Check: Production mode turns on a health check server on port 8081 to keep an eye on things, while development mode keeps this off unless you decide to enable it. • Resource Management: Production mode is smart about resources — it enforces load limits (like 70% CPU) and pre-warms idle processes to speed up job handling. Development mode takes it easy, disabling these thresholds and using minimal resources. • Shutdown Behavior: When shutting down, production mode lets running jobs finish up within a timeout, so nothing gets cut off abruptly. Development mode, on the other hand, exits quickly to keep your workflow snappy. • Hot Reloading: Development mode supports hot reloading with the
--watch
flag, making it super convenient while you’re coding. Production mode disables this for stability. To get started, just run
python agent.py dev
or
node agent.js dev
for development, and
python agent.py start
or
node agent.js start
for production. Oh, and a quick tip: make sure you use separate LiveKit projects or instances for development and production so they don’t step on each other’s toes. Sources: livekit-agents/livekit/agents/cli/_run.py | Voice AI quickstart | LiveKit Docs | Worker options | LiveKit Docs | README.md | Deploying to custom environments | LiveKit Docs