limited-pillow-7054
02/21/2026, 11:00 PMtall-airline-16756
02/21/2026, 11:00 PMtall-airline-16756
02/21/2026, 11:00 PM<http://logger.info|logger.info>() calls made inside job child processes in the terminal when running python3 agent.py dev.
• You are using WorkerOptions + cli.run_app() (not AgentServer) and suspected the SDK’s IPC log queue isn’t forwarding child logs.
Short answer
• Child-process logs will not be forwarded to the parent terminal when using WorkerOptions + cli.run_app(). AgentServer is required to run the IPC log bridge that forwards child job logs back to the parent so they appear in the terminal during dev mode.
Why this is happening (brief)
• LiveKit agents fork child processes per job. Those child processes emit logs locally.
• The SDK includes a LogQueueHandler → LogQueueListener IPC mechanism to forward child logs to the parent, but that IPC listener is created and managed by AgentServer.
• When you run the lower-level WorkerOptions + cli.run_app() path, the IPC listener is not started, so child logs are not forwarded to the parent stdout. That’s why:
◦ Calls still work and show in LiveKit Cloud Observability,
◦ start mode outputs JSON startup logs but not per-job child logs,
◦ standard attempts like logging.basicConfig() or redirecting stdout in the parent don’t capture child-process logs.
What to do (recommended)
1. Switch to AgentServer for local development so the SDK sets up the log IPC bridge for you.
◦ Create your server and entrypoint with AgentServer and run with cli.run_app(server).
◦ Example pattern:
from livekit.agents import AgentServer, cli
import logging
logger = logging.getLogger("myagent")
logger.setLevel(<http://logging.INFO|logging.INFO>)
server = AgentServer()
@server.rtc_session(agent_name="my-agent")
async def entrypoint(job_context):
<http://logger.info|logger.info>("This log WILL appear in the terminal")
# your job logic
if __name__ == "__main__":
cli.run_app(server)
1. Run in dev mode with an INFO log level:
◦ python3 agent.py dev --log-level=INFO
1. Put your <http://logger.info|logger.info>() calls inside the job entrypoint / Agent subclass (child process), using a named logger like logging.getLogger("myagent").
Alternative (if you cannot use AgentServer)
• You can attempt to replicate the SDK’s IPC log forwarding yourself by configuring a multiprocessing/IPC log handler in each child process to send records to the parent, but this requires re-implementing internal SDK behavior and is error-prone. It’s not recommended unless you must maintain the WorkerOptions path.
Why your earlier attempts failed
• logging.basicConfig() and FileHandler in prewarm: either run in parent or a different process; child job processes still write to their own handlers.
• Redirecting stdout of the start command: startup JSON comes from the parent; child processes’ logs aren’t forwarded.
• Logger naming: logger name doesn’t affect transport — the IPC bridge does.
If you want, I can:
• Help convert your current WorkerOptions/cli.run_app implementation into the AgentServer pattern (show file-level changes).
• Review a short snippet of your current agent.py to point out exactly what to change.
• Or, if you must stay on WorkerOptions, outline the minimal IPC log-forwarding code to add to your entrypoint.
Which would you prefer?
Sources: Server options | LiveKit Documentation | Where to find your Agent Logs | LiveKitlimited-pillow-7054
02/21/2026, 11:02 PMtall-airline-16756
02/21/2026, 11:02 PMpython agent.py dev (or cli.run_app(server)) is what you deploy to LiveKit Cloud (for example via lk agent create). Using AgentServer gives you the local dev benefit of forwarded child logs and matches the deployment model in Cloud, so you won’t need different code paths for dev vs prod.
If you’d like, I can:
• Show the minimal changes to convert your current WorkerOptions/cli.run_app setup to the AgentServer pattern, or
• Review a short snippet of your current agent.py and mark the exact lines to change.
Which would help you most?
Sources: Agent deployment overview | LiveKit Documentation | Introduction | LiveKit Documentation | Google AI and LiveKit | LiveKit Documentation | Server options | LiveKit Documentation | Gemini Realtime Agent with Live Vision | LiveKit Documentationlimited-pillow-7054
02/21/2026, 11:03 PMtall-airline-16756
02/21/2026, 11:04 PMserver = AgentServer(), attach entrypoints with @server.rtc_session() (or set hooks on the instance), then run with cli.run_app(server).
◦ WorkerOptions: Config-driven. You define WorkerOptions(...) with callbacks like entrypoint_fnc and pass it into a runner. More similar to the Node.js/TS way of configuring a worker.
• Logging and dev experience
◦ AgentServer: Starts the IPC LogQueueListener that forwards child-process logs back to the parent so you see child <http://logger.info|logger.info>() output in your terminal when running dev. This is why AgentServer is recommended for local development if you need per-job logs in the terminal.
◦ WorkerOptions: When used without AgentServer-style setup, the IPC listener isn’t automatically started, so child-process logs typically won’t appear in the parent terminal unless you add your own IPC forwarding.
• Lifecycle & server features
◦ AgentServer: Exposes server-level hooks (prewarm/setup, drain_timeouts, permissions, etc.) directly on the instance and manages job forking and lifecycle consistently.
◦ WorkerOptions: Lets you configure similar behaviors but through a set of options; it’s more declarative and maps better to non-Python SDK patterns.
• Deployment
◦ AgentServer: Standard and expected pattern for deploying Python agents to LiveKit Cloud. The same AgentServer code you run locally is compatible with Cloud deployment.
◦ WorkerOptions: Usable, but if you rely on WorkerOptions without the AgentServer-managed pieces you may miss behaviors (like IPC logging) that AgentServer provides. If you plan to deploy to Cloud, using AgentServer aligns with the recommended deployment model.
When to choose which
• Use AgentServer if:
◦ You’re writing your agent in Python.
◦ You want the easiest path for local dev with forwarded child logs.
◦ You want a straightforward deployment path to LiveKit Cloud.
• Consider WorkerOptions if:
◦ You’re following a Node.js/TS-style design or need a config-driven approach.
◦ You have a specific reason to manage logging/lifecycle manually and are prepared to implement any missing IPC/log forwarding yourself.
If you want, I can:
• Show a minimal side-by-side snippet converting your current WorkerOptions pattern to AgentServer, focusing only on the changes needed to get child logs visible in dev.
• Or, outline the minimal IPC log-forwarding you’d need to add if you must stay on WorkerOptions.
Which would be most useful?
Sources: Server options | LiveKit Documentation | OpenAI and LiveKit partner to turn Advanced Voice into an APIlimited-pillow-7054
02/21/2026, 11:06 PMtall-airline-16756
02/21/2026, 11:07 PMlimited-pillow-7054
02/21/2026, 11:07 PM