my logs for concurrent many calls:
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "2ca95ac29c10", "pid": 537703, "job_id": "AJ_JKeQWnGuzbT9", "room_id": "RM_G5NAExFu4KDG", "timestamp": "2026-04-18T072916.080152+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "305ce941599c", "pid": 537693, "job_id": "AJ_XatgHWnuWpYf", "room_id": "RM_CqiVnSg3rDpj", "timestamp": "2026-04-18T072918.480005+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "0f3d7caa8681", "pid": 533934, "job_id": "AJ_Qp6ExMsLd8Fh", "room_id": "RM_Sqm7kJKLHhwu", "timestamp": "2026-04-18T072920.974222+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "f5ff4ab43fc1", "pid": 466074, "job_id": "AJ_jjMyfuqJmm5g", "room_id": "RM_wjn5zuk64dR5", "timestamp": "2026-04-18T072921.010527+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "11ef13dda94d", "pid": 534563, "job_id": "AJ_7XBrVeaQpnqc", "room_id": "RM_pnjoCSRum9Pi", "timestamp": "2026-04-18T072921.048994+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "f26c27e5b21a", "pid": 534730, "job_id": "AJ_VGxN5zQpLAmV", "room_id": "RM_GzT3mMC6twoK", "timestamp": "2026-04-18T072921.112798+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "d77e2dd47826", "pid": 537693, "job_id": "AJ_XatgHWnuWpYf", "room_id": "RM_CqiVnSg3rDpj", "timestamp": "2026-04-18T072921.138646+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "15cb5c6e7f41", "pid": 537703, "job_id": "AJ_JKeQWnGuzbT9", "room_id": "RM_G5NAExFu4KDG", "timestamp": "2026-04-18T072921.472301+00:00"}
{"message": "worker is below capacity, marking as available", "level": "INFO", "name": "livekit.agents", "load": 0.6621918999999998, "threshold": 0.7, "timestamp": "2026-04-18T072927.052856+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "17ecacfa89ff", "pid": 537703, "job_id": "AJ_JKeQWnGuzbT9", "room_id": "RM_G5NAExFu4KDG", "timestamp": "2026-04-18T072937.329358+00:00"}
{"message": "initializing process", "level": "INFO", "name": "livekit.agents", "pid": 538816, "timestamp": "2026-04-18T072940.982002+00:00"}
{"message": "process initialized", "level": "INFO", "name": "livekit.agents", "pid": 538816, "elapsed_time": 0.92, "timestamp": "2026-04-18T072941.900929+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "ae57ffcadc7e", "pid": 534730, "job_id": "AJ_VGxN5zQpLAmV", "room_id": "RM_GzT3mMC6twoK", "timestamp": "2026-04-18T072949.722463+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "5e0e294d9e93", "pid": 535754, "job_id": "AJ_EPsuL6HqKg2N", "room_id": "RM_Uxev2WUU2RG5", "timestamp": "2026-04-18T072950.942341+00:00"}
{"message": "received job request", "level": "INFO", "name": "livekit.agents", "job_id": "AJ_a9DVJbkhtuTF", "dispatch_id": "AD_rNbrfTpRBKHs", "room": "room-3-f0d02b21", "room_id": "RM_tQNB9CUnKUdA", "agent_name": "sizh_agent", "resuming": false, "enable_recording": false, "timestamp": "2026-04-18T072953.507730+00:00"}
{"message": "initializing process", "level": "INFO", "name": "livekit.agents", "pid": 538846, "timestamp": "2026-04-18T072954.486947+00:00"}
{"message": "worker is at full capacity, marking as unavailable", "level": "INFO", "name": "livekit.agents", "load": 0.9156634999999997, "threshold": 0.7, "timestamp": "2026-04-18T072957.061733+00:00"}
not authenticated
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "f285c69f8475", "pid": 535754, "job_id": "AJ_EPsuL6HqKg2N", "room_id": "RM_Uxev2WUU2RG5", "timestamp": "2026-04-18T072957.253806+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "d2a771ce725b", "pid": 537693, "job_id": "AJ_XatgHWnuWpYf", "room_id": "RM_CqiVnSg3rDpj", "timestamp": "2026-04-18T072957.263554+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "af9db04d2e07", "pid": 467715, "job_id": "AJ_q2NtdTRUgvf2", "room_id": "RM_sSw8yEnaPc9S", "timestamp": "2026-04-18T072957.275993+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "8274f9f8b7e8", "pid": 537703, "job_id": "AJ_JKeQWnGuzbT9", "room_id": "RM_G5NAExFu4KDG", "timestamp": "2026-04-18T072957.330542+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "a6696dcaa2d3", "pid": 533934, "job_id": "AJ_Qp6ExMsLd8Fh", "room_id": "RM_Sqm7kJKLHhwu", "timestamp": "2026-04-18T072957.506323+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "204d3bd8ae06", "pid": 534563, "job_id": "AJ_7XBrVeaQpnqc", "room_id": "RM_pnjoCSRum9Pi", "timestamp": "2026-04-18T072957.512542+00:00"}
{"message": "process initialized", "level": "INFO", "name": "livekit.agents", "pid": 538846, "elapsed_time": 3.24, "timestamp": "2026-04-18T072957.731678+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "ea33ffc5b0dc", "pid": 537731, "job_id": "AJ_a9DVJbkhtuTF", "room_id": "RM_tQNB9CUnKUdA", "timestamp": "2026-04-18T072958.030954+00:00"}
{"message": "inference is slower than realtime", "level": "WARNING", "name": "livekit.plugins.silero", "delay": 0.21451965395454317, "pid": 535754, "job_id": "AJ_EPsuL6HqKg2N", "room_id": "RM_Uxev2WUU2RG5", "timestamp": "2026-04-18T073001.752398+00:00"}
{"message": "inference is slower than realtime", "level": "WARNING", "name": "livekit.plugins.silero", "delay": 2.620470423995517, "pid": 537731, "job_id": "AJ_a9DVJbkhtuTF", "room_id": "RM_tQNB9CUnKUdA", "timestamp": "2026-04-18T073004.576298+00:00"}
{"message": "worker is below capacity, marking as available", "level": "INFO", "name": "livekit.agents", "load": 0.4935517999999998, "threshold": 0.7, "timestamp": "2026-04-18T073004.645180+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "67f760e0d609", "pid": 537731, "job_id": "AJ_a9DVJbkhtuTF", "room_id": "RM_tQNB9CUnKUdA", "timestamp": "2026-04-18T073005.470888+00:00"}
{"message": "worker is at full capacity, marking as unavailable", "level": "INFO", "name": "livekit.agents", "load": 0.9257119999999999, "threshold": 0.7, "timestamp": "2026-04-18T073007.146965+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "fdd06334256c", "pid": 537703, "job_id": "AJ_JKeQWnGuzbT9", "room_id": "RM_G5NAExFu4KDG", "timestamp": "2026-04-18T073013.831262+00:00"}
{"message": "worker is below capacity, marking as available", "level": "INFO", "name": "livekit.agents", "load": 0.6663357999999995, "threshold": 0.7, "timestamp": "2026-04-18T073014.649724+00:00"}
{"message": "worker is at full capacity, marking as unavailable", "level": "INFO", "name": "livekit.agents", "load": 0.7006164999999994, "threshold": 0.7, "timestamp": "2026-04-18T073017.150423+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "9f5f84562e38", "pid": 535754, "job_id": "AJ_EPsuL6HqKg2N", "room_id": "RM_Uxev2WUU2RG5", "timestamp": "2026-04-18T073019.217817+00:00"}
{"message": "worker is below capacity, marking as available", "level": "INFO", "name": "livekit.agents", "load": 0.5806732999999993, "threshold": 0.7, "timestamp": "2026-04-18T073019.652256+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "a9e8c6bd6767", "pid": 467715, "job_id": "AJ_q2NtdTRUgvf2", "room_id": "RM_sSw8yEnaPc9S", "timestamp": "2026-04-18T073021.209538+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "5adb253108a8", "pid": 534563, "job_id": "AJ_7XBrVeaQpnqc", "room_id": "RM_pnjoCSRum9Pi", "timestamp": "2026-04-18T073021.291403+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "221a7aa47253", "pid": 466074, "job_id": "AJ_jjMyfuqJmm5g", "room_id": "RM_wjn5zuk64dR5", "timestamp": "2026-04-18T073021.300233+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "7a7db22aab57", "pid": 537693, "job_id": "AJ_XatgHWnuWpYf", "room_id": "RM_CqiVnSg3rDpj", "timestamp": "2026-04-18T073021.515328+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "02adca00f885", "pid": 535754, "job_id": "AJ_EPsuL6HqKg2N", "room_id": "RM_Uxev2WUU2RG5", "timestamp": "2026-04-18T073021.619496+00:00"}
{"message": "Context created confirmed by server", "level": "INFO", "name": "livekit.plugins.inworld", "context_id": "63f5d1de8cbe", "pid": 537731, "job_id": "AJ_a9DVJbkhtuTF", "room_id": "RM_tQNB9CUnKUdA", "timestamp": "2026-04-18T073021.873233+00:00"}
{"message": "worker is at full capacity, marking as unavailable", "level": "INFO", "name": "livekit.agents", "load": 0.8108918999999993, "threshold": 0.7, "timestamp": "2026-04-18T073022.154915+00:00"}
my code:
import os
from dotenv import load_dotenv
from livekit import agents
load_dotenv()
from services.llm.agent_service import entrypoint, prewarm
URL = os.getenv("LIVEKIT_URL")
KEY = os.getenv("LIVEKIT_API_KEY")
SECRET = os.getenv("LIVEKIT_API_SECRET")
AGENT_NAME = os.getenv("AGENT_NAME")
AGENT_PORT = 8091
def main() -> None:
agents.cli.run_app(
agents.WorkerOptions(
entrypoint_fnc=entrypoint,
prewarm_fnc=prewarm,
agent_name=AGENT_NAME,
port=AGENT_PORT,
api_key=KEY,
api_secret=SECRET,
ws_url=URL,
)
)
if name == "__main__":
main()