salmon-belgium-62133
12/15/2025, 7:14 AMPROCESS and THREADtall-airline-16756
12/15/2025, 7:15 AMtall-airline-16756
12/15/2025, 7:15 AMPROCESS and `THREAD`" do you mean:
• an option to choose a concurrency model for background work (multiprocessing vs threading),
• a setting in a client for how media/IO is handled, or
• something else?
If you confirm the exact package/tool and the area you're referring to (installation, runtime option, client config, etc.), I’ll tell you whether that option exists and how to enable it or offer the closest alternative.salmon-belgium-62133
12/15/2025, 7:16 AMtall-airline-16756
12/15/2025, 7:16 AMnum_idle_processes and a prewarm function to prepare processes before they accept jobs.
Would you like instructions for using threads/async inside a job or help tuning `num_idle_processes`/prewarm settings?
Sources: Deploying to custom environments | LiveKit docs | Agent server options | LiveKit docs | Job lifecycle | LiveKit docssalmon-belgium-62133
12/15/2025, 7:23 AMtall-airline-16756
12/15/2025, 7:23 AMJobExecutorType.THREAD on Windows because some Python versions on Windows can raise a BrokenPipeError when creating new processes.
• On non‑Windows platforms it defaults to JobExecutorType.PROCESS so each job runs in its own subprocess for isolation.
You can still use threading or asyncio inside a single job/process for concurrency. If you want to override the default executor type (for example force processes on Windows or threads elsewhere), do you want instructions for where and how to set that in your agent configuration?
Sources: Agent server options | LiveKit docssalmon-belgium-62133
12/15/2025, 7:26 AMtall-airline-16756
12/15/2025, 7:26 AMjob_executor_type with two options: JobExecutorType.PROCESS and JobExecutorType.THREAD.
• What they mean
◦ PROCESS: each job runs in its own subprocess (strong isolation; a crash in one job won't take down others).
◦ THREAD: jobs run on threads within the same process (less isolation, but avoids process-creation issues on some platforms).
• Defaults
◦ On Windows the agent defaults to JobExecutorType.THREAD because some Python versions on Windows can raise BrokenPipeError when spawning processes.
◦ On non-Windows platforms the default is JobExecutorType.PROCESS.
• How to configure
◦ Set job_executor_type on your agent configuration to one of the enum values. Example:
from your_agent_module import JobExecutorType, AgentConfig
cfg = AgentConfig(
job_executor_type=JobExecutorType.PROCESS # or JobExecutorType.THREAD
)
• Remember that forcing PROCESS on Windows may trigger the process-creation issues the default avoids. Inside a job (regardless of executor) you can still use threads or asyncio for concurrency.
Would you like a snippet showing where to pass this config when constructing the agent in your code?