creamy-judge-56458
07/23/2025, 8:56 PMtall-airline-16756
07/23/2025, 8:56 PMtall-airline-16756
07/23/2025, 8:57 PMWorkerOptions configuration.
For Python Agents:
from livekit.agents import WorkerOptions
opts = WorkerOptions(
entrypoint_fnc=your_entrypoint_function,
job_memory_warn_mb=0, # Set to 0 to disable warnings
job_memory_limit_mb=0, # Set to 0 to disable memory limits
)
For JavaScript/TypeScript Agents:
const workerOptions = new WorkerOptions({
agent: 'path/to/your/agent',
jobMemoryWarnMB: 0, // Set to 0 to disable warnings
jobMemoryLimitMB: 0, // Set to 0 to disable memory limits
});
Details:
• job_memory_warn_mb (Python) or jobMemoryWarnMB (JavaScript): Memory warning threshold in MB. Set to 0 to disable warnings.
• job_memory_limit_mb (Python) or jobMemoryLimitMB (JavaScript): Maximum memory usage for a job in MB. Set to 0 to disable memory limits.
The memory monitoring system checks process memory usage every 5 seconds. If memory usage exceeds the warning threshold, a warning is logged. If it exceeds the limit (if set), the process is terminated.
Sources: livekit-agents/livekit/agents/ipc/job_proc_executor.py | agents/src/worker.ts