From the course: Build with AI: Create Agents with the OpenAI Agents SDK
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Orchestrate multiple agents - OpenAI API Tutorial
From the course: Build with AI: Create Agents with the OpenAI Agents SDK
Orchestrate multiple agents
- Now that our travel agent can plan trips and access live data, it's time to take things to the next level by giving it help. Let's learn how to connect multiple agents together so the main agent can delegate task and collaborate with other agents as a team. There are two ways to orchestrate multi-agent systems, handoffs and using agents as tools. Handoffs transfer control of the conversation and flow between agents, effectively delegating the entire conversation to another agent and transferring full control. Think of a handoff as passing the baton in a relay race. One agent completes part of the task, then hands it off to another specialized agent to continue the workflow. There is no back and forth between the first agent and the next agent, unless that second agent needs to hand it off to a third agent. The race analogy is a great example. When that first runner hands off the baton, that second runner never…