I am getting the following error and after that th...
# ask-ai
a
I am getting the following error and after that the agent goes silent. "expected to receive only one AgentTask from the tool executions"
t
Thanks for reaching out, nidhish. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! That error message, "expected to receive only one AgentTask from the tool executions," pops up when more than one tool in a batch tries to hand off to an agent by returning
AgentTask
instances. The system actually expects just one handoff per batch to keep things running smoothly. Here’s how you can fix it: • Make sure only one tool in any execution batch returns an
AgentTask
. • Double-check that your tool functions return no more than one
Agent
instance. • Take a look at any parallel tool executions to ensure agent handoffs aren’t happening at the same time. • Try using conditional logic in your tools so only one path leads to an agent handoff. If you see this error, it’s the system’s way of keeping the conversation flowing nicely by preventing multiple handoffs. Feel free to reach out if you want a hand with debugging or setting this up—I’m here to help! Sources: livekit-agents/livekit/agents/beta/workflows/email_address.py
a
this is the complete error
{"message": "expected to receive only one AgentTask from the tool executions", "level": "ERROR", "name": "livekit.agents", "pid": 150, "job_id": "AJ_j5UKBzAGWwzn", "timestamp": "2025-08-25T21:37:53.554663+00:00"}