lively-coat-10905
10/21/2025, 8:06 AMtall-airline-16756
10/21/2025, 8:06 AMtall-airline-16756
10/21/2025, 8:08 AMtool isn’t actually part of livekit.agents.utils. No worries though! To fix this, you just need to update your imports to the right module.
Here are a couple of ways you can do that:
• Primary Method (Recommended):
from livekit.agents import function_tool, FunctionTool
• Alternative Direct Import:
from livekit.agents.llm.tool_context import FunctionTool, function_tool, ToolError
Also, to make sure everything runs smoothly, it’s a good idea to have the latest version of LiveKit Agents installed. You can update it by running:
pip install --upgrade livekit-agents
If you run into any more questions or need a hand with anything else, just let me know—I’m here to help!
Sources: livekit-agents/livekit/agents/utils/__init__.py | Tool definition and use | LiveKit Docs | Still Have Questions