gentle-farmer-57376
07/26/2025, 3:16 PMtall-airline-16756
07/26/2025, 3:16 PMtall-airline-16756
07/26/2025, 3:17 PMdev
mode for development and debugging. Use the command: `python agent.py dev`This mode connects your agent to LiveKit and makes it accessible from anywhere on the internet while providing debugging capabilities.
• Use Built-in Debugging Features: The LiveKit agents framework includes several debugging tools:
◦ Asyncio debugging: Enables asyncio debugging with loop.set_debug(args.asyncio_debug)
.
◦ Slow callback detection: Configures loop.slow_callback_duration = 0.1
(100ms) and hooks slow callbacks with utils.aio.debug.hook_slow_callbacks(2)
.
◦ Exception logging: Automatically logs worker failures with logger.exception("worker failed")
.
• Configure Logging: Set up logging using the framework's configuration: `setup_logging(args.log_level, args.devmode, args.console)`You can also define custom logging in your agent code: import logging
logger = logging.getLogger("your_agent_name")
logger.setLevel(<http://logging.INFO|logging.INFO>)
• Use Console Mode: For local debugging, run the agent in console
mode. This keeps the agent local and accessible only within your terminal.
• Testing with Playground: Use the Agents playground to test and debug your agent interactively when running in dev
mode.
• Collect Debugging Information: If you need further assistance, gather the following details:
◦ Library version: pip freeze |grep livekit
◦ Python version: python --version
◦ Relevant logs with context
◦ Room info (e.g., RM_nnnnn
)
◦ Time the issue occurred and timezone
◦ Whether you're using self-hosted or cloud LiveKit Sources: Voice AI quickstart | LiveKit Docs | Voice AI quickstart | LiveKit Docs | livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/log.py | Still Have Questions