Okay, so click here to rename this old one.
Let's, let's let's give it something a name like Nan orchestrates.
And then save that and then go back here again.
And let's create a new brand new workflow.
We're going to start with a little workflow here.
And then and then we're going to go and look over at 11 labs okay.
So for this workflow how do you think it's going to start.
What's the trigger.
What's going to be the first step.
The trigger of course is going to be a webhook, because we're going to want this to be summoned by
11 labs driving us.
So so for sure the trigger will be some kind of a webhook.
And as before, it's going to be post because it's pushing in information and we're going to want to
respond with a respond to webhook node.
So this this is going to be the starting point for us.
So what do we want that to go into.
We want that to go into one of our, uh, good old AI agents and uh, let's let's give ourselves an
AI agent.
Here it is.
This isn't going to work.
We know that.
We're going to come back and figure out what that needs to be later.
Chat model.
We're going to use Gemini again.
You can use anything you want, but but Gemini is the one I'm going to use for a bit.
And again we want to use the latest and greatest, which is going to be Gemini three preview for me,
and it might be Gemini three preview.
I want to use not Pro preview, but I'm going to have to type it in.
I can't find it.
Models.
Slash Gemini Dash three.
Dash.
Flash.
Preview.
There it is.
And there we have it.
Okay, uh, that is our, uh, chat model.
Um, we're not going to have any memory because this isn't the real chat.
This is being used to do some action.
And so what what action are we going to have our agent do?
Well, I tell you what.
Why don't we go with an old chestnut?
We're going to use a tool here.
And we're going to use an old friend Google Sheets tool.
Let's use Google Sheets because we know it well.
We don't want to get stuck on another integration right now.
Uh, and uh, we might as well go with our stock portfolio since we have that sheet all set up and we
will use this particular flow is going to be able to look up, uh, how much of some stock we have in
our portfolio.
So let's configure it for that okay.
And so I just one thing I'm going to do I'm actually going to change the tool description I'm going
to say set manually.
And I'm going to say use this tool to retrieve the uh equity portfolio of the user to answer questions
about their holdings.
Okay.
Very good.
Uh, and now let's go back and give this a whirl.
So in order to give it a whirl, we're going to have to, to temporarily use a chat.
So let's, let's, uh, let's turn the power of this thing off.
Let's add a new trigger.
Let's have a trigger which is going to be, um, a, uh, so I click down at the bottom there to, to
to add another trigger, and we're going to have this be on chat message.
So let's see our chat.
Uh, and uh when a chat message is received that's going to go in here as well.
You can have multiple.
This one is switched off.
And now we'll open up this chat and we will say hi there.
And we'll add in memory.
Why not just temporarily.
Simple memory.
Hi there.
Check.
It works.
Hi.
How can I help you?
If you'd like to check out your equity portfolio.
Uh, yes.
How many SPI do I hold off?
It goes, off it goes.
Check.
Everything works.
I currently hold two shares of SPI.
Excellent.
All right.
This is working, we can now safely delete this chat node right here.
We can re-activate this one here by pressing the power button again.
And it comes back on again.
And we can also remove the memory.
We don't care about memory since this is going to be used in a workflow.
Uh delete this.
Uh, there we go.
And we've now tested it.
We know that we can use this to collect, uh, we, uh, we're almost ready.
Almost ready to go to 11, lads.
One more thing to do.
What is that?
What's the one more thing to do?
Okay, we need to add in something which is going to make sure that it replies to that webhook with
whatever the the output of the agent is.
So we press the plus button and it's respond to webhook is the name of the node we want to put it in
there and we can say respond with the first incoming item.
So respond with this which is going to give it JSON, which is going to say you currently hold two shares
of Spy.
That seems perfect I think.
So We'll, uh, we'll leave it there.
That seems good.
We just need to make sure that I correctly set this up to using respond to webhook node, which I did,
and this should now be almost perfect.
The missing thing is that if we look here, we've still got this same connected chat trigger node.
So when we first run this, it's going to fail.
We're going to have to come in and fix this, which we will do.
But first we go over to 11 labs and get this show on the road.
So here we are back in 11 labs.
We're still over in the developers section.
Now we want to go back to the agents world.
We're back to creating an agent in 11 labs, because we're going to have a workflow in 11 labs and in
Nan.
And so I'm going to press the new agent button, and we're going to go with a blank agent, and we will
call it our na n agent.
And we'll say create agent.
And here it is.
And uh, the system prompt can be you are a helpful assistant.
Uh, we can We can have, uh, Eric be our person.
Oh, do we want Eric?
Let's have a look at who we've got.
We should pick different people from time to time.
We've had Jason.
We've had, uh.
Um, maybe we should try Russell this time.
Uh, let's go with Russell.
Uh, okay.
And we've got more options.
Should we wish them.
Um, okay.
And now we're going to go to the section that we I told you we would get to eventually, which is tools.
Okay.
So go to tools.
Here we go I'm going to press Add Tool.
We want to add a new tool.
And the tool we're going to add is going to be a webhook tool.
So uh describe the LM how and when to use the tool.
So the name of the tool is going to be uh question tool.
Oh that's not very clear.
Let's make it a equity portfolio question tool description.
Use this tool to ask uh, any question about the users?
What about the users equity portfolio to a specialist assistant who should be able to answer?
Okay, so the method I think we picked was was post, uh, which means we're going to be posting in
some information because we have a question now it needs the URL.
So let's go back to our workflow.
Click on the webhook.
Take the this test URL.
You see there that the method is post could be post or get, but it's post back to 11 labs paste in
the URL.
So you see that's the URL that's been set up in the other system.
And we're using that so we can call it's webhook.
We can call and it ends webhook.
There's a timeout time.
Let's turn that up because we know it's an assistant.
So it might take longer.
We'll give it 60s to timeout.
Uh and We are going to, um look at this.
This is interesting pre tool speech force the agent speech before tool execution or let it decide automatically
based on recent.
Let's let's force it to say say something so that it doesn't feel like there's dead air.
Uh, okay.
Now this is where where things get interesting when you do a post, uh, API call.
And we will have more on this in due course.
But when you have a post, it means that you can pass in a body stuff that you're posting.
And this gives us an opportunity to specify some information that we want to send down with it.
And this is where we're going to pass in the actual question that the agent is going to ask and enter
research.
Okay.
So first up in this body section we need to explain to the LM what information is it sending to N810.
And so what we would need to say here is that this is where you describe this.
This is this contains a description of the question to ask the equity.
Portfolio specialist.
Okay.
And now there's going to be one field.
It's going to be a type string.
It's just text.
The identifier is going to be just the word question.
And the description here is going to be the specific question about the users equity portfolio for the
specialist to answer.
Now I'm being a little bit pedantic here.
You can get away with this being much simpler and just understand that this this is how the tool will
be described to the LMS.
So it knows it has to specify this information.
And this will be then used to make a web request to n810.
That's how it's going to work.
So I think we've done all we need to do here.
And we can just press add tool.
Oh the function that you're not allowed spaces in here.
Haha.
Uh let's change that.
Because it's got to.
It's like a function name.
Okay.
So I think now we should be good.
Yes.
Okay.
Equity portfolio question tool.
So let's recap.
What we've done is in 11 labs we've added a tool a tool that our agent is able to use.
And we've described that tool.
And we know that what that tool will actually do is make a web request to a webhook for N810.
That's what the tool will do.
We've configured it to point it to the endpoint that we took from N810.
That's that's where it will point to.
And we've used natural language to describe how to, to make this web request so that the LLM can fill
in the fields to pass in its question for N810.
We're pretty much ready to roll.