Build-Time vs. Run-Time: Why Dev Tools Fail in Production — Averi Kitsch & Prerna Kakkar, Google

Read the talk

Build-Time vs. Run-Time: Why Dev Tools Fail in Production

Averi Kitsch and Prerna Kakkar show why flexible database tools become dangerous when exposed to end users—and how predefined SQL, restricted privileges, and application-bound identity turn an agent tool into a production interface.

From a talk by Averi Kitsch and Prerna Kakkar

At a glance

Ideas worth remembering

  • Keep control-plane and arbitrary SQL tools in human-supervised development workflows; production agents should invoke predefined operations with narrow, typed inputs.

  • Treat model-derived parameters as untrusted. Connection details, SQL statements, permissions, and authenticated user identity belong under application or server control.

  • Bound or authenticated parameters prevent a prompt from substituting another user’s identity; the final tool can expose only nonsensitive choices such as a date.

  • Design tools around outcomes, separate reads from writes, return errors an agent can act on, and prefer simple flat inputs.

Developer tools and production tools have different jobs

Averi Kitsch, technical lead for MCP Toolbox for databases, and Prerna Kakkar, technical lead for EvalBench, begin with a practical distinction: database tools that help developers explore or administer a system are usually the wrong tools to place behind a production agent. MCP Toolbox supplies database connectivity, authentication, connection pooling, and observability, but those capabilities do not decide how much freedom an agent should receive. The tool interface still determines what the agent can do.

Recording frame at 107 seconds
Recording frame at 107 seconds

The first two database patterns favor flexibility. Control-plane tools create and manage instances or databases. Because these administrative operations can be destructive, they belong in developer-assistance workflows with a human checking consequential actions. Natural-language-to-SQL tools let an agent generate raw SQL when the necessary query cannot be known in advance. They suit exploration, such as finding California customers who bought a winter coat in July, returned it within 14 days, and then grouping them by the campaign that acquired them.

Structured SQL tools target a different operating environment. The SQL statement and accepted parameters are defined before deployment, leaving the agent to select a known operation and supply a small set of values. That limits invented queries, supports injection defenses, and can reduce latency because the model no longer synthesizes SQL for every request. The lost flexibility is intentional: production software should expose the actions the product supports, rather than every action the database can perform.

Compare the ideasBuild-time flexibility versus runtime control

Create or manage databases and instances; powerful administrative operations require human supervision.

The useful boundary is determined by who supervises the tool and whether its executable logic is fixed before a request arrives.

0:120:33
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:12 · section reference included

“Delete the table and start fresh” is not a recovery policy

Build-time tools are atomic and flexible, which makes them useful under a developer’s supervision and hazardous inside an end-user application. A production chatbot instead needs runtime operations such as a deterministic cancel_order tool whose database behavior is fixed behind the interface.

The failure at 6:05 is blunt. After encountering an error, the agent proposed deleting the table and starting over. The table was deleted, with no guardrail stopping the operation. The observable result was total data removal; the causal chain was an error, a model-generated recovery idea, broad database authority, and no independent control capable of rejecting the destructive path. A plausible suggestion became an executable disaster because the tool exposed too much power.

The planned runtime demonstration used SimAir, a flight-booking chatbot. Prerna would claim to be Averi and ask the system to book a flight under Averi’s identity. Authentication was intended to keep the booking tied to Prerna instead. The demonstration did not load, so the recording explains the intended result without visibly verifying it; the identity-binding mechanism later in the talk shows how the application is meant to enforce that result.

Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

5:10 · section reference included

The confused deputy turns a work item into a breach

“Your database is only as secure as your agent” captures the next problem. Language models can be manipulated, so database security cannot depend on the model consistently distinguishing legitimate instructions from malicious ones. In a confused deputy attack, someone convinces an agent to misuse privileges that the agent legitimately possesses but the requester does not.

Recording frame at 625 seconds
Recording frame at 625 seconds

