This message was deleted.
# ask-ai
s
This message was deleted.
t
Thanks for reaching out, Arun. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hi — welcome to LiveKit! How can I help you today? A few examples if it helps: joining or creating a room, SDK setup (Web, iOS, Android), troubleshooting connection or permissions, or billing/account questions.
c
{"user_transcript": "K. Only extra thing is", "language": "en-US", "transcript_delay": 0.5288493633270264} 231851.739 DEBUG grpc._cy…on.cygrpc [_cygrpc] Loaded running loop: id(loop)=2259836591216 231858.789 DEBUG asyncio Using proactor: IocpProactor 231858.801 INFO livekit.agents starting worker {"version": "1.3.10", "rtc-version": "1.0.23"} 231858.804 ERROR livekit.agents Error in _read_ipc_task 231858.804 INFO livekit.agents HTTP server listening on :8082 Traceback (most recent call last): File "C:\Users\work\work\agents\.venv\Lib\site-packages\livekit\agents\utils\aio\duplex_unix.py", line 35, in recv_bytes len_bytes = await self._reader.readexactly(4) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\work\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\streams.py", line 750, in readexactly raise exceptions.IncompleteReadError(incomplete, n) asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 4 expected bytes The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\work\work\agents\.venv\Lib\site-packages\livekit\agents\utils\log.py", line 16, in async_fn_logs return await fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\work\work\agents\.venv\Lib\site-packages\livekit\agents\cli\watcher.py", line 135, in _read_ipc_task msg = await channel.arecv_message(self._pch, proto.IPC_MESSAGES) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\work\work\agents\.venv\Lib\site-packages\livekit\agents\ipc\channel.py", line 47, in arecv_message return _read_message(await dplx.recv_bytes(), messages) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\work\work\agents\.venv\Lib\site-packages\livekit\agents\utils\aio\duplex_unix.py", line 43, in recv_bytes raise DuplexClosed() from e livekit.agents.utils.aio.duplex_unix.DuplexClosed 231858.911 INFO livekit.agents registered worker {"agent_name": "ar-local", "id": "AW_rFYeLsxHdkR7Af", "url": "", "region": "", "protocol": 16}
t
Thanks — I see the IPC logs showing an
IncompleteReadError
then
DuplexClosed
during
_read_ipc_task
, and that the agent still logs
registered worker
. I can help troubleshoot—a few quick questions to narrow this down: 1. After registration did this agent receive any jobs or start any sessions? 2. Are you seeing any job-related logs (e.g.,
JobContext
created) after the register line? 3. How are you running the agent (command / mode:
dev
or
console
) and on what OS/version? 4. Did this start happening recently or after a change (agent version, Python, LiveKit server URL/credentials)? 5. If possible, can you share a slightly larger portion of the logs around startup (30–60 seconds before and after the excerpt)? If the agent registers but no jobs arrive, this
DuplexClosed
can be benign (IPC closing while idle). If jobs fail to start or the agent never processes work, the next steps will be: check dispatch rules/agent name, confirm server URL/credentials, and run the agent in
dev
mode to get more verbose traces. Tell me the answers above and I’ll recommend exact commands and log checks. Sources: Agents Framework | livekit/livekit_composite | DeepWiki | Job lifecycle | LiveKit docs | examples/voice_agents | livekit/livekit_composite | DeepWiki
c
runnign consolefrom livekit.agents import Agent, JobContext, WorkerOptions, cli from livekit.agents.voice import AgentSession from livekit.plugins import openai, cartesia, silero, deepgram, google from dotenv import load_dotenv from agents.utils.prompt import WELCOME_MESSAGE from agents.utils.web_agent import get_all_metadata, get_llm_from_config, get_stt_from_config, get_tts_from_config from agents.utils.prompt import DEFAULT_SYSTEM_PROMPT load_dotenv() class V1TestAgent(Agent): def __init__(self, meta_data): agent_info = meta_data['agent'] super().__init__( instructions=agent_info.get("system_prompt", DEFAULT_SYSTEM_PROMPT), stt=get_stt_from_config(meta_data['stt']), llm=get_llm_from_config(meta_data['llm']), tts=get_tts_from_config(meta_data['tts']), vad=silero.VAD.load(), ) async def entrypoint(ctx: JobContext): meta_data = await get_all_metadata(ctx) agent = V1TestAgent(meta_data) session = AgentSession() await session.start(agent=agent, room=ctx.room) if True: await session.say(meta_data['agent'].get('greeting_message', WELCOME_MESSAGE)) async def on_session_end(): ctx.delete_room(ctx.room.name) ctx.add_shutdown_callback(on_session_end) def run(): cli.run_app( WorkerOptions( entrypoint_fnc=entrypoint, agent_name="ar-local", port=8082, ) ) if name == "__main__": run()
t
Thanks — I reviewed your code and logs. You're running the agent in
console
mode and it registers (
registered worker
) but the IPC read fails with an
IncompleteReadError
→
DuplexClosed
. That matches a pattern where the IPC stream is closed (often when idle) after registration. A few targeted checks to determine if this is benign or causing real failures: 1. Are jobs being dispatched to this agent? Do you see any JobContext or session-start logs after the registration line? 2. When you trigger a job (create/join a room), does the agent actually start the session and send the greeting? If not, paste the logs from the moment you trigger the job to 30s after. 3. Confirm you're running the exact command you showed (console) and not mixing `dev`/`console`. If you can, try running in
dev
mode to get more verbose lifecycle logs: ◦ Run:
python agent.py dev
(or the equivalent entry command). 1. Share your LiveKit server URL and dispatch rules settings (agent name
ar-local
must match dispatch rules). If dispatch rules target different agent names/regions, the agent will register but receive no jobs. 2. Collect a slightly larger log slice (30–60s before and after) including any lines showing job dispatch, JobContext creation, or errors right after registration. Quick likely outcomes: • If jobs run normally after registration, the
DuplexClosed
is likely benign (IPC closed while idle). • If jobs never start, the cause is dispatch/routing (agent name mismatch or credentials) or an early process exit—your logs will show that once you provide the requested slice. Tell me: • Whether jobs run after registration, and • The additional log lines or results from running in
dev
mode. I’ll then give exact commands and next steps based on what the logs show.