Build-Time vs. Run-Time: Why Dev Tools Fail in Production — Averi Kitsch & Prerna Kakkar, Google
Read the talk
Build-Time vs. Run-Time: Designing Database Tools for Production Agents
Averi Kitsch and Prerna Kakkar explain why flexible developer tools need human supervision, then show how fixed SQL, restricted database access and trusted identity parameters narrow what a production agent can do.
From a talk by Averi Kitsch and Prerna Kakkar
At a glance
Ideas worth remembering
Flexible administrative and NL2SQL tools serve human-supervised development. Production tools should expose predefined business operations, with fixed SQL and configured parameters.
A confused deputy can use legitimate database privileges for an unauthorized request. The triage example shows malicious ticket content directing salary retrieval and publication back to the requester.
Tool hardening removes different kinds of authority in layers: connection details leave the agent's inputs, source restrictions narrow database access, and custom prepared statements remove arbitrary SQL generation.
Fixed SQL still needs trusted identity inputs. Application-bound or authenticated parameters keep user identity outside model control while allowing ordinary task inputs, such as date, to vary.
Outcome-focused tools, useful descriptions, separate reads and writes, actionable errors and flat inputs make agent behavior easier to guide. The recording explains the intended protections, but its runtime demo did not load and it supplies no evaluation results.
Two ways to serve database tools
Averi Kitsch and Prerna Kakkar open with a practical distinction: tools that help developers build an application have different responsibilities from tools that act inside an application for end users. Their work spans MCP Toolbox for databases and Eval Bench, an evaluation framework for agents, MCP and skills. The presentation moves from database tool patterns to production access and identity-aware safeguards.
MCP Toolbox is presented as an open-source, self-managed database MCP server with configurable behavior, connection pooling and observability provided out of the box. Google managed MCP supplies a hosted alternative for teams that want managed scaling and connections to agent harnesses. The speakers also describe governance, discovery and Model Armor as parts of the managed offering. These services provide the infrastructure for tool access; the remainder of the talk examines what authority those tools should expose.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Administration and exploratory SQL
The first database pattern is the control-plane tool: an administrative operation that creates or manages instances and databases. These tools address database administration needs through existing public APIs, which can provide monitoring alongside the operation. Their usefulness comes with substantial authority. The speakers place them in developer assistance and require a human in the loop because an administrative action can damage the resources being managed.
The second pattern is natural language to SQL, or NL2SQL. An agent generates raw SQL and passes it to an execute SQL tool. This supports questions whose query structure cannot be specified beforehand, particularly developer exploration and analytical work. The example asks for customers in California who bought a winter coat in July, returned it within 14 days, and should be grouped by the marketing campaign that originally acquired them. The question combines customer location, purchasing, returns and acquisition information; allowing the agent to construct the query supplies the flexibility needed to express that combination.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Production tools fix the operation in advance
Structured SQL tools target production use cases where the application already knows which query should run. The developer defines the logic and configures the parameters, restricting the agent to that operation. The speakers associate this approach with protection against SQL injection, more controlled access, lower latency and less opportunity for the agent to invent query logic. The tradeoff is deliberate: the application gives up arbitrary query generation to gain a predictable database operation.
Here, build time means developer assistance rather than a compilation phase. Control-plane tools and NL2SQL belong in that category because they expose flexible operations under human supervision. Run time means an end-user application, such as a chatbot, whose tools carry out defined business actions. A cancel order tool illustrates the latter: the agent invokes a deterministic structured SQL operation instead of deciding how to implement cancellation through arbitrary database commands.
A destructive example makes the boundary concrete. After encountering an error, an agent using a build-time tool requested that a table be deleted so it could start fresh. The speakers report that everything was deleted and no safeguard prevented it. The recording does not establish the underlying error or the exact SQL involved, but the failure is clear: an agent's proposed recovery action reached destructive database authority without an intervening constraint.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
A travel chatbot and an identity test
The intended runtime demonstration is a travel chatbot that can help book flights to San Francisco, change flights and find shops. Prerna describes an identity test in which she tells the agent that she is Averi and asks it to book a flight. The expected behavior is to act for the authenticated user rather than accept the identity asserted in conversation. Authentication is meant to establish whose account the tool operates on, while the conversational request supplies the desired action.
The demo fails to load, and the speakers continue from the slide deck. Consequently, the chatbot's resistance to impersonation is described verbally rather than demonstrated successfully in this recording. The presentation proceeds to explain the security mechanisms intended to produce that behavior.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
How a privileged agent can leak data
The security argument begins with the observation that an agent can be tricked into misusing its privileges. In a confused deputy attack, a user directs a more privileged agent to access data that the user should not receive. The speakers describe the lethal trifecta as simultaneous access to private data, untrusted content and a channel that can expose the data to an external user. Together, these capabilities create a path for a breach; the example that follows shows how malicious content can activate that path.
Consider a triage agent that reads a ticket or alert and investigates a database. A malicious insider changes the ticket to request all employees' salaries from the salary database and asks for the results to be posted back on the ticket. The agent treats the request as legitimate because it arrived through the system it normally uses for work. It queries the salaries with its own permissions and publishes them where the requester can read them. The database access succeeds, yet the overall action violates the user's intended access boundary. The trusted ticketing system has carried untrusted instructions into a privileged workflow.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Separate identities and control over parameters
The speakers compare agent applications with conventional applications that expose a few input fields and insert their values into predefined queries. In that conventional design, application code determines the actions, making broader application access easier to reason about. An agent introduces dynamically chosen behavior, so the design must distinguish user identity, application identity and agent identity. The user needs access to the application. The application's workload identity may need broader access to communicate with several services. The agent inside it should have access only to the data the end user needs.
Tool inputs require a corresponding separation. Agent parameters are values the model derives dynamically and should be treated as untrusted. Application parameters represent factual constraints that must remain outside the agent's control. A tool can therefore accept some conversationally derived values without giving the model authority over every value involved in execution. The important design question is who supplies each parameter and whether the agent is allowed to change it.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Move connection authority out of the agent
The tool-hardening sequence starts with a fully model-controlled tool. The agent has database credentials, host, port, connection details and raw SQL, effectively giving it superuser authority. Tricking it into exposing those details can expose the databases those credentials reach. Toolbox introduces a source primitive to remove connection configuration from the model's control. An operator configures the connection details in YAML, and the MCP server receives them at startup. The agent no longer needs those details as tool inputs.
Source configuration can also constrain operations. For a read-only user journey, the speakers recommend removing write tools and enforcing read-only queries down at the database driver. The lower-level restriction matters because the desired guarantee is about what can execute, beyond which tools are advertised. Some cloud-native databases also support allowed datasets, which can be configured at the source to narrow the databases or tables within the agent's reach. That capability is described for some databases rather than as a universal feature.
Output size adds another limit on the blast radius. Capping how much data the agent can retrieve reduces the amount exposed by a harmful retrieval and helps avoid overwhelming the agent or database. It limits the scale of an operation rather than establishing whether its contents are authorized. After these source restrictions, the tool signature is much smaller, but it still accepts a SQL string generated by the agent. Connection control and retrieval limits have narrowed authority while leaving query selection open.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Fix SQL and validate parameter types
The next step removes arbitrary SQL generation. Toolbox custom tools define the exact SQL statement in YAML, placing the query under developer control. The agent chooses and invokes the tool rather than composing whatever SQL it can imagine. Custom names and descriptions provide context for when and how the operation should be used, connecting a database statement to an intelligible application action.
The implementation uses prepared statements with typed parameters and validates input types before supplying values to the SQL operation. This preserves a predefined statement while allowing its parameter values to vary, reducing opportunities for SQL injection. The mechanism controls the query's structure and input types; deciding which trusted values belong in those parameters remains a separate concern.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Make tools easy to choose and recover with
Tool quality begins with outcomes. The speakers recommend designing a tool around what an action needs to accomplish instead of exposing every atomic REST API operation separately. An outcome-focused tool can reduce the round trips required to complete a task. Its description should guide accurate use rather than repeat input parameters already visible in the tool schema. The name, description and inputs together should make the operation understandable to the agent.
Read and write operations should have separate tools. This lets an application approve reads automatically while sending writes to the user for confirmation. The separation makes the approval decision clearer because the tool itself identifies whether an invocation can change state.
Errors should also communicate an available next action. A generic HTTP 404 provides little recovery guidance, whereas an error that indicates a retry is possible gives the agent something useful to do. Finally, inputs should use simple, flat structures. Requiring the agent to construct complex maps or elaborate values creates more opportunities for unreliable tool calls; a small set of straightforward inputs makes the invocation easier to produce correctly.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Bind identity without asking the model to supply it
The lookup flights example now uses a custom semantic tool with specific inputs, initially including user ID and date. The agent no longer generates SQL, but a sensitive input remains under its control: the user ID. Fixing the query therefore does not finish the security design. If identity is still an agent-supplied parameter, the tool has not yet removed the model's ability to choose whose records the operation targets.
The first solution is to bind the parameter through the application. The application authenticates the user and supplies the identity directly to the tool. The agent neither sees that user identity nor controls its value. This allows a request-derived input such as a date to remain dynamic while the authenticated account stays fixed by application logic.
Toolbox also offers authenticated parameters. The tool is configured to receive an identity token, validate it when called, and extract user claims from it. The examples of claims include user ID, email and issuer. Those claims supply the tool's identity parameter outside the agent's control. The essential sequence is validation followed by claim extraction and binding: the model's conversational assertion of identity does not supply the trusted value.
At the end of this progression, the agent-facing lookup flights tool needs only an easy input such as date. It does not have to handle sensitive user identity information. The speakers describe this as a zero trust architecture in which the system controls the values that need trusted control. The concrete achievement is a narrower interface: the model can vary an ordinary task input while identity is supplied through an authenticated path.
The closing remarks highlight Eval Bench as the framework the speakers use to determine whether their tools work well, alongside the Toolbox documentation and repository. Evaluation completes the talk's design discussion, although the closing provides no test cases, measurements or results from which to assess these tools' effectiveness independently.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Read the complete timestamped transcript
- 0:01
[music]
- 0:12
Hey everyone, how all of you are doing
- 0:15
today?
- 0:17
Yeah. Uh so nice to meet you everyone.
- 0:20
Uh today uh I and my friend Avery are
- 0:24
going to talk about build time versus
- 0:25
runtime. Why your developer tools fail
- 0:28
in production.
- 0:30
So firstly, know about us.
- 0:33
>> Hi everybody. I'm Avery Kit and I'm a
- 0:36
staff software engineer working on
- 0:37
Google Cloud databases. I'm currently
- 0:40
the technical lead for MCP toolbox for
- 0:42
databases, our open-source uh database
- 0:45
MCP server and our Google Cloud MCP
- 0:48
server um maintainer.
- 0:51
Hi, I'm Pna and I am currently working
- 0:53
as senior software engineer at Google
- 0:56
and I am currently tech lead for Eval
- 0:59
bench which is the evaluation framework
- 1:01
for all your agent tech MCP and skills
- 1:03
need and I'm also an active contributor
- 1:06
to MCP toolbox.
- 1:09
So today we are going to cover three
- 1:11
areas broadly. We will firstly start
- 1:13
with the history of MCP at Google. Then
- 1:17
we will cover on the common tool
- 1:18
patterns that we have found from our own
- 1:21
work and practices and how did we use
- 1:24
all those practices to build some tools
- 1:26
for database access and how you can use
- 1:28
them and then lastly we will talk about
- 1:31
security guard rails how you can stop
- 1:34
data leaks using identity aware
- 1:36
guardrails.
- 1:38
So let's get to know the background
- 1:41
quickly. Um I'll talk about MCB toolbox
- 1:44
for database. It's an open-source
- 1:47
self-managed uh serving that we provide.
- 1:50
Uh it has currently about 15.7K GitHub
- 1:54
stars. We have 132 plus active
- 1:56
contributors across 40 plus different
- 1:58
databases. It's highly customizable
- 2:01
framework and basically we provide you
- 2:04
with connection pooling integrated O and
- 2:07
you don't even need to care about the
- 2:08
observability. You will get all of them
- 2:10
out of the box.
- 2:12
Then if you don't want to do a
- 2:14
self-managed one but you want to have a
- 2:17
hosted scaled version, we provide
- 2:20
something as Google managed MCP. It's
- 2:23
fully managed. Uh you can plug it across
- 2:26
various agents and ids or harnesses like
- 2:29
Gemini CLI, anti-gravity CLI, cloud
- 2:32
code, you name any. uh it's co uh it's
- 2:36
governed and the discovery is simple and
- 2:39
we also provide model armor which
- 2:42
provides secure access management and
- 2:44
identity control. So combined with uh
- 2:48
the managed version of MCP and the MCP
- 2:51
toolbox last month we had 20 million
- 2:53
tool calls.
- 2:56
Um some of the common tool patterns that
- 2:59
we have observed specifically for
- 3:00
databases. So I'm going to quickly talk
- 3:02
about them.
- 3:04
Firstly uh is the control plane tools.
- 3:07
What we like to call them is admin tools
- 3:09
or manage tools. It is basically in
- 3:12
developer assistance space. So it will
- 3:14
help you create like instance, manage
- 3:17
your instance, create your databases,
- 3:20
manage your databases. It will help you
- 3:22
with all your DBA needs. But you need to
- 3:25
be very careful. You need to be you need
- 3:28
to have a human in the loop because we
- 3:30
don't want to carry out any dangerous
- 3:32
activities.
- 3:34
Um so these tools are built on already
- 3:37
provisioned public API so you get
- 3:39
monitoring and other things out of the
- 3:41
box.
- 3:44
Next one is natural language to SQL or
- 3:46
NL2SQL tools. So basically we are
- 3:49
relying on a tool called as execute SQL
- 3:52
and with the help of agent we generate
- 3:54
raw SQL queries. So you can use this
- 3:57
cases where you don't know uh what
- 3:59
queries you would require beforehand. So
- 4:01
you will get all these queries out of
- 4:04
the out of the box. So it it focuses on
- 4:08
the developer assistance and analytical
- 4:10
agents and uh you can use it for
- 4:12
flexible explorations. So for example,
- 4:15
we have one of the examples like find
- 4:17
all customers in California who bought a
- 4:20
winter coat in July and returned it
- 4:22
within 14 days and group them by the
- 4:25
marketing campaign that originally
- 4:28
acquired them. So this is one of the
- 4:30
queries where uh you can use this tool
- 4:32
uh to get your answers.
- 4:37
But then we have something called a
- 4:39
structure SQL tools which is getting
- 4:41
quite popular and this targets mainly
- 4:43
the production use cases where you know
- 4:46
like what SQL query you want to use and
- 4:48
you want to have security built in and
- 4:51
uh you the parameters are already
- 4:54
configured so uh you prevent SQL
- 4:56
injection
- 4:58
and ensure highly controlled access by
- 5:00
restricting agent to predefined logic.
- 5:03
It also helps you with your latency
- 5:05
needs and reduce the hallucination on
- 5:07
the agent side.
- 5:10
Now we come to the main topic I guess
- 5:13
for which you guys are here for
- 5:15
buildtime versus runtime. So buildtime
- 5:17
are the developer assistant use cases.
- 5:20
Um you can think about the initial two
- 5:22
cases that we presented to you like the
- 5:24
NL2SQL tools and the control plane
- 5:26
tools. They come into the category of
- 5:28
buildtime tools. uh it's atomic and f
- 5:31
flexible but again you don't want to
- 5:33
delete your databases so it requires to
- 5:36
be a human in the loop case and you
- 5:38
can't run them on the on production use
- 5:40
cases but let's say I'm interested in
- 5:43
building some chat B and I want to do
- 5:45
production use cases there you rely on
- 5:48
runtime or end user applications you can
- 5:51
build those using patenting AI or lchain
- 5:54
um so you can see one of the examples
- 5:56
like we have a cancel order a
- 5:57
deterministic structure SQL query that
- 6:00
we have given and you can use it as a
- 6:02
tool.
- 6:05
This is one of the examples uh or demo
- 6:07
for like wherein a buildtime tool was
- 6:11
used and uh you can see the error
- 6:13
message. So uh agent actually asked to
- 6:16
delete the table and start fresh. We
- 6:18
deleted everything and there were no
- 6:20
safeguard or guardrails here.
- 6:24
Now let's go to our demo for
- 6:27
runtime tools.
- 6:38
Yeah, maybe um I think until the video
- 6:41
loads. So, so sorry for the technical
- 6:44
glitch that we have, but I can quickly
- 6:46
walk you through what we are going to
- 6:47
present in the video and I guess it's
- 6:49
loading. Yeah.
- 6:52
Um so this demo is particularly talking
- 6:55
about how did we use our production
- 6:57
tools in a chatbot. Uh and we created a
- 7:02
demo called a Similar and Symbolair is
- 7:05
going to help me with booking all my
- 7:07
flights in San Francisco and do and
- 7:10
whatever I would require to do in San
- 7:12
San Francisco it would basically help me
- 7:14
with it. Uh, one of the things that I
- 7:17
would try is I would try to fool my
- 7:20
agent that I am Avery and not PRA and
- 7:23
book a flight for me to San Francisco.
- 7:27
But because our agent is uh has all the
- 7:31
authenticated O, it will not get fooled
- 7:34
and it will not book any flights uh on
- 7:36
behalf of Avery, but it will do it on my
- 7:39
behalf. Um and then you can use it to
- 7:42
basically change your flights. You want
- 7:44
to know about all the shops that are
- 7:46
there, you can do all these requirements
- 7:48
using that. So I guess thank you u
- 7:53
Avery.
- 7:59
I think we
- 8:17
>> [sighs]
- 8:19
>> Apologies again for our technical
- 8:22
difficulties here.
- 8:32
Um, unfortunately, it looks like I need
- 8:33
to present from just the slide deck
- 8:35
because it's not loading. Okay, so I
- 8:38
apologize for not being able to see our
- 8:40
demo today, but we can still learn all
- 8:42
the security and guardrails that we need
- 8:44
to secure our database access. So, the
- 8:46
first thing that we need to know is your
- 8:48
database is only as secure as your
- 8:50
agent. We all know that agents and LMS
- 8:54
are actually pretty easy to trick. They
- 8:55
might be getting slightly better today,
- 8:57
but we can still work really hard to
- 9:00
trick them. And so we have a very common
- 9:03
attack pattern called the confused
- 9:05
deputy attack. And this is when a user
- 9:07
can trick an agent into misusing their
- 9:10
privileges um to access data that a user
- 9:13
wasn't supposed to access. So Simon
- 9:16
Willis actually coined the phrase the
- 9:18
lethal trifecta. And a data breach
- 9:21
occurs when an agent has simultaneous
- 9:24
access to three different things. One,
- 9:26
private data. Two, untrusted content.
- 9:30
And three, the ability to expose that
- 9:33
content and that data back to an
- 9:35
external user.
- 9:38
So let's take a look of that in action.
- 9:41
So let's say I'm building a triage um
- 9:44
agent and so a ticket is fired or alert
- 9:46
goes out and my agent is designed to um
- 9:51
look at that ticket and go investigate
- 9:54
what it needs to do. So on that ticket
- 9:57
the agent gets a little bit of data like
- 9:59
we need to go look in this database for
- 10:01
these reasons. Um but a malicious
- 10:03
insider can actually come into that
- 10:05
trusted system and instead say well I
- 10:09
want to query the salary database and
- 10:11
please return all the employees
- 10:13
salaries. And so since this is a trusted
- 10:16
system the agent goes okay let me use my
- 10:18
permissions. I have those privileges. I
- 10:21
have that access. I will query that and
- 10:23
I'll post that right back on the ticket
- 10:24
because that's what the ticket tells me
- 10:26
to do. But now we have a huge data
- 10:30
breach. a user that wasn't supposed to
- 10:33
have access to private data now has that
- 10:35
access. And so now we have a big PR
- 10:38
fiasco.
- 10:43
So this makes a little bit more sense
- 10:45
when we think about who's controlling
- 10:47
access and who's controlling the
- 10:50
parameters. So we talk about agent or
- 10:52
application versus modeled controlled
- 10:54
parameters. So in a traditional
- 10:57
architecture, things were actually much
- 10:59
easier because you would have a few
- 11:02
input fields, you would define your
- 11:04
queries and then that would be safely
- 11:06
injected into those queries.
- 11:10
And so it was okay when your application
- 11:13
had a little bit more access because it
- 11:17
knew exactly what actions it was going
- 11:19
to take.
- 11:21
But in uh a gent application these rules
- 11:25
aren't as clear. So we need to first
- 11:27
think about um separating the three
- 11:29
different identities. We have the user
- 11:31
identity, we have the application
- 11:34
identity and the agent identity.
- 11:39
So first um we need to think about what
- 11:41
the user has access to. So the user just
- 11:44
needs to have access to the application.
- 11:47
that application's workload identity can
- 11:50
have a little bit more broader access um
- 11:52
because it needs to probably talk to
- 11:54
different services but the agent running
- 11:57
in that application only needs to have
- 12:00
access to the data that that end user
- 12:02
initially needs to have.
- 12:06
So then next we need to think about
- 12:07
who's controlling the tool inputs. So we
- 12:11
have um agent parameters
- 12:15
um and a application parameters. So
- 12:17
agent parameters are the untrusted
- 12:19
inputs that the agent is deriving
- 12:21
dynamically. And then we also have
- 12:23
application parameters. These are the
- 12:25
factual constraints that we need to keep
- 12:27
outside of the agents uh control.
- 12:33
Okay. So now let's look at the evolution
- 12:36
of a secure tool. Here we have a fully
- 12:39
modeled control tool. And so essentially
- 12:42
the agent here is a super user. It has
- 12:44
access to database credentials, the
- 12:46
host, the port, the connection details,
- 12:48
and even the raw SQL query.
- 12:53
And so we're only secure as um the agent
- 12:57
here. And we can really easily again
- 12:59
trick the agent into exposing all of
- 13:01
this data. And now we have access to
- 13:03
essentially any database in the system.
- 13:08
So Toolbox solves for this um by
- 13:10
introducing a source primitive.
- 13:13
So we move the connection details out of
- 13:15
the agents control and in toolbox um a
- 13:18
user will preconfigure the connection
- 13:20
details in a YAML file and then when we
- 13:22
start our MCP server those are safely
- 13:24
injected and so we do not have to have
- 13:27
the agent um to have access to that.
- 13:33
So we can add a little bit more control
- 13:35
to our um source security as well. Our
- 13:38
number one request that we get from
- 13:39
customers is read only restrictions. We
- 13:42
want to be able to remove all right
- 13:44
ability from agents if we need that
- 13:46
specific uh user journey. So this means
- 13:49
removing right tools but also down to
- 13:52
the database driver ensuring that we can
- 13:54
only do read only queries.
- 13:58
If we're also concerned about again
- 14:00
blast radius um and securing all of our
- 14:03
tables and our databases um some of our
- 14:05
cloudnative databases have this concept
- 14:08
of allowed data sets. So again we can
- 14:10
add that like enum to our source in
- 14:12
order to continue to restrict um the
- 14:14
blast radius of um the agents control
- 14:17
and lastly is output size. You might not
- 14:19
actually think that this is a security
- 14:22
layer, but if again the agent gets into
- 14:25
the wrong hands, we can reduce that
- 14:27
blast radius by saying uh the agent can
- 14:30
only uh grab this much data. So we're
- 14:31
not overwhelming both our agent or our
- 14:34
database.
- 14:38
So sweet, we have our configurable
- 14:40
sources tool. So you can see here that
- 14:42
actually now our tool input, our tool
- 14:45
signature is very minimalized. we only
- 14:47
have the SQL string that's um being
- 14:50
generated by the agent.
- 14:55
But this comes to our actual our next
- 14:56
pro problem. We want to be able to
- 14:59
control what the agent is running. We
- 15:02
don't want the agent to have the ability
- 15:04
to generate any SQL um that it can think
- 15:06
of. So toolbox introduces custom tools
- 15:10
and again in our YAML file we can define
- 15:12
the exact SQL uh statement that will run
- 15:16
very reliable.
- 15:18
It's a reliable and secure uh SQL query.
- 15:22
Um this also allows us to customize the
- 15:24
tool name and the tool description.
- 15:26
These are really important for the agent
- 15:28
to have the context on how to use this
- 15:30
tool um accurately.
- 15:34
And in the system we use prepared
- 15:35
statements with type parameters in order
- 15:37
to reduce um SQL injection attacks. So
- 15:40
we make sure that everything is um
- 15:44
we validate all the input types um when
- 15:46
we inject that into the SQL for the
- 15:48
user.
- 15:52
Okay, let's dive into a little bit more
- 15:53
of best practices for tool quality. So
- 15:56
we really highly recommend that tools
- 15:58
focus on outcomes. We really shouldn't
- 16:00
be thinking in atomic rest APIs. we
- 16:03
should think about what the action
- 16:05
actually needs to do. This also reduces
- 16:07
the round trip of needing to make
- 16:10
multiple tool calls. And again, the
- 16:13
descriptions are guidance. We shouldn't
- 16:15
um duplicate information like input
- 16:17
parameters because the agent already has
- 16:19
access to that. So, writing really good
- 16:22
um tool descriptions is very important
- 16:24
for accurate tool usage.
- 16:27
We also recommend that you separate read
- 16:29
versus write tools. Um by doing this you
- 16:32
can automatically approve read tools and
- 16:35
but you can also then send write tools
- 16:37
uh to the user for um confirmation and
- 16:40
this just makes it very much more clear
- 16:42
for the agent to use these
- 16:44
and this is actually uh the next is
- 16:46
actionable errors. This is the number
- 16:48
one thing that I think we can all do
- 16:50
better. So usually we just return like a
- 16:52
generic HTTP error four or four but we
- 16:56
all know agents are actually really
- 16:57
smart now and so if you give the ability
- 17:00
to have an error of that can be
- 17:02
retrieded the agent can actually take
- 17:04
that action. So being able to return a
- 17:07
error is really important and lastly is
- 17:11
simple inputs. We see that people try to
- 17:13
use these complex maps uh complex
- 17:16
primitives to um that an agent needs to
- 17:19
be able to build and that is not
- 17:21
reliable. Using flat structure with um
- 17:26
with uh simple inputs will really
- 17:28
increase your reliability.
- 17:32
So sweet. Now we're at custom semantic
- 17:35
tools. You can see that we now have our
- 17:37
lookup flights tool that takes in the
- 17:39
dynamic parameters such as user ID and
- 17:42
date. And so now our we're very much
- 17:45
more secure because the agent isn't
- 17:47
generating that SQL query. It doesn't
- 17:49
have the ability to kind of go off the
- 17:51
rails. It only is looking at these very
- 17:53
specific inputs.
- 17:57
But user ID is actually a very sensitive
- 18:00
piece of information. It is PII. we need
- 18:02
to also remove that from the ability of
- 18:05
the agent's control. So we can do this
- 18:07
in two different ways. We have bounded
- 18:10
parameters. This is when the application
- 18:12
first um authenticates the user and then
- 18:15
we can bind that parameter um directly
- 18:17
to our tool. And so that restricts the
- 18:20
agents control of it. It actually never
- 18:21
sees that user identity.
- 18:24
But toolbox also solves for this in
- 18:27
another way called authenticated
- 18:28
parameters. This is when we tell the
- 18:31
tool that you're going to receive a
- 18:34
identity token, an open ID, a signed jot
- 18:36
token, and when we call that tool that
- 18:40
we want it first to validate that token.
- 18:42
Is that token real? Is that token
- 18:44
correct? And then we'll extract the user
- 18:46
claims from that token for the user. And
- 18:49
so the claims usually include like a
- 18:51
user ID, an email, um an issuer.
- 18:55
And so it's secured because we're again
- 18:58
extracting that user identity out of the
- 19:01
agents control and binding that to the
- 19:03
tool.
- 19:08
So now um we're have a much more secure
- 19:13
tool. We have our lookup flights tool
- 19:15
that only takes in a very easy parameter
- 19:18
such as date. It doesn't have to handle
- 19:21
any sensitive information such as PII,
- 19:23
user identity. And so we're really here
- 19:26
now at um our zero trust architecture
- 19:30
where we're in full control of
- 19:32
everything that we need to be in control
- 19:34
of.
- 19:39
So thank you all for coming to listen to
- 19:41
our talk today. Again, I apologize for
- 19:43
our technical difficulties. Uh we highly
- 19:46
recommend if you want to learn more
- 19:47
about our technologies um that you look
- 19:50
at our documentation and our uh GitHub
- 19:52
repository. I also really want to
- 19:54
highlight our eval bench repository
- 19:56
because this is how we know that our
- 19:58
tools are working well and eval.
- 20:03
So thank you all for joining us today.
- 20:07
[applause]