Now, one thing we're expecting is we're expecting it to have an error initially because we haven't
yet properly configured that that that chat input.
Uh, but still we should be ready pretty much to at least see that happening.
So let's go back into N810.
Here we are.
And make sure we we come here and we press Execute workflow so that this is up and running and waiting
for us.
We expect this will throw an error.
Now we'll come back into 11 labs and we're going to come back to our agent, which is now equipped with
this tool.
And we're going to give it a try.
Uh, let's uh let's see, uh, we're going to press preview.
Up it comes and we're now going to call our agent.
Here we go.
Hello.
How can I help you today?
Hello.
I'd like to know how many, uh, shares of spy I have in my portfolio.
I'm sorry.
I was unable to retrieve the number of spy shares you hold.
Is there anything else I can help you with regarding your equity portfolio.
Okay, let's stop it there.
Let's go over to to Nan and see what happened.
There was indeed so.
So first up.
First up.
Wow.
It did call.
We weren't even watching it.
And it came in and it called the webhook.
And then something went wrong.
And we know exactly what went wrong.
What went wrong is that we were thinking it was like a chat trigger node and it wasn't.
It was this stuff here.
So what we really want to do is get this question here.
Body question how many shares of Spy do I have in my portfolio?
Do you see the way it's filled in the field that we described in 11 labs?
Remember we described that the body of the question needed needed the body of the of the post, of the
of the webhook needed to contain a field called question with a question.
So we need this input to point to there.
So we simply select define below just like before.
And now we can just drag and drop from here.
You can probably now already fill in that.
That is going to be the JSON is the expression is going to be JSON dot body dot question.
We want the body of this and we want to collect the question.
And there is the question okay.
And now we go back here again.
And now we press execute Workflow again.
And we will try this one more time okay.
Over here we go.
And now we're going to press preview.
And let's try this.
Hello.
How can I help you today.
Hello.
How many shares of spy do I have in my portfolio?
Let me check your portfolio for you.
You have two shares of Spy in your portfolio.
That's great.
Thank you.
So there you have it.
I feel the need to thank it.
Uh, success wasn't that cool.
And, of course, what you saw, even though there still is.
The latency isn't perfect and there's more that can be done there, but it's pretty impressive and certainly
compared to the prior approach.
And whilst I called this more complicated, it was actually pretty simple.
We've got this thing running fast and it was super cool.
And if you go over here you can see everything ran lots of ticks.
Of course, I hardly need to tell you that this webhook was called by 11 labs and everything ran successfully.
So let's talk through the round trip of what actually happened as a way to kind of revise what this
is all about, because it was quite simple to build this, but there's a lot of moving parts behind
the scenes.
The complexity is in what actually happened.
We start our journey in 11 labs where we set up an agent.
Just saying, you're a helpful assistant and using Russell as our agent.
And and then we equipped Russell with a tool.
And that tool was there's some tools that we could have used like an end conversation tool, a skip
turn tool.
We didn't use that.
We set up a new tool, which was a webhook tool, which means this is a tool that's able to call out
to the internet, to a webhook that you give it.
And here's how we set it up.
We gave it a webhook.
We gave it one that we'd taken from N810.
We gave it a webhook.
That means it can submit a request to N810 to do some processing, and we use a webhook.
We use the method of post, which means that we can post a body of JSON to to this endpoint.
Um, and look, I didn't save after I changed this, I don't think.
Let me just move.
This should have been a bit longer or we risk some sort of timeout.
Always remember to press the save button here.
It's easy to miss that.
Uh, you probably saw me doing that and were asking me.
Uh, okay, so we do that, we call this post.
And in the description we can specify to the LM, we need you to provide some information and that will
be sent in the post message in the body of it.
And we said, hey, we want you to fill in a field called question.
We want it to be the specific question about the users equity portfolio that the specialist should answer.
And so our LLM did that.
It populated that question and that got sent to Nan.
And that's where we pick up the tail in and end the webhook gets called.
This is the same URL that gets called that then passes it to the AI agent.
It doesn't look for some chat information.
No, it looks for JSON, which is exactly where the question comes in right there.
That then goes to Gemini in the usual way.
It also uses a tool.
The tool it uses is one to look up in Google Sheets.
And then that goes into a respond to webhook, which just takes all of this JSON and sends it back.
Back to Russell, who is waiting for us over here and comes back as this tool.
And Russell.
The agent then responds, wow, take a breath.
There's a lot of moving parts, even though it looks so simple and the result is a lower latency, faster,
more responsive approach, which has the combination of the best functionality from both 11 labs and
from Nln.
And if you try this yourself, you probably noticed that if you try to ask a follow on question, then
you fail miserably.
And that's because we're using the test version, which only executes workflows once at a time.
Surely it's time for us to publish the production version.
To do that, we want to grab this production webhook URL.
We come here.
We'll save it and we'll press the publish button.
So this gets published out there.
How exciting.
Workflow is published.
Got it.
And now we want to come back to 11 labs.
We want to come into our tool.
We want to come into this tool.
We need to go to this URL and change it for the production URL.
Don't forget to press save and you always forget to press save.
There we go.
I didn't, and now it's time for us to test our production agent.
And of course we should start by publishing it here as well.
We also want to publish Live our agent on on this side to uh, so that is, uh, and we'll do a copy
shareable link.
Uh, so we have now published both we've published and and live and we've published 11 labs live.
And it's time for us to try this out.
I can open a new tab, I can paste in the shareable link.
This is my published AI agent Russell on the internet.
Let's give it a try.
Hello.
How can I help you today?
Hello.
I'm interested in how many shares of spy I have in my portfolio.
Let me quickly check your portfolio for the number of spy shares you hold.
Do you currently have two shares of Spy in your portfolio?
Is there anything else I can help you with regarding your investments?
Yeah.
What what other stocks do I have in my portfolio apart from Spy?
Let me check what other stocks you have in your portfolio.
Besides Spy, your portfolio includes B and D, BMD, which is the Vanguard Total Bond Market ETF,
the iShares Core Allocation ETF, and the iShares Core Aggressive Allocation ETF.
Do you have any questions about these holdings?
No thanks.
There we have it.
Well, everything ran nicely.
That was us running in production with multiple questions between 11 labs and nt.m.
The end to end flow.
The second approach working perfectly with both 11 labs and deployed to production.
Well, you remember I told you that today was going to be both challenging and satisfying?
I think I delivered on both.
It was a bit.
It was a little bit fiddly from time to time.
Uh, especially when we were configuring that, that request.
Uh, again, don't worry if you if that was too much, we're going to do more of that.
And also remember ChatGPT is so good with that kind of thing.
This this is boilerplate stuff.
So if you want help configuring a webhook, a tool like that, you can just describe it.
You'll get step by step instructions so easily.
Most important is that you get the gist of what we're doing.
The basic building blocks.
And essentially we've discovered that the best way to integrate 11 labs with N810 in order to build
an interactive voice agent with relatively low latency.
It's still not perfect, but it's much better.
The right way to do it is to have 11 labs be the boss.
Use the voice agents in 11 labs, give it a tool, and let it use that tool to call into our business
logic running in Nan, which is what Nan is so, so great at.
Okay.
And that concludes week two.
Day two integrating 11 labs and N810.
That's that's a wrap.
And that means that you are now at the 47% point about to cross the halfway mark.
Tomorrow is going to be a whole new topic.
Can't wait to see you then.