best-battery-56004
05/14/2026, 11:41 PMagent_session.shutdown(drain=True) , how can I wait until the drain completes?tall-airline-16756
05/14/2026, 11:41 PMtall-airline-16756
05/14/2026, 11:41 PMagent_session.shutdown(drain=True) — good question.
Call await agent_session.aclose() after shutdown(...). shutdown() initiates a non-blocking graceful shutdown; aclose() is awaitable and will pause execution until the drain and close operations finish.
Sources: Job lifecycle | LiveKit Documentation, with interactive elements