This message was deleted.
# ask-ai
s
This message was deleted.
t
Thanks for reaching out, Aleh. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — to import ToolError, use:
Copy code
from livekit.agents import ToolError
This is the import used in the error-handling examples for function tools in the LiveKit Agents docs: https://docs.livekit.io/agents/logic/tools/ If you’d like, I can show a short example of raising ToolError inside a tool function and how the agent handles it. Sources: Tool definition and use | LiveKit Documentation