cd /news/ai-agents/ai-agent-orchestration-how-to-route-… · home topics ai-agents article
[ARTICLE · art-43554] src=pub.towardsai.net ↗ pub= topic=ai-agents verified=true sentiment=· neutral

AI Agent Orchestration: How to Route, Call Tools, and Hand off in Customer Support

Snowflake and OpenAI released new tools for AI agent orchestration in customer support, enabling systems to route queries to specialized agents or escalate to humans. The OpenAI Agents SDK, released in March 2025, provides primitives for handoffs and tool use, with over 26,900 GitHub stars and 10.3 million monthly downloads.

read7 min views1 publishedJun 29, 2026

AI agent orchestration coordinates several specialized AI agents so they operate as one system working toward a single goal. Instead of asking one general-purpose model to handle everything, it gives each agent a narrow job and adds a control layer that decides which agent or tool takes each step.

In a customer support context, the orchestration layer is the part of the system that decides whether this message should be answered from the knowledge base, sent to a billing agent, looked up in an order tool, or escalated to a human. The agents are the specialists who do the work. The orchestrator decides who works.

The distinction matters because agents provide capability, while orchestration provides control. As Snowflake’s engineering team frames it, multi-agent systems differ from traditional AI pipelines: rather than a linear flow from input to output, agents operate iteratively and in parallel, revise plans, and act on partial information. Orchestration is what keeps that from becoming chaos.

In customer support, orchestration is usually not about making many agents debate each other. It is about selecting the next safe workflow:

The router decides:

The router should return a structured decision. It can be shaped as follows:

{  “path”: “tool_lookup”,  “intent”: “order_status”,  “tool”: “get_order_status”,  “requiresApproval”: false,  “fallbackPath”: “handoff”,  “reason”: “Customer asks for current delivery status and provided an order ID.”}

This keeps orchestration debuggable. When the wrong path is chosen, you can inspect the decision instead of guessing why the model answered the way it did.

A good router also separates intent from action. A refund_request intent may still become clarify if the order ID is missing, handoff if the item is damaged, or answer if the customer only asks about the return window.

To see how this works in practice, we can look at the OpenAI Agents SDK.

The OpenAI Agents SDK, released in March 2025 as the production-ready successor to OpenAI’s experimental Swarm project, is the most direct way to implement the patterns described above using OpenAI models. It has accumulated over 26,900 GitHub stars and 10.3 million monthly downloads.

Its design philosophy is to provide the minimum set of primitives needed for agent development and let developers compose them without imposing heavy abstraction layers.

The SDK is built around four concepts:

Agents can also be used as tools or for handoffs.

These two patterns solve different problems, and the distinction is worth understanding before you design your routing architecture.

Use agent-as-tool when the main agent should stay responsible for the final answer, and call a specialist as a helper. Use a handoff when the specialist should own the next responsibility, and the main agent should step aside.

The canonical support orchestration pattern in the SDK is a triage agent that classifies incoming messages and routes them to the appropriate specialist via handoff.

The handoffs are declared in the triage agent’s configuration upfront, not discovered dynamically at runtime.

from agents import Agent, handoffbilling_agent = Agent(name=”Billing agent”)refund_agent  = Agent(name=”Refund agent”)triage_agent = Agent(    name=”Triage agent”,    handoffs=[billing_agent, handoff(refund_agent)],    instructions=(        “Route billing questions to the billing agent. “        “Route refund requests to the refund agent.”    ))

When a handoff occurs, the delegated agent receives the conversation history and takes over the conversation. The triage agent does not answer the user directly. It only decides who should.

The handoff() function also accepts an on_handoff callback, which fires as soon as the handoff is invoked. This is useful for kicking off a data fetch or logging a routing decision the moment the triage agent commits to a path, before the specialist agent even starts.

The OpenAI Agents SDK is most effective when used with OpenAI models, especially via the Responses API, which is the recommended path for OpenAI-only applications. It can work with non-OpenAI providers through built-in provider integration points and third-party adapters such as LiteLLM. Still, some provider-specific capabilities, including tool calling, structured outputs, usage reporting, and routing behavior, should be validated before production use.

Runtime context is passed per run, so application-specific context still needs to be managed deliberately. However, the SDK includes built-in session memory to maintain conversation history across runs, with options such as:

