agents.cli.run_app( agents.WorkerOptions( ...
# ask-ai
s
agents.cli.run_app( agents.WorkerOptions( entrypoint_fnc=entrypoint, memory_warn_mb=2000, # warn at 2GB instead of 500MB ) ) is this syntax correct?
t
Thanks for reaching out, Maaz. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking whether that call syntax is correct for running an agent with WorkerOptions — I can help, but I need one quick clarification: • Are you using a Python API where
agents.cli.run_app
expects a
WorkerOptions
object (i.e., both names are from the same library/module)? If yes, the call looks syntactically valid Python for passing a
WorkerOptions
instance with
entrypoint_fnc
and
memory_warn_mb
set. If you want, tell me which library/package and the expected parameter names (or paste the function signature) and I'll confirm the exact field names and any required fields.
s
yes
t
You're using the right pattern for calling
agents.cli.run_app
with a
WorkerOptions
instance and an
entrypoint_fnc
— that syntax is correct. However,
memory_warn_mb
is not a documented/confirmed option for
WorkerOptions
. Valid fields shown in examples include
entrypoint_fnc
,
agent_name
, and
worker_type
. If you need behavior tied to memory warnings, tell me what you want to happen when memory is high and I can suggest alternatives or check for a supported option. Sources: Building an Automated IVR Menu Caller | LiveKit docs | Company directory phone assistant | LiveKit docs | Modifying LLM output before TTS | LiveKit docs | OpenAI and LiveKit partner to turn Advanced Voice into an API | Agent dispatch | LiveKit docs
s
agents.cli.run_app( agents.WorkerOptions( entrypoint_fnc=entrypoint, memory_warn_mb=2000, # warn at 2GB instead of 500MB memory_limit_mb=6000 # kill agent BEFORE OS kills it ) ) what about this
t
You're using the correct Python pattern for calling
agents.cli.run_app
with a
WorkerOptions
instance and
entrypoint_fnc
— that part is valid. However,
memory_warn_mb
and
memory_limit_mb
are not documented or confirmed options for
WorkerOptions
. Those parameters are not shown in examples or reference material, so they are likely not supported by the public API. If you want memory-warning or memory-limit behavior I can help with options: • Describe the exact behavior you want when memory is high (log a warning, graceful shutdown, restart, etc.), and I’ll suggest an approach. • Or tell me your deployment environment (Kubernetes, Docker, plain VM) and I’ll outline how to enforce limits there. Sources: Company directory phone assistant | LiveKit docs | Modifying LLM output before TTS | LiveKit docs | Building an Automated IVR Menu Caller | LiveKit docs | Deploying to custom environments | LiveKit Docs