Okay, now I press the plus button here by tool, and I'm going to search for sheets and open the Google
Sheets tool like so.
Here it is.
This is how we give our LLM the ability to access a Google Sheet.
So it starts by saying credential to connect with.
We're going to say create new credential.
And this is where we're going to hook up our n810 running the cloud with our Google Sheets.
And this is something which could be really really challenging.
Sometimes some of the integrations we do this step is going to be challenging.
In the case of Google Sheets in particular, it's actually really simple.
There's just a sign in with Google button right here and ignore any of this stuff.
Just press the sign in with Google button.
If you're doing this on the self-hosted version, it's a bit more involved.
But for now, we're just going to press this sign in with Google button, and up comes like a Google
auth screen like this.
And I'm just going to press my Google auth like so I'm going to say continue and connection successful
appears.
I'm going to close this down.
And there's a green box that says Account connected.
Come on.
It could be much simpler than that.
We are connected and cloud is connected to our Google Sheet.
Well, it's connected to our Google Sheets for our account.
We haven't connected it to a specific sheet yet.
All right.
So now press the X button here to come back to this screen.
So this is now saying it's connected.
The tool description will leave it set automatically.
The resource we're going to say sheet within a document.
Operations for this one is going to be like get rows.
And now we choose the document and the sheet from this drop down uh, of of all of the Google Docs,
uh, that it has access to all of the sheets.
So I've just selected portfolio from, from this list right here, which is the one that we just created.
And now the sheet there only is one sheet in here I'm selecting sheet one.
And here it is.
And there's there's ability to add filters and things.
But we're going to leave all of that as it is.
Um and so this is our tool that is is available now.
So we now go back to this screen we've got.
We've got this.
We'll clear this chat and we're going to have a quick chat with our sheet.
Okay.
So I'm going to clear the chat.
Let's let's say uh hi there.
All right.
It's thinking about that.
Hello.
How can I assist you today.
All right I'm going to say please describe the sheet that you have access to read.
We'll see what it tells us.
It's going to connect hopefully to Google Sheets.
And it's doing some stuff.
And it's saying the sheet contains stock information with the following columns and data ticker quantity
price.
And then it says Google quantity three.
Apple quantity two Tesla quantity three.
There we have it.
We have successfully connected our Naa10 agent to a Google sheet.
And it took minutes, maybe even seconds if you were following along fast if you sped me up.
All right.
Now let's make it do something.
I'm sure you can guess what we're gonna do.
I'm going to move this over here.
I'm going to add in another tool.
The tool I'm going to add is called Market Stack.
Remember that we did that yesterday.
Select that.
Now we're getting faster at this point.
You know what we're doing.
We've got the credential right here.
We're going to say uh the tool description is automatic resources.
End of day data.
The operations get many.
The ticker is to be set by the model.
You click that purple button.
Uh, we will say um, that we want to add a filter, the latest turn that on.
And that I believe is all we need for getting stock data.
Now we're going to add another tool.
Let's just rearrange this a little bit.
Let's put that there.
Let's move the market data there.
Let's press the plus button.
That's just to tidy up.
It doesn't matter.
And now we're going to go and have another sheet a Google Sheets tool.
This time it's going to be a resource.
It's going to be sheets.
The operation is not going to be get row.
It's going to be update row.
Uh okay.
Uh let's select the document.
And so I just gone to this from list and I chose the portfolio document, which is the sheet that we
want to update.
The sheet itself we're going to choose will of course be sheet one.
Okay.
This is important.
This is when we tell what is it that we want to update in this sheet.
And it knows about the the columns in our table.
Let's read the sheet.
And it sees it's got a ticker a quantity and a price.
And the first thing we say is what column do we want to match on.
So when it's picking what row to update, which column should it use to decide which is the row that
I care about.
And we want it to do it based on the ticker.
We want to be able to our our LLM to say, I want to update Google's stock price based on the Google
ticker.
So that's the column to match on.
And now in terms of the values to get updated, the actual fields that the LLM can specify, we don't
care about quantity.
I'm removing that.
We want it to be able to to specify a ticker and a price.
The ticker is the one that gets matched.
The price is what it changes the price to.
So I press this button here to say the model gets to define what ticker, and the model gets to define
what price to set.
And this has now defined what we want this tool to do.
We want this tool to match on a ticker, to specify the ticker and to specify the price.
And that price will be updated.
So hopefully this makes this makes sense to you.
This is how you go about telling Nan that the purpose of this tool is to be able to match on a ticker,
set a price.
We're done.
We've created our update row.
It looks a little bit messy.
Let's move that over there.
So now we have three tools.
We've got one that gets a row.
We've got one that gets market data, and we've got one that updates the row in the sheet.
Okay.
What I'm now going to do is I'm going to switch over to my portfolio as we have it right here.
And I'm just going to detach this window like that and then just shrink it over and put it over here
so we can, we can just keep an eye on the spreadsheet over here, the Google sheet.
And I'm going to come back here, uh, to this screen, go back to our integrations, and I'm gonna
move this cunningly over like this so we can be looking at our chats here, but also keeping a healthy
eye over on the right at our Google Sheets.
All right.
And now I'm going to say hi there.
Okay.
It says hello.
How may I assist you today I'm going to say please update the prices in my, uh, equity portfolio sheet
to reflect the latest market prices.
There's my instruction.
Off it goes.
Things happen.
Keep your eye on the right.
Keep an eye on the right hand side of the screen, please.
Things are happening.
Stuff is going on.
Messages are spinning.
Bam!
You see that?
The Tesla price just appeared.
Apple price just appeared.
Google price just appeared.
It all happened.
Workflow executed successfully.
We just saw an agent in action, reading a sheet, collecting market data, writing the prices to our
Google Sheet.
Wasn't that fabulous?
So what I love about this example is it feels so tangible to be able to see the stock prices change
like that as we as we run it and see the spreadsheet changing.
So it's really, really cool.
What I want you to do now, though, is just dig in a bit more into these tools themselves to get a
better sense for what was going on.
And what do I mean by that?
Well, you can double click on a tool like this update tool.
You double click on it and it comes up with the details.
And we already set this part here so we know it well.
But let me show you what's on the left and the right.
This is showing you the inputs and outputs.
When this tool was actually called a moment ago and it was called three times.
And you can tell because there's this drop down here run where there's one, two and three out of three.
And if you pick something like two, then it updates on the left and the right to show you the inputs
and outputs.
The second time this tool was called and the inputs are shown in this this stuff on the left, which
is in fact you're seeing JSON here.
And some of you probably know JSON very well, but for those that don't, you will get comfortable with
this.
This is just a way of showing structured data like this.
Um, and as it happens, anytime you see JSON like this, you can choose to either see it as JSON or
say, hey, I don't want to see it as JSON, I just want to see it in a normal table.
I'm more comfortable with tables, or you can see it in something called schema when you see the sort
of structure of the data.
But we're going to stick with JSON for now.
You can see that this tool was called to update a row.
It was saying please use this ticker to match Apple.
And this is the thing to update the row with.
And that's why on the right you can see we got back an output showing that that ticker was updated with
that price.
And you can flip between the three tool calls to see that it was updating each of the stock prices in
that table.
It all did just what we were expecting.
And now I'm going to press escape click and press escape.
And I'm going to show you the the Market Stack tool.
Here it is.
It was also called three times, shockingly, and it was called three times because it was called for
the ticker Google.
It was called for the ticker Apple, and it was called for the ticker Tesla.
And over here on the right you can see what came back.
And again you can see it in the form of JSON like this, this long bit of structured data or in a table
format.
And we'll see that there is an open high and low that came back for Tesla's price.
And we can also flip that to to Apple and flip it to Google.
And you're seeing over on the right what came back when the tool was called.
And then press escape or click and press escape.
And then let's go and look at this tool.
Was this one called three times?
No, it was not.
This was only called once.
This was called once.
And it was just just just called with no inputs particularly.
And what came back was the the table itself.
I've got it selected on the table version.
This is it in JSON style.
You can see the JSON structure.
It has this very recognizable look to it.
We can look at it in a table form.
And what came back is basically the table itself.
The Excel spreadsheet had come back, but it came back in the form of JSON.
It came back showing that we had three rows Google, Apple, Tesla and that these were the quantities,
but the price was empty, which was before our our LLM decided to set the price.
So this shows you the three tool calls.
And I want you now to go in, dig in, have a look at this.
Get a sense of what was called.
Look at the JSON.
Look at the table.
Start to get more familiar with this build up a little bit of experience with this and you should also
take this project in a new direction.
Add another column, add some more information.
Try try maybe adding the highs and the lows or whatever.
Uh, figure out what more information you could get the LLM to set in that table and enjoy it.
Watch it updating while you watch.
It's such a spooky experience.
Uh, and get a good sense of what it's like to use an AI agent that's hooked up to Google Sheets.