miniature-nail-35141
09/17/2025, 6:58 AMtall-airline-16756
09/17/2025, 6:58 AMtall-airline-16756
09/17/2025, 6:59 AMshutdown_callback function in LiveKit doesn’t actually provide a return value. These callbacks are really meant to help with cleanup or any tasks you want to handle when shutting down. While they don’t return anything, the framework makes sure they finish up properly within the timeout period (which is usually 60 seconds). If you have any more questions about how this works or need help with something else, feel free to ask—I’m here to help!
Sources: Inside a session | LiveKit Docs | Inside a session | LiveKit Docs | Job lifecycle | LiveKit Docs | Session recording and transcripts | LiveKit Docs | example/lib/utils.dartminiature-nail-35141
09/17/2025, 7:00 AMtall-airline-16756
09/17/2025, 7:01 AMasync def my_callback(reason: str):.
• JavaScript/TypeScript SDK: Unfortunately, shutdown callbacks here don’t accept parameters—they’re always called without any arguments.
If you’d like, I’m happy to provide more details or examples tailored to your specific SDK. Just let me know!
Sources: examples/voice_agents/basic_agent.py | Session recording and transcripts | LiveKit Docs | agents/src/job.ts