pipeline-error-openai-llm-failed
# support
k
I’m facing an issue with the agent handoff tool. When I trigger the tool from a workflow, it raises the above error. Can anyone guide me on how to resolve or work around this?
v
Thanks for sharing the error. To help you further, could you let me know if the pipeline-error-openai-llm-failed occurs every time you trigger the handoff tool, or only in specific situations or workflows? Sources: - [Debugging voice agents](https://docs.vapi.ai/debugging) - [Call ended reasons](https://docs.vapi.ai/calls/call-ended-reason)
l
Hey You are getting the pipeline error: openai-llm-failed error while using the handoff tool. From OpenAI logs, it shows the function call runs and outputs “Handoff initiated,” but then the LLM fails. I think the issue might be due to an unstructured tool response or missing target agent. Could you confirm if the tool must return a proper JSON object like { "success": true, "message": "Handoff complete" } and that the target agent (e.g., “SalesAgent”) needs to exist in the workspace for the pipeline to continue?
k
actaully i just create these on navigate to -> tools --> +create tool --> handoff: that tool config { "id": "a5d5353b-db4e-482f-b4d7-21f615c62c98", "createdAt": "2025-11-05T09:47:34.630Z", "updatedAt": "2025-11-05T14:23:35.109Z", "type": "handoff", "function": { "name": "handoff_sales", "description": "You are part of a multi agent system designed to make agent coordination and execution easy. Agents use two primary abstractions: Agents and Handoffs. An agent encompasses instructions and tools and can hand off a conversation to another agent when appropriate. Handoffs are achieved by calling a handoff function generally named handoff_to_agent_name. Handoffs between agents are handled seamlessly in the background and should not be mentioned or highlighted in conversations with the user." }, "messages": [ { "type": "request-start", "content": "Please hold on.", "blocking": false } ], "orgId": "8b6deffa-5a30-4339-8356-f8607ffe1fbc", "destinations": [ { "type": "assistant", "assistantId": "89e384ff-abc9-4a84-9954-109bef52c14", "description": "User wants to speak for sales, start with introduction about yourself", "contextEngineeringPlan": { "type": "all" } } ] }
Where can I verify that it returns a JSON object? It works fine when added directly to the assistant, but not when used within the workflow.
Can anyone help me understand why this issue happens inconsistently? Sometimes everything works fine, but other times it raises the same error. I’m using the same account with different API keys across multiple projects, and none of them have shown this issue before — even when handling large amounts of data with multiple API calls I’ve only started seeing this problem recently, and it seems to occur only on Vapi.
one of the callid: 019a585b-593b-799a-a37e-ba2e49da85f8
c
If you would like to use the handoff tool, please use Squads v2 instead of workflows. Using handoff tool in workflows will cause errors
k
ok, but without handoff tool also randomly call break with the same error what i do
c
Could you please provide a call id with the call without the handoff tool? Also, we would like to know what you are trying to accomplish by using the handoff tool
2 Views