The dangerous combination is the “lethal trifecta,” a phrase coined by Simon Willison: access to private data, exposure to untrusted content, and a channel that can return data to an external user. The triage-agent example at 9:38 contains all three. The agent reads a ticket, uses database permissions to investigate, and posts its findings back to the ticket.

A malicious insider inserts an instruction to query the salary database and return every employee’s salary. The agent complies because the ticket looks like a trusted work item and the database accepts the agent’s credentials. The breach does not require stealing those credentials. The attacker instead supplies content that persuades a privileged deputy to use them.

Traditional applications narrow this path with fixed fields and predefined queries. Agentic applications introduce values derived dynamically from language, so the system must distinguish agent-controlled parameters from application-controlled parameters. Agent parameters come from model interpretation and should be treated as untrusted. Application parameters encode facts and constraints—such as the authenticated user’s ID—that must remain outside the model’s control.

How it fits togetherHow a confused deputy leaks salary data

Contains a planted instruction requesting salary data.

The ticket supplies untrusted instructions, while the agent contributes privileges and a return channel. Together they create the breach path.

Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

8:32 · section reference included

Move connection details and executable logic out of the model

The first boundary separates three identities. The user needs access to the application. The application’s workload identity may need broader access to supporting services. The agent operating inside that application should receive only the data access required for that user’s journey. Collapsing these identities into one credential makes the agent a proxy for the application’s full authority.

Recording frame at 800 seconds
Recording frame at 800 seconds

At the start of the secure-tool progression at 12:33, a fully model-controlled database tool is effectively a superuser interface: the model supplies credentials, host, port, connection details, and arbitrary SQL. If the model can be tricked, every one of those controls is exposed through the same vulnerable decision-maker.

MCP Toolbox’s source primitive removes connection configuration from the tool signature. An operator defines it in YAML when starting the MCP server, and the server injects it without exposing those details to the agent. This does not yet control the SQL, but it prevents the model from choosing a different host, port, credential, or database connection.

The source can enforce narrower limits in layers. Read-only access should remove write tools and reach down to the database driver, rather than relying on the agent to avoid writes. Allowed datasets, supported by some cloud-native databases, restrict which data collections are reachable. Output caps limit how much data one call can retrieve, reducing both exfiltration impact and load on the agent and database. These controls do not make malicious instructions harmless; they reduce what those instructions can accomplish.

Connection and source controls still leave one dangerous input: arbitrary SQL generated by the model. Custom tools remove that freedom by defining the exact statement in YAML, along with a name and description that tell the agent when to use it. Typed parameters flow through prepared statements, so values are validated and bound as data rather than concatenated into executable SQL.

Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:21 · section reference included

Tool quality precedes the final identity boundary

A constrained tool can still fail if the agent cannot understand or invoke it reliably. The recommended interface is outcome-shaped rather than a thin copy of atomic REST endpoints. A tool named for the complete action can replace several round trips, while its description should explain when and why to use it instead of repeating parameter definitions already present in the schema.

Recording frame at 990 seconds
Recording frame at 990 seconds

Several interface choices improve control and reliability:

  • Separate reads from writes. Read tools can be automatically approved while write tools can require explicit user confirmation.
  • Return actionable errors. A generic 404 gives the agent little recovery guidance; an error that identifies a retryable condition gives it a useful next step.
  • Prefer flat, simple inputs. Complex nested maps are harder for models to construct consistently than a small set of typed fields.
15:5216:22
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

15:52 · section reference included

Bind user identity outside the agent

The lookup_flights tool now has predefined SQL and accepts only specific fields such as user_id and date. That is safer than arbitrary SQL, but user_id remains sensitive: a prompt could still persuade the model to substitute another account. The final step removes this parameter from the agent-visible interface.

Recording frame at 1144 seconds
Recording frame at 1144 seconds

With bound parameters, the application authenticates the user and injects the resulting identity directly into the tool call without showing it to the agent. With authenticated parameters, the tool receives an OpenID-signed JWT, validates the token, and extracts claims such as user ID, email, and issuer. Both mechanisms make conversation text unable to select the account under which the query runs.

