Hello, I have problems with tool calling. When the...
# ask-ai
w
Hello, I have problems with tool calling. When the tool calling is done successfully, and the tool return formatted string. But the agent does not next action.
t
Thanks for reaching out, Jayce. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It sounds like the agent not moving on after a successful tool call can be a bit tricky! Here are some common reasons that might be causing this: • Tool Output: Make sure the tool is actually returning a valid output (like a string or JSON). If it doesn’t return anything, the agent might just pause. • Reply Suppression: Double-check if the reply is being stopped on purpose using
ev.cancel_tool_reply()
in your event handlers. • Step Limits: See if the maximum number of tool call steps (
maxToolSteps
) has been hit—that would stop things from moving forward. • Agent Handoff: Make sure there’s only one agent handoff happening per tool execution cycle to keep things running smoothly. • LLM Settings: Take a look at whether
auto_tool_reply_generation
is turned on, since it might be handling replies behind the scenes. • Invalid Output: Confirm that the tool is returning data types that can be serialized to avoid any hiccups. For debugging, try checking the logs for any warnings, look closely at what the tool is returning, and use testing tools to see how everything behaves. If you want, I’m here to help walk you through any of these steps! Sources: agents/src/voice/generation.ts | tests/test_agent_session.py | Docs::Agents