able-jackal-84140
07/14/2025, 8:24 PMtall-airline-16756
07/14/2025, 8:24 PMtall-airline-16756
07/14/2025, 8:25 PMRuntimeError: AgentSession isn't running
occurs when you attempt to call methods on an AgentSession
that requires the session to be active, but the session hasn't been started yet or has already been closed.
• Common causes: Calling methods like say()
, generate_reply()
, or drain()
before calling start()
on the session, or after the session has closed.
• Resolution: Ensure you call await session.start(...)
before using any session methods. If the session has closed (due to errors or user action), you must restart it with start()
before further use.
• Best practices: Always start sessions before use, monitor session lifecycle events, and handle session closure gracefully in your code.
If you need more specific troubleshooting, please provide the relevant code snippet or describe when this error occurs in your workflow.
For more details on session lifecycle and error handling, refer to the guidance above.
Sources: livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/avatar.py | Events and error handling | LiveKit Docs