Loading video player...
Hey everyone, this is Christina from
OpenAI. Welcome to Agent Builder 101.
Agent Builder is a new visual tool for
building AI workflows. You connect nodes
and create agents without writing any
code. So you can start from templates or
build your own from scratch. And it also
comes with built-in eval so you can test
and understand how your agents perform.
When you're ready, you can export the
workflow as code or drop it straight
into your product. Basically, it's your
all-in-one space to design, test, and
launch AI agents visually and fast. So
today we're going to show you how to
build your first agentic workflow, a
helpful travel agent that will help you
either build an itinerary or look up
flight information. So, we're starting
here in the OpenAI platform.
Every workflow starts with a start node
where you can set input variables or
state variables. And today for the
travel agent, the defaults are great.
Next, I'll connect a classifier agent.
I'm going to be building a specialized
itinerary agent in addition to a
specialized flight agent. And so, I want
to first determine which agent I should
route to. So, I'll call this classifier.
So, you are a helpful travel assistant
for classifying whether a message is
about an itinerary or a flight.
And here I'll specify the output format
as JSON. And I'll add a property called
classification
which will have two options either
flight info or itinerary.
Great.
Next, I'll add in an if else node um to
branch based off of the classification.
So if
put pars.classification classification
is flight info then we want to branch to
the flight agent and otherwise we want
to branch into the um the itinerary
agent. So from the flight agent we'll
create a new node and we'll call this
flight agent.
You are a travel assistant.
always recommend a specific flight to go
to.
Use airport codes.
And here I'll also give it access to web
search so I can have the most up-to-date
information about flights.
Great. For the itinerary agent, I'll
build um an itinerary agent with a new
agent node.
You are a travel assistant.
So build a concise
itinerary.
Great. I think that's everything we need
to get started with our travel agent. So
here in run preview, I'll ask it what
should I do in a day in Tokyo.
And I can see the message going through
the workflow that we just created. going
through the classifier agent, deciding
which category it should go to, seeing
that I asked about an itinerary, and
then passing it on to the itinerary
agent, whereas come up with a concise
one-day itinerary for Tokyo. Looks like
a great day. Now, for the flight agent
I actually want a richer experience for
showing flight information instead of
just plain text. And so, I can do that
by going and building a widget in our
widget studio. Here I've actually
already designed um a widget for showing
flight information to go from one
location to the next with um all the
details about the flight. So I can just
click download um to download this
entire template and then bring that
directly to the agent um that we just
created here. I'll add it in as the
widgets output format. I'll upload this
flight widget that we just pulled.
Preview it. Everything looks great. And
I actually want this to be a bit more
customized. Um, and so I will tell it to
choose a background color
creatively
based on the destination.
And I'll also ask it to include time
zones A.M. or PM.
Great. Let's test it out.
SFO to Tokyo on October 7th.
So here again, we see it moving through
the classifier agent um determining
whether I'm asking about um a flight or
an itinerary, deciding that I'm asking
about a flight agent um or deciding that
I'm asking about a flight, searching the
web, finding a flight for me, and then
showing it to me in this rich
interactive way. In this case, it's
decided that yellow is the color of
Tokyo. Um, and so showed that as the
background color.
Great. So I've now built an agent that
I'm happy with and I can publish it
directly. Let's call it travel agent
here.
And I now have a fully deployed agent
that is ready to go. Um, I can either
use the agents SDK. And here you can see
that this is quite a bit of code um for
me to manage myself
or I can simply take this workflow ID
and put it in my product directly using
jacket. So that's all. Hope that was
helpful and please leave any feedback in
the comments and don't forget to
subscribe to OpenAI devs for more
product updates. Thank you.
Christina Huang from OpenAI guides you through Agent Builder—a new visual tool to create agentic workflows. Drag and drop nodes, connect tools, and publish your workflows with ChatKit and the Agents SDK. https://platform.openai.com/agent-builder