What changed from the original superuser tool to the final lookup at 19:08? The diagram follows the shrinking control surface. Connection details move into server configuration; driver restrictions and, where supported, allowed datasets limit the blast radius; custom tools replace generated SQL; and authenticated application state supplies the user identity. The agent is left with a nonsensitive choice such as the date.

The resulting design is described as a zero-trust architecture because meaningful privileges and factual constraints are not granted merely because the model appears cooperative. That label does not make the complete system automatically safe; it describes where enforcement occurs. The model proposes a date, while components outside the model determine the connection, permitted operation, reachable data, output size, and authenticated user.

The closing reminder is operational: tool behavior must be evaluated, not merely declared secure. EvalBench is highlighted as the framework used to check whether agentic tools work well. The recording does not provide evaluation results, but the dependency is clear: SQL and identity guardrails define permitted behavior, while evaluations test whether agents select and use those constrained tools successfully.

How it fits togetherFrom database superuser to identity-bound operation

The agent controls credentials, connection details, and raw SQL.

Each stage removes another consequential decision from the model and places it under deterministic application or server control.

Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

17:32 · section reference included

Resources

  • A practical introduction to MCP Toolbox for Databases, its supported databases, and database-aware development workflows. It provides useful context for the flexible build-time tools that this talk says should remain human-supervised.