For production-grade state, teams still need to choose and operate the right backing store, but they do not have to build all persistence from scratch.

The SDK is not a graph-based orchestration framework. It supports manager-style agents and explicit handoffs, where one agent can transfer control to another. For workflows that require conditional edges, durable execution, complex branching, human-in-the-loop checkpoints, or long-running stateful flows, LangGraph is a better fit.

Whenever you create an AI agent workflow for production, you also need to understand if you should create multiple agents or not.

Most teams should start with one orchestrated agent. Use multiple agents only when ownership is genuinely different.

Do not split agents because it sounds advanced. Split them when it makes permissions, prompts, tools, and evaluation clearer.

As OpenAI’s own orchestration guide notes: start with one agent whenever you can. Adding specialists only improves things when they materially improve capability isolation, policy isolation, prompt clarity, or trace legibility.

Now that you have a method to operationalize AI agents, let’s talk about which framework you should use.

The right framework depends on what the workflow actually requires. Below is how the five main frameworks compare on the dimensions that matter for support orchestration.

A few data points on relative adoption:

For most support orchestration, the choice comes down to two things: whether you need durable state across sessions (if yes, LangGraph), and whether your team is already invested in OpenAI’s API (if yes, start with the Agents SDK).

You do not need to pick one permanently. Many production teams use LangGraph for tool management and retrieval while using the Agents SDK for the agent layer.

One thing no framework gives you out of the box: the channel layer. Kommunicate provides support routing, human handoff, conversation history, and analytics that sit beneath any orchestration framework. Use the Kommunicate docs to connect orchestration to live support channels.

Tools should be scoped by risk level, and that scoping should be explicit before any tool is deployed.

Tool calls should have typed inputs and expected outputs.

{  “tool”: “get_order_status”,  “input”: {    “orderId”: “A18291”  },  “expectedOutput”: {    “status”: “string”,    “estimatedDelivery”: “string”,    “requiresHumanReview”: “boolean”  }}

The model can choose the tool. The backend should validate the tool input. To learn more about tool use, you can see our function-calling tutorial.

Approval gates are used for important tasks that significantly affect billing or the customer. In customer support, you should use approvals for:

Approval gates are not a workaround for a weak agent. They are a design requirement for any action that affects money, identity, or the state of an account. Approval gates and audit logging should be in place before go-live, not after the first incident.

Handoff is an orchestration outcome. It should include a summary and a reason. The summary gives the receiving human agent context without requiring them to read the full transcript. The reason explains why the AI could not or should not continue.

With each handoff, log each orchestration step:

Without this trace, orchestration becomes impossible to debug. A wrong answer might come from the router, the retrieval, the tool, the prompt, or the handoff rule.

A useful orchestration trace is compact but complete:

{  “conversationId”: “conv_123”,  “intent”: “order_status”,  “selectedPath”: “tool_lookup”,  “retrievedSources”: [“shipping_policy”],  “toolsCalled”: [“get_order_status”],  “approvalRequired”: false,  “finalAction”: “answer”,  “fallbackPath”: “handoff”,  “reason”: “Order ID was present, and lookup succeeded.”}

This trace gives support operations a practical debugging surface without exposing the full prompt or sensitive customer data.

For a practical rollout, follow these steps:

This becomes more important as enterprise AI agents increase in volume. Gartner projects that 40% of enterprise applications will feature task-specific AI agents by the end of 2026, up from under 5% in 2025. Most of those deployments will start simple, but they need the above safeguards built in to function as intended.

Customer workflows should determine how much orchestration is actually needed.

The orchestrator should log why it chose a path. That gives the team a way to debug routing issues, improve prompts, and identify missing knowledge.

Make orchestration explicit. Use structured decisions. Log every path.

Salesforce reports that 66% of service organizations are now running AI agents in 2026, up from 39% in 2025.

Most of that growth is happening in support workflows. And the support teams seeing the best results are doing it with AI agents that have the most observable orchestration patterns. Good orchestration makes AI less mysterious and supports more predictable outcomes.

If you want a customer support AI agent preconfigured with handoff and escalation rules, book a demo.

AI Agent Orchestration: How to Route, Call Tools, and Hand off in Customer Support was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.

── more in #ai-agents 4 stories · sorted by recency
── more on @snowflake 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/ai-agent-orchestrati…] indexed:0 read:7min 2026-06-29 ·