Okay, good afternoon everybody.
I want to ask you the first question.
Everybody here knows who is Warren Buffett?
Imagine for a moment that I'm Warren Buffett.
It's easy to imagine because me and Warren Buffett, we are like twins, you know?
It's very easy.
We are brothers.
So if Warren Buffett says to you today, okay, what is your name, please?
Gonzalo.
If Warren Buffett comes here and says to you today, Gonzalo, let's invest in lights, you will do it?
because it's Warren Buffett, right?
For me, in AI, one of the Warren Buffett is OpenAI, Anthropic, but today we'll talk about OpenAI, okay?
If you review the last news in these weeks, we'll hear things about MCP, H2P.
It's the new protocol that AI engineers create to use for AI agents.
It's very important this word, agents, because all the AI industry is going to agents.
So today, in the end of this conversation we'll have here,
will be able to know how to use OpenAI Agents SDK is the last framework of design and orchestrate AI Agents to create real projects.
And the most important thing you will know how, what is the question you have to ask your engineer or your AI designer to tell him, okay, if you want to design an AI project, you have to make these basics.
If you don't have these basics, the project doesn't work, okay?
So I will show you
OK, I will show you.
a very simple demo.
The project is that we use three different agents.
These agents have different roles.
They have a professional role, another has a humoristic role, another has a busy role.
These agents will work together to design different sales emails and the system will choose the best email to send the client.
So we'll see it here.
I will show you
the demo, and I will show you a little bit for the technical people here, I will show you how I design the code, okay?
It's okay?
Okay, let's go.
So, first of all, I want to show you how we design.
Just let me restart and check this one a little bit.
Okay, everything is okay.
So, we design three kind of agent.
Professional agent, phony agent, and direct agent, okay?
So how we create this agent?
I will generate the three emails we have here.
If you use the demo, you can change the name of company.
I use the name of my startup, Aboma Innovations.
Sometimes I call it Warren Buffett Innovation, because we are.
I generate the emails.
Take a little bit of time.
You see here how the.
And the system generates the three kinds of emails.
We have here the professional agent, we have here the funny agent, and we have here the direct agent.
The professional have the typical email, you know?
The funny agent is more like, I don't, some people here know the copyrighted Israel Bravo.
This style, Israel Bravo style, okay?
And the direct agent is the busy agent.
I don't have time, I go in the point directly, okay?
So,
I will show you a little bit how I made it.
If you are not technical, no problem.
I'll show you easy just for know the structure.
OK.
So how to create an agent using OpenAI Agent SDK?
It's very easy.
First of all, you have to import these libraries.
In the final of this conversation, I will share you the links or everything.
You can find the code.
And this is the instructions.
The instructions that I showed the agents.
You have to work like this.
You have to work like a professional, like a humoristic, like a serious.
And here, this is the main key.
We create the agent.
We call Sage Agent 1, Sage Agent 2, Sage Agent 3.
We put the name, Professional Sage Agent.
We put the instruction, and that we set up the model.
We use OpenAI Agents SDK.
I use the API of OpenAI.
So I choose the model GPT-40-Mini.
You can use any model you want.
okay so you can do this part the model you can choose a cloud model you can use deep sync model you have you just have to know how to connect the endpoint this is a little bit technique no problem the endpoint of the of the the model for example cloud to the endpoint of openir to be compatible okay is the only thing you have to know but this is not i don't want you to be um
have problem with the technical thing.
It's just for show for technical people.
But the important thing is here.
I show you these three emails.
So you can ask me, expert, OK, you have the three email.
How the system work together?
I will show you one of the important part of designing and orchestrating AI agents.
It's about, the second word I say, orchestrating is how you put different agents to work together and create a very interesting system to apply to professional things, to real projects, okay?
So in this part, orchestrate system, I will work with these three emails, okay?
And the system,
We'll choose what is the base email to send the audience, the last client.
I will execute the complex system.
And while the system is executing, I will show you one more important thing.
When you work with AI today, you create, for example, a chart with chart activity or something like that, but you always ask me, oh, expert, chart activity works well, but sometimes I don't know how to trace, how to see if the model works as I want.
So this is one of the...
More important things about OpenAI Agents SDK, they have some tools called trace.
In trace, you can see everything your agents do in real moment.
So these executions, if I show you here, this execution I do first with three agents, we can see it here.
We have here the phony agents, the direct agent, and the professional agent.
You see here the time that I take to each agent to respond, to generate the email.
And here you can see,
What is the input?
What is the output?
You can see everything.
And you can see all the problems the model has in the process.
So that gives you the message, OK, I designed this project, but these agents, I have to improve this part if I want the agents to work better in the future.
So let's go to the orchestration.
The execution is finished.
So this is the message, the professional email has been formatted and is ready to be sent.
So the system choose between the three email we generate before, the system choose the professional email.
The system decide that the professional email is the best email we can send to the client, okay?
So let's go to the trace.
Trace is very important here.
You can call me expert trace in the end of the conversation.
This system, you choose the last email is called, I call it orchestration, no graduals.
Next, I will explain what is the graduals.
So we can see here how it works.
We have the sales director, the system that orchestrates different agents is called sales director.
And here you can see all the response.
You can see here all the agents work in this system.
We have here the sales agents.
You see, in the first part, we see it individually.
And here, we see them in the same tree.
OK?
We have here the sale director.
This is the response.
You see here what model we use, the date, all the details.
You can see here with Open Agents as the key.
You see here all the agents that participate, the input, the output, the time, the problem, et cetera, everything you want.
OK, and this is one of the important parts I want to explain to you when you design projects with OpenAI Agents SDK.
We have two philosophies.
We have agents as tools that you create.
We see first.
You remember how I showed you how to create an AI agent with OpenAI Agents SDK.
Well, I managed with Spanish because I'm Warren Buffett's friend.
When you create an AI agent,
When you have to put this AI agent you create in another big system, so this is little AI agent.
This is the big AI agent.
You have to put this little AI agent in the big system of the big AI agent.
So this little AI agent, you have to decide, OK, this little AI agent will work like what?
This is two systems.
We have two systems.
Agents as tools, so you can put this little agent as a tool for the big agent, or you can use it as a handoff.
What is the difference?
Agents as tool is, for example, Gonzalo, right?
Gonzalo, you're a director of here.
I'm the marketing developer, this is the software developer, and this is the business developer.
What is the difference when you work with, as tools, you say, you decide the responsibility is for you.
You decide, okay, I want a marketing email, so I will talk with the marketing developer, okay?
I want a software developer, I will talk with the software developer.
So you decide who do the work you need in the moment, and by the end, the responsibility goes back to you.
Because if something goes wrong, the responsibility is for you, okay?
In Handoff, the difference is you still being the director.
But in Handoff, you don't have all the responsibility.
I have a marketing problem, so I have to choose the marketing developer.
So the marketing developer, you just give him all the responsibility.
Your work is do the marketing.
So do the marketing thing.
He do all the project in marketing things, and if he have
Any kind of problem is his responsibility.
Don't have to go to you, oh, Gonzalo, I have any problem.
No, no, no.
It's his responsibility to decide, OK, what agent I have to choose, what thing I have to fix, et cetera.
To be easy, difference.
Agent SaaS tool, you put agents, little agents to a big agent system.
Handoff, okay, you have a big system, but inside that big system, the little agent have autonomy, okay?
Like the autonomy here in Spain, you understand?
Okay, so the big part of this,
I don't know if you hear about the problem of when you use AI agents or you use things like chatbots or LLMs.
People say, OK, very well.
The project worked well.
But when I connect my models with my database,
The model, when they respond to their audience, they have personal data.
For example, personal data that you don't want that the public see.
So what is the solution?
1There is something we call gradual.
So here, you know this part, I call it security graduals.
The graduals is the system we put on all AI agents to tell them, OK,
You can send any kind of response you want to the audience.
But this data, this is only data, just personal names or emails or phone numbers.
If in your response you have this kind of data, you can't send the response.
You just stop, okay?
So let me check, and I finish with that.
I just want to show you how the graders work.
I will put a little legend, for example, send an email with the name for John Smith.
I configure in my system that if you have a personal name, don't send the email, OK?
So we go to test the graduals, give them a little time, and we'll see how the process works in the trace.
It takes a little bit of minutes.
Okay, this is the gradual test.
Let's see the message here.
Oh, the message doesn't come yet.
It's still loading.
If someone know how to sing, can sing right now.
It's the moment.
Okay.
So, now we'll see how the system stop the sending of the message automatically.
I hope it's going OK.
OK.
I have one minute less.
So OK.
Gradually activated.
Personal name detected in the message.
The system automatically detects the personal data.
If we go to the trace, we'll see this here.
You see this alert.
OK, personal data detected.
Don't send the email.
So this is the Warren Buffett style.
So thank you very much.