busy-lunch-15701
10/31/2025, 4:47 AMcli.run_app(
WorkerOptions(
agent_name=agent_name,
request_fnc=request_handler,
entrypoint_fnc=entrypoint_handler,
# No prewarming for now to keep it lean as requested
initialize_process_timeout=30,
job_memory_warn_mb=4096, # Warn at 4GB (AI models need this)
job_memory_limit_mb=8192, # Limit at 8GB
num_idle_processes=num_idle_processes,
shutdown_process_timeout=60, # Keep processes alive for 60s
)
)tall-airline-16756
10/31/2025, 4:47 AMtall-airline-16756
10/31/2025, 4:47 AM/) path.
Here’s how it works by default:
• The server listens on http://0.0.0.0:8081/.
• The / endpoint will respond with 200 OK and the simple text "OK" when your agent is healthy and running smoothly.
• If a critical part of the system, like the inference executor, isn’t running, it will return 503 Service Unavailable to let you know something needs attention.
There’s also a /worker endpoint available that provides more detailed information about your worker, including the agent name, how many jobs are active, and the SDK version.
To make sure everything works perfectly:
• Remember to expose port 8081 in your deployment environment, whether that’s Docker, Kubernetes, or another platform.
• Use the / endpoint for quick liveness checks, and the /worker endpoint when you want to dig into detailed state information.
Generally, you won’t need to build any custom health checks unless you want to go beyond what the default monitoring offers.
Sources: Deploying to custom environments | LiveKit Docs | livekit-agents/livekit/agents/worker.py | README.md | python-agent-example-app/Dockerfile