early-window-29567
10/31/2025, 4:37 PMtall-airline-16756
10/31/2025, 4:37 PMtall-airline-16756
10/31/2025, 4:37 PM@function_tool decorator to make your method asynchronous, which means it won’t block other processes.
2. Control Interruptions: Add run_ctx: RunContext in your tool’s signature. This helps manage interruptions smoothly and keeps the execution silent.
3. Silent Execution: Simply return None from your tool so the agent won’t respond out loud.
4. Handle Errors: Make sure to log any errors internally to keep the agent running without crashes.
5. Example: Feel free to check out the long_running_function.py and silent_function_call.py examples—they’re great resources to see this in action.
If you’d like, I’m here to walk you through the setup or answer any questions you might have!
Sources: livekit-agents/livekit/agents/voice/run_result.py | Tool definition and use | LiveKit docs | agents/src/voice/generation.ts