proud-lawyer-39815
10/27/2025, 9:35 PMtall-airline-16756
10/27/2025, 9:35 PMtall-airline-16756
10/27/2025, 9:36 PMToolError in on_enter might be a bit confusing. Just to clarify, this type of error is meant specifically for the tool execution pipeline. So, when it's raised in on_enter, it will cause the task to fail and the error will be logged, but it won’t be sent back to the agent as a tool-specific error message.
If you're looking to manage errors in on_enter, a good approach would be to use the usual Python error handling and logging techniques. This way, you can keep things running smoothly and have better control over the errors. I hope this helps! Feel free to ask if you'd like more guidance on this.
Sources: livekit-agents/livekit/agents/voice/agent.py | Tool definition and use | LiveKit Docs | Docs::Agents