Read the complete timestamped transcript
  1. 0:01

    [music]

  2. 0:12

    Hey everyone, how all of you are doing

  3. 0:15

    today?

  4. 0:17

    Yeah. Uh so nice to meet you everyone.

  5. 0:20

    Uh today uh I and my friend Avery are

  6. 0:24

    going to talk about build time versus

  7. 0:25

    runtime. Why your developer tools fail

  8. 0:28

    in production.

  9. 0:30

    So firstly, know about us.

  10. 0:33

    >> Hi everybody. I'm Avery Kit and I'm a

  11. 0:36

    staff software engineer working on

  12. 0:37

    Google Cloud databases. I'm currently

  13. 0:40

    the technical lead for MCP toolbox for

  14. 0:42

    databases, our open-source uh database

  15. 0:45

    MCP server and our Google Cloud MCP

  16. 0:48

    server um maintainer.

  17. 0:51

    Hi, I'm Pna and I am currently working

  18. 0:53

    as senior software engineer at Google

  19. 0:56

    and I am currently tech lead for Eval

  20. 0:59

    bench which is the evaluation framework

  21. 1:01

    for all your agent tech MCP and skills

  22. 1:03

    need and I'm also an active contributor

  23. 1:06

    to MCP toolbox.

  24. 1:09

    So today we are going to cover three

  25. 1:11

    areas broadly. We will firstly start

  26. 1:13

    with the history of MCP at Google. Then

  27. 1:17

    we will cover on the common tool

  28. 1:18

    patterns that we have found from our own

  29. 1:21

    work and practices and how did we use

  30. 1:24

    all those practices to build some tools

  31. 1:26

    for database access and how you can use

  32. 1:28

    them and then lastly we will talk about

  33. 1:31

    security guard rails how you can stop

  34. 1:34

    data leaks using identity aware

  35. 1:36

    guardrails.

  36. 1:38

    So let's get to know the background

  37. 1:41

    quickly. Um I'll talk about MCB toolbox

  38. 1:44

    for database. It's an open-source

  39. 1:47

    self-managed uh serving that we provide.

  40. 1:50

    Uh it has currently about 15.7K GitHub

  41. 1:54

    stars. We have 132 plus active

  42. 1:56

    contributors across 40 plus different

  43. 1:58

    databases. It's highly customizable

  44. 2:01

    framework and basically we provide you

  45. 2:04

    with connection pooling integrated O and

  46. 2:07

    you don't even need to care about the

  47. 2:08

    observability. You will get all of them

  48. 2:10

    out of the box.

  49. 2:12

    Then if you don't want to do a

  50. 2:14

    self-managed one but you want to have a

  51. 2:17

    hosted scaled version, we provide

  52. 2:20

    something as Google managed MCP. It's

  53. 2:23

    fully managed. Uh you can plug it across

  54. 2:26

    various agents and ids or harnesses like

  55. 2:29

    Gemini CLI, anti-gravity CLI, cloud

  56. 2:32

    code, you name any. uh it's co uh it's

  57. 2:36

    governed and the discovery is simple and

  58. 2:39

    we also provide model armor which

  59. 2:42

    provides secure access management and

  60. 2:44

    identity control. So combined with uh

  61. 2:48

    the managed version of MCP and the MCP

  62. 2:51

    toolbox last month we had 20 million

  63. 2:53

    tool calls.

  64. 2:56

    Um some of the common tool patterns that

  65. 2:59

    we have observed specifically for

  66. 3:00

    databases. So I'm going to quickly talk

  67. 3:02

    about them.

  68. 3:04

    Firstly uh is the control plane tools.

  69. 3:07

    What we like to call them is admin tools

  70. 3:09

    or manage tools. It is basically in

  71. 3:12

    developer assistance space. So it will

  72. 3:14

    help you create like instance, manage

  73. 3:17

    your instance, create your databases,

  74. 3:20

    manage your databases. It will help you

  75. 3:22

    with all your DBA needs. But you need to

  76. 3:25

    be very careful. You need to be you need

  77. 3:28

    to have a human in the loop because we

  78. 3:30

    don't want to carry out any dangerous

  79. 3:32

    activities.

  80. 3:34

    Um so these tools are built on already

  81. 3:37

    provisioned public API so you get

  82. 3:39

    monitoring and other things out of the

  83. 3:41

    box.

  84. 3:44

    Next one is natural language to SQL or

  85. 3:46

    NL2SQL tools. So basically we are

  86. 3:49

    relying on a tool called as execute SQL

  87. 3:52

    and with the help of agent we generate

  88. 3:54

    raw SQL queries. So you can use this

  89. 3:57

    cases where you don't know uh what

  90. 3:59

    queries you would require beforehand. So

  91. 4:01

    you will get all these queries out of

  92. 4:04

    the out of the box. So it it focuses on

  93. 4:08

    the developer assistance and analytical

  94. 4:10

    agents and uh you can use it for

  95. 4:12

    flexible explorations. So for example,

  96. 4:15

    we have one of the examples like find

  97. 4:17

    all customers in California who bought a

  98. 4:20

    winter coat in July and returned it

  99. 4:22

    within 14 days and group them by the

  100. 4:25

    marketing campaign that originally

  101. 4:28

    acquired them. So this is one of the

  102. 4:30

    queries where uh you can use this tool

  103. 4:32

    uh to get your answers.

  104. 4:37

    But then we have something called a

  105. 4:39

    structure SQL tools which is getting

  106. 4:41

    quite popular and this targets mainly

  107. 4:43

    the production use cases where you know

  108. 4:46

    like what SQL query you want to use and

  109. 4:48

    you want to have security built in and

  110. 4:51

    uh you the parameters are already

  111. 4:54

    configured so uh you prevent SQL

  112. 4:56

    injection

  113. 4:58

    and ensure highly controlled access by

  114. 5:00

    restricting agent to predefined logic.

  115. 5:03

    It also helps you with your latency

  116. 5:05

    needs and reduce the hallucination on

  117. 5:07

    the agent side.

  118. 5:10

    Now we come to the main topic I guess

  119. 5:13

    for which you guys are here for

  120. 5:15

    buildtime versus runtime. So buildtime

  121. 5:17

    are the developer assistant use cases.

  122. 5:20

    Um you can think about the initial two

  123. 5:22

    cases that we presented to you like the

  124. 5:24

    NL2SQL tools and the control plane

  125. 5:26

    tools. They come into the category of

  126. 5:28

    buildtime tools. uh it's atomic and f

  127. 5:31

    flexible but again you don't want to

  128. 5:33

    delete your databases so it requires to

  129. 5:36

    be a human in the loop case and you

  130. 5:38

    can't run them on the on production use

  131. 5:40

    cases but let's say I'm interested in

  132. 5:43

    building some chat B and I want to do

  133. 5:45

    production use cases there you rely on

  134. 5:48

    runtime or end user applications you can

  135. 5:51

    build those using patenting AI or lchain

  136. 5:54

    um so you can see one of the examples

  137. 5:56

    like we have a cancel order a

  138. 5:57

    deterministic structure SQL query that

  139. 6:00

    we have given and you can use it as a

  140. 6:02

    tool.

  141. 6:05

    This is one of the examples uh or demo

  142. 6:07

    for like wherein a buildtime tool was

  143. 6:11

    used and uh you can see the error

  144. 6:13

    message. So uh agent actually asked to

  145. 6:16

    delete the table and start fresh. We

  146. 6:18

    deleted everything and there were no

  147. 6:20

    safeguard or guardrails here.

  148. 6:24

    Now let's go to our demo for

  149. 6:27

    runtime tools.

  150. 6:38

    Yeah, maybe um I think until the video

  151. 6:41

    loads. So, so sorry for the technical

  152. 6:44

    glitch that we have, but I can quickly

  153. 6:46

    walk you through what we are going to

  154. 6:47

    present in the video and I guess it's

  155. 6:49

    loading. Yeah.

  156. 6:52

    Um so this demo is particularly talking

  157. 6:55

    about how did we use our production

  158. 6:57

    tools in a chatbot. Uh and we created a

  159. 7:02

    demo called a Similar and Symbolair is

  160. 7:05

    going to help me with booking all my

  161. 7:07

    flights in San Francisco and do and

  162. 7:10

    whatever I would require to do in San

  163. 7:12

    San Francisco it would basically help me

  164. 7:14

    with it. Uh, one of the things that I

  165. 7:17

    would try is I would try to fool my

  166. 7:20

    agent that I am Avery and not PRA and

  167. 7:23

    book a flight for me to San Francisco.

  168. 7:27

    But because our agent is uh has all the

  169. 7:31

    authenticated O, it will not get fooled

  170. 7:34

    and it will not book any flights uh on

  171. 7:36

    behalf of Avery, but it will do it on my

  172. 7:39

    behalf. Um and then you can use it to

  173. 7:42

    basically change your flights. You want

  174. 7:44

    to know about all the shops that are

  175. 7:46

    there, you can do all these requirements

  176. 7:48

    using that. So I guess thank you u

  177. 7:53

    Avery.

  178. 7:59

    I think we

  179. 8:17

    >> [sighs]

  180. 8:19

    >> Apologies again for our technical

  181. 8:22

    difficulties here.

  182. 8:32

    Um, unfortunately, it looks like I need

  183. 8:33

    to present from just the slide deck

  184. 8:35

    because it's not loading. Okay, so I

  185. 8:38

    apologize for not being able to see our

  186. 8:40

    demo today, but we can still learn all

  187. 8:42

    the security and guardrails that we need

  188. 8:44

    to secure our database access. So, the

  189. 8:46

    first thing that we need to know is your

  190. 8:48

    database is only as secure as your

  191. 8:50

    agent. We all know that agents and LMS

  192. 8:54

    are actually pretty easy to trick. They

  193. 8:55

    might be getting slightly better today,

  194. 8:57

    but we can still work really hard to

  195. 9:00

    trick them. And so we have a very common

  196. 9:03

    attack pattern called the confused

  197. 9:05

    deputy attack. And this is when a user

  198. 9:07

    can trick an agent into misusing their

  199. 9:10

    privileges um to access data that a user

  200. 9:13

    wasn't supposed to access. So Simon

  201. 9:16

    Willis actually coined the phrase the

  202. 9:18

    lethal trifecta. And a data breach

  203. 9:21

    occurs when an agent has simultaneous

  204. 9:24

    access to three different things. One,

  205. 9:26

    private data. Two, untrusted content.

  206. 9:30

    And three, the ability to expose that

  207. 9:33

    content and that data back to an

  208. 9:35

    external user.

  209. 9:38

    So let's take a look of that in action.

  210. 9:41

    So let's say I'm building a triage um

  211. 9:44

    agent and so a ticket is fired or alert

  212. 9:46

    goes out and my agent is designed to um

  213. 9:51

    look at that ticket and go investigate

  214. 9:54

    what it needs to do. So on that ticket

  215. 9:57

    the agent gets a little bit of data like

  216. 9:59

    we need to go look in this database for

  217. 10:01

    these reasons. Um but a malicious

  218. 10:03

    insider can actually come into that

  219. 10:05

    trusted system and instead say well I

  220. 10:09

    want to query the salary database and

  221. 10:11

    please return all the employees

  222. 10:13

    salaries. And so since this is a trusted

  223. 10:16

    system the agent goes okay let me use my

  224. 10:18

    permissions. I have those privileges. I

  225. 10:21

    have that access. I will query that and

  226. 10:23

    I'll post that right back on the ticket

  227. 10:24

    because that's what the ticket tells me

  228. 10:26

    to do. But now we have a huge data

  229. 10:30

    breach. a user that wasn't supposed to

  230. 10:33

    have access to private data now has that

  231. 10:35

    access. And so now we have a big PR

  232. 10:38

    fiasco.

  233. 10:43

    So this makes a little bit more sense

  234. 10:45

    when we think about who's controlling

  235. 10:47

    access and who's controlling the

  236. 10:50

    parameters. So we talk about agent or

  237. 10:52

    application versus modeled controlled

  238. 10:54

    parameters. So in a traditional

  239. 10:57

    architecture, things were actually much

  240. 10:59

    easier because you would have a few

  241. 11:02

    input fields, you would define your

  242. 11:04

    queries and then that would be safely

  243. 11:06

    injected into those queries.

  244. 11:10

    And so it was okay when your application

  245. 11:13

    had a little bit more access because it

  246. 11:17

    knew exactly what actions it was going

  247. 11:19

    to take.

  248. 11:21

    But in uh a gent application these rules

  249. 11:25

    aren't as clear. So we need to first

  250. 11:27

    think about um separating the three

  251. 11:29

    different identities. We have the user

  252. 11:31

    identity, we have the application

  253. 11:34

    identity and the agent identity.

  254. 11:39

    So first um we need to think about what

  255. 11:41

    the user has access to. So the user just

  256. 11:44

    needs to have access to the application.

  257. 11:47

    that application's workload identity can

  258. 11:50

    have a little bit more broader access um

  259. 11:52

    because it needs to probably talk to

  260. 11:54

    different services but the agent running

  261. 11:57

    in that application only needs to have

  262. 12:00

    access to the data that that end user

  263. 12:02

    initially needs to have.

  264. 12:06

    So then next we need to think about

  265. 12:07

    who's controlling the tool inputs. So we

  266. 12:11

    have um agent parameters

  267. 12:15

    um and a application parameters. So

  268. 12:17

    agent parameters are the untrusted

  269. 12:19

    inputs that the agent is deriving

  270. 12:21

    dynamically. And then we also have

  271. 12:23

    application parameters. These are the

  272. 12:25

    factual constraints that we need to keep

  273. 12:27

    outside of the agents uh control.

  274. 12:33

    Okay. So now let's look at the evolution

  275. 12:36

    of a secure tool. Here we have a fully

  276. 12:39

    modeled control tool. And so essentially

  277. 12:42

    the agent here is a super user. It has

  278. 12:44

    access to database credentials, the

  279. 12:46

    host, the port, the connection details,

  280. 12:48

    and even the raw SQL query.

  281. 12:53

    And so we're only secure as um the agent

  282. 12:57

    here. And we can really easily again

  283. 12:59

    trick the agent into exposing all of

  284. 13:01

    this data. And now we have access to

  285. 13:03

    essentially any database in the system.

  286. 13:08

    So Toolbox solves for this um by

  287. 13:10

    introducing a source primitive.

  288. 13:13

    So we move the connection details out of

  289. 13:15

    the agents control and in toolbox um a

  290. 13:18

    user will preconfigure the connection

  291. 13:20

    details in a YAML file and then when we

  292. 13:22

    start our MCP server those are safely

  293. 13:24

    injected and so we do not have to have

  294. 13:27

    the agent um to have access to that.

  295. 13:33

    So we can add a little bit more control

  296. 13:35

    to our um source security as well. Our

  297. 13:38

    number one request that we get from

  298. 13:39

    customers is read only restrictions. We

  299. 13:42

    want to be able to remove all right

  300. 13:44

    ability from agents if we need that

  301. 13:46

    specific uh user journey. So this means

  302. 13:49

    removing right tools but also down to

  303. 13:52

    the database driver ensuring that we can

  304. 13:54

    only do read only queries.

  305. 13:58

    If we're also concerned about again

  306. 14:00

    blast radius um and securing all of our

  307. 14:03

    tables and our databases um some of our

  308. 14:05

    cloudnative databases have this concept

  309. 14:08

    of allowed data sets. So again we can

  310. 14:10

    add that like enum to our source in

  311. 14:12

    order to continue to restrict um the

  312. 14:14

    blast radius of um the agents control

  313. 14:17

    and lastly is output size. You might not

  314. 14:19

    actually think that this is a security

  315. 14:22

    layer, but if again the agent gets into

  316. 14:25

    the wrong hands, we can reduce that

  317. 14:27

    blast radius by saying uh the agent can

  318. 14:30

    only uh grab this much data. So we're

  319. 14:31

    not overwhelming both our agent or our

  320. 14:34

    database.

  321. 14:38

    So sweet, we have our configurable

  322. 14:40

    sources tool. So you can see here that

  323. 14:42

    actually now our tool input, our tool

  324. 14:45

    signature is very minimalized. we only

  325. 14:47

    have the SQL string that's um being

  326. 14:50

    generated by the agent.

  327. 14:55

    But this comes to our actual our next

  328. 14:56

    pro problem. We want to be able to

  329. 14:59

    control what the agent is running. We

  330. 15:02

    don't want the agent to have the ability

  331. 15:04

    to generate any SQL um that it can think

  332. 15:06

    of. So toolbox introduces custom tools

  333. 15:10

    and again in our YAML file we can define

  334. 15:12

    the exact SQL uh statement that will run

  335. 15:16

    very reliable.

  336. 15:18

    It's a reliable and secure uh SQL query.

  337. 15:22

    Um this also allows us to customize the

  338. 15:24

    tool name and the tool description.

  339. 15:26

    These are really important for the agent

  340. 15:28

    to have the context on how to use this

  341. 15:30

    tool um accurately.

  342. 15:34

    And in the system we use prepared

  343. 15:35

    statements with type parameters in order

  344. 15:37

    to reduce um SQL injection attacks. So

  345. 15:40

    we make sure that everything is um

  346. 15:44

    we validate all the input types um when

  347. 15:46

    we inject that into the SQL for the

  348. 15:48

    user.

  349. 15:52

    Okay, let's dive into a little bit more

  350. 15:53

    of best practices for tool quality. So

  351. 15:56

    we really highly recommend that tools

  352. 15:58

    focus on outcomes. We really shouldn't

  353. 16:00

    be thinking in atomic rest APIs. we

  354. 16:03

    should think about what the action

  355. 16:05

    actually needs to do. This also reduces

  356. 16:07

    the round trip of needing to make

  357. 16:10

    multiple tool calls. And again, the

  358. 16:13

    descriptions are guidance. We shouldn't

  359. 16:15

    um duplicate information like input

  360. 16:17

    parameters because the agent already has

  361. 16:19

    access to that. So, writing really good

  362. 16:22

    um tool descriptions is very important

  363. 16:24

    for accurate tool usage.

  364. 16:27

    We also recommend that you separate read

  365. 16:29

    versus write tools. Um by doing this you

  366. 16:32

    can automatically approve read tools and

  367. 16:35

    but you can also then send write tools

  368. 16:37

    uh to the user for um confirmation and

  369. 16:40

    this just makes it very much more clear

  370. 16:42

    for the agent to use these

  371. 16:44

    and this is actually uh the next is

  372. 16:46

    actionable errors. This is the number

  373. 16:48

    one thing that I think we can all do

  374. 16:50

    better. So usually we just return like a

  375. 16:52

    generic HTTP error four or four but we

  376. 16:56

    all know agents are actually really

  377. 16:57

    smart now and so if you give the ability

  378. 17:00

    to have an error of that can be

  379. 17:02

    retrieded the agent can actually take

  380. 17:04

    that action. So being able to return a

  381. 17:07

    error is really important and lastly is

  382. 17:11

    simple inputs. We see that people try to

  383. 17:13

    use these complex maps uh complex

  384. 17:16

    primitives to um that an agent needs to

  385. 17:19

    be able to build and that is not

  386. 17:21

    reliable. Using flat structure with um

  387. 17:26

    with uh simple inputs will really

  388. 17:28

    increase your reliability.

  389. 17:32

    So sweet. Now we're at custom semantic

  390. 17:35

    tools. You can see that we now have our

  391. 17:37

    lookup flights tool that takes in the

  392. 17:39

    dynamic parameters such as user ID and

  393. 17:42

    date. And so now our we're very much

  394. 17:45

    more secure because the agent isn't

  395. 17:47

    generating that SQL query. It doesn't

  396. 17:49

    have the ability to kind of go off the

  397. 17:51

    rails. It only is looking at these very

  398. 17:53

    specific inputs.

  399. 17:57

    But user ID is actually a very sensitive

  400. 18:00

    piece of information. It is PII. we need

  401. 18:02

    to also remove that from the ability of

  402. 18:05

    the agent's control. So we can do this

  403. 18:07

    in two different ways. We have bounded

  404. 18:10

    parameters. This is when the application

  405. 18:12

    first um authenticates the user and then

  406. 18:15

    we can bind that parameter um directly

  407. 18:17

    to our tool. And so that restricts the

  408. 18:20

    agents control of it. It actually never

  409. 18:21

    sees that user identity.

  410. 18:24

    But toolbox also solves for this in

  411. 18:27

    another way called authenticated

  412. 18:28

    parameters. This is when we tell the

  413. 18:31

    tool that you're going to receive a

  414. 18:34

    identity token, an open ID, a signed jot

  415. 18:36

    token, and when we call that tool that

  416. 18:40

    we want it first to validate that token.

  417. 18:42

    Is that token real? Is that token

  418. 18:44

    correct? And then we'll extract the user

  419. 18:46

    claims from that token for the user. And

  420. 18:49

    so the claims usually include like a

  421. 18:51

    user ID, an email, um an issuer.

  422. 18:55

    And so it's secured because we're again

  423. 18:58

    extracting that user identity out of the

  424. 19:01

    agents control and binding that to the

  425. 19:03

    tool.

  426. 19:08

    So now um we're have a much more secure

  427. 19:13

    tool. We have our lookup flights tool

  428. 19:15

    that only takes in a very easy parameter

  429. 19:18

    such as date. It doesn't have to handle

  430. 19:21

    any sensitive information such as PII,

  431. 19:23

    user identity. And so we're really here

  432. 19:26

    now at um our zero trust architecture

  433. 19:30

    where we're in full control of

  434. 19:32

    everything that we need to be in control

  435. 19:34

    of.

  436. 19:39

    So thank you all for coming to listen to

  437. 19:41

    our talk today. Again, I apologize for

  438. 19:43

    our technical difficulties. Uh we highly

  439. 19:46

    recommend if you want to learn more

  440. 19:47

    about our technologies um that you look

  441. 19:50

    at our documentation and our uh GitHub

  442. 19:52

    repository. I also really want to

  443. 19:54

    highlight our eval bench repository

  444. 19:56

    because this is how we know that our

  445. 19:58

    tools are working well and eval.

  446. 20:03

    So thank you all for joining us today.

  447. 20:07

    [applause]