AI Engineer World's Fair 2026

AI Agents Are Just Distributed Systems Now — Salman Munaf, TikTok

Read the talk

AI Agents Are Just Distributed Systems Now

Salman Munaf explains how tool-using agents inherit remote-call failures, stale state and partial transactions—and how deterministic controls can limit the consequences of probabilistic decisions.

From a talk by Salman Munaf

At a glance

Ideas worth remembering

  • An agent coordinates external systems probabilistically. Deterministic controls must constrain the actions its decisions can cause.

  • A timeout leaves the operation’s outcome unknown. Request identifiers and status lookups help resolve it; idempotency prevents repeated requests from creating repeated effects.

  • Duplicate protection, backoff, circuit breakers and execution budgets address different failure modes: repeated effects, excessive load, unhealthy dependencies and runaway cost.

  • Memory that influences action needs provenance, an authoritative source and invalidation. Recovery also needs defined compensation for earlier successful steps.

  • Scope credentials and human approvals to the intended operation. Approval for a $30 refund does not authorize $300.

  • Better models reduce mistakes, while tool contracts, traces and recovery paths determine what happens when a mistake or infrastructure failure still occurs.

When a wrong answer can change production

A wrong model answer becomes a different engineering problem when the system can delete a database or make a refund decision. Salman Munaf, listed for this session as a Lead Site Reliability Engineer at TikTok, opens with two incident examples: a Replit agent deleting a production database and an Air Canada chatbot making what he describes as an incorrect refund. These are motivations for his proposed safeguards, rather than detailed incident reconstructions.

The examples expose two separate responsibilities:

  • Limit destructive actions: Backups provide a recovery path, while scoped permissions can prevent an agent from deleting a production database in the first place.
  • Retrieve authoritative policy: A chatbot making policy-dependent decisions needs a source of truth so that stale or incorrect information does not drive its answer.

The transition from chatbot to agent expands the architecture. A text-only interaction ends with an output; an agent loop can call tools, reach external services and change their state. The design inventory therefore has to include the systems the agent talks to, the state it reads or changes, the credentials it holds and the actions those credentials permit. Model quality covers only part of that system.

0:121:12
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

A probabilistic coordinator needs recorded steps

At 3:32, the useful architectural description is a probabilistic coordinator. Distributed services already coordinated multistep workflows, but the traditional comparison here is a mapped decision tree. An agent can vary both the kind and the number of actions it chooses. That flexibility requires deterministic controls around the actions whose consequences would be unacceptable.

The loop plans, acts, observes, may persist information and then decides what to do next. Planning can retrieve external data. Acting can call an API or write to a database. Observation may return only partial results, which then become inputs to the next decision. Persisting an incorrect observation can carry the mistake forward, and a decision to retry can multiply the work sent downstream.

Recording each step’s actions and retrieved context gives recovery a place to start: the workflow can identify where it failed and which earlier operations need attention. But recording an operation does not define its repair. Each step also needs an explicit failure response or compensating action. An incorrect email to a customer makes the distinction clear: knowing that the message was sent is necessary, yet the system still needs a decision about how to correct its consequences.

Suggest correction

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

3:32 · section reference included

A refund timeout leaves the outcome unknown

A tool call wraps an external API, database or queue. The wrapper inherits network delays, timeouts and duplicate requests. Crucially, the service may complete an operation even though the caller receives an error. A database write can exist in the authoritative store while the client’s observation suggests something went wrong.

Follow the refund example through that discrepancy. The agent invokes a customer-refund tool, then the request times out. The visible change is in the agent’s knowledge: it no longer has a confirmed outcome. The customer’s money may already have been refunded. Treating the timeout as proof of failure and issuing a second refund can therefore turn one intended operation into two financial effects.

Three tool capabilities address different parts of this problem:

  • Request identifiers: Identify the earlier operation so that the workflow can refer to it again.
  • Idempotency keys: Let the receiving tool recognize repeated requests and prevent repeated side effects.
  • Status lookup: Check what happened to the earlier request against the system that owns its outcome.

How can a completed refund and an uncertain caller coexist? The diagram separates the operation’s effect from the response the agent receives. It also shows why recovery needs both an outcome lookup and duplicate protection: inspecting the earlier request resolves uncertainty, while recognizing a repeated operation prevents a retry from refunding the customer again.

How it fits togetherOne refund operation, two different observations

The tool request identifies the intended operation.

The service can complete the refund while the agent receives a timeout. A status lookup checks the earlier outcome; idempotency prevents a repeated request from creating another refund.

6:537:23
Suggest correction

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

6:53 · section reference included

Duplicate protection does not stop a retry storm

Retrying is the failure response Munaf expects builders to plan around. Idempotency belongs in the receiving API or tool because the agent’s choice to retry does not establish that another side effect is safe. The tool must recognize the repeated request and avoid doing the operation again.

Even retries that produce no additional side effects still send traffic downstream. A large fan-out or aggressive retry loop can burden an external API and cause cascading failures. Maximum turns limit how long the loop continues; maximum parallel calls limit simultaneous work; spending ceilings limit the resource commitment. Exponential backoff increases the spacing between attempts, reducing pressure on dependencies while the workflow tries to recover.

These controls solve different problems. Idempotency prevents repeated effects, backoff and execution limits restrain repeated work, and compensation addresses the consequences of work that has already happened. None substitutes for the others.

9:059:35
Suggest correction

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

9:05 · section reference included

Context that influences an action is state

At 10:25, the same systems thinking reaches memory. Context becomes state when it can influence an action. It can go stale, conflict with authoritative data and corrupt future decisions. A remembered policy is operationally consequential if it determines what the agent does next.

The memory distinction here concerns where information persists:

  • Short-term memory: The chat thread belongs to a single execution thread.
  • Long-term memory: Project files, system prompts, databases and cache layers can supply information beyond that thread.

Neither location settles which information should win when sources disagree.

Treating memory as a cache makes that decision explicit. Attach provenance so that remembered information has a known origin, choose the authoritative source when values conflict, and invalidate the corresponding memory when that source changes. The causal sequence matters: updating a database does not by itself remove the old value from the agent’s context. Invalidation prevents that retained value from continuing to drive actions.

Suggest correction

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

10:25 · section reference included

A failed CRM update can leave two successful steps behind

A multistep workflow can update an internal ticket, send an email to a customer and then fail to update the CRM. The failure leaves the systems at different stages of completion. Recovery must consider the earlier ticket change and email alongside the failed CRM operation; simply treating the whole workflow as unsuccessful ignores effects that already exist.

What remains after the last step fails? The diagram preserves the successful earlier steps instead of collapsing the workflow into a single failure marker. That partial outcome is the input to compensation: the system needs a defined response for the consequences of each completed operation.

The email example also sets a limit on what recovery means. An incorrect message can be followed by an apology or a corrective email, but the original communication has already occurred. Compensation can repair its consequences through another action without restoring the exact prior state. Its meaning depends on the operation, so the agent needs that response defined rather than being left to improvise after failure.

How it fits togetherPartial completion across three systems

The first operation succeeds.

The failed CRM update leaves a changed ticket and a sent email behind. If the email was incorrect, its defined compensation is a corrective or apology message.

12:0812:37
Suggest correction

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

12:08 · section reference included

Stop unsupported work and scope the work that remains

Circuit breakers put a stopping condition around calls to unhealthy or saturated dependencies. An agent may keep trying to solve a problem, but the surrounding system should prevent those attempts from burdening a dependency that cannot support them. This helps contain cascading failures. Rate limits and maximum turns, parallelism and spending separately bound how much effort the agent can commit.

Those ceilings trade open-ended persistence for a predictable resource commitment. The agent can continue problem-solving only within the limits the system sets. A desire to complete the task cannot be allowed to expand traffic or cost indefinitely.

Permissions need the same specificity. Broad database read-and-write access may make it easy to equip an agent for a task, but it also makes unsafe decisions executable. Separate read and write permissions, scope credentials and allowlist the tools the agent can call. The permitted action set determines how much damage an incorrect decision can cause.

Human approval is another scoped permission. It should bind to the action and its parameters, the actor, timestamp and expiration. Approval for a $30 refund cannot become authorization for a subsequent $300 refund. Changing the amount changes the operation that was approved; a blanket approval loses precisely the information needed to enforce that distinction.

13:2213:53
Suggest correction

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

13:22 · section reference included

Reconstruct the failure, then ask what the system permits

Observability has to reconstruct a workflow, including what information the agent reacted to. An isolated error log cannot explain whether a bad decision came from stale context, a tool response or an earlier write. Traces need to connect the model invoked and its prompt with retrieved context, tool requests, responses, errors, writes and approvals.

For the refund example, that connection distinguishes the request the agent attempted from the outcome it observed and the state the external system actually changed. For a policy-dependent action, it preserves the information used to decide. The purpose is to understand what happened and locate a recovery path across the model and the services around it.

The closing discussion at 17:31 retains a role for better models: greater capability improves the likelihood of correct operations. It cannot eliminate network failures, stale data or adversarial input. The architecture still needs to bound actions, observe their effects and recover when something goes wrong.

Tool contracts make those expectations concrete. Define the operations a tool permits, its request and response types and its schemas. Build idempotency into tools that receive repeated requests. Decide which source wins when memory conflicts, constrain retries with policies and rate limits, and provide permissions, traces and recovery paths. These are parts of the executable system around the coordinator.

The final design question is what the system lets the agent do when it is wrong. That question makes mistakes an expected operating condition. It asks whether an incorrect decision can become an unsafe operation, whether its effects can be understood and whether the workflow has a way back.

Suggest correction

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

16:31 · section reference included

Resources

Read the complete timestamped transcript
  1. 0:01

    [music]

  2. 0:12

    Hello everyone. Good good afternoon. Uh

  3. 0:15

    today uh I will be talking about AI

  4. 0:17

    agents are also distributed systems.

  5. 0:20

    So as uh the models have started to

  6. 0:24

    become more complex. Initially the uh

  7. 0:27

    LLM models were just text in text out

  8. 0:30

    without performing any actions and uh

  9. 0:33

    the

  10. 0:35

    effect that they can produce was just a

  11. 0:38

    wrong model output. However, with

  12. 0:42

    now the capability of agent the agent

  13. 0:45

    the rise in agent capabilities where the

  14. 0:47

    systems can now talk to external systems

  15. 0:50

    uh it has turned into a distributed

  16. 0:54

    systems and it is important to

  17. 0:56

    incorporate distributed systems thinking

  18. 0:59

    and concepts when building AI agents. So

  19. 1:02

    I will be going over uh that uh in this

  20. 1:05

    talk.

  21. 1:07

    So you guys might have uh heard about

  22. 1:11

    incidents being caused by a AI agents.

  23. 1:14

    Uh for instance, the replicate AI agent

  24. 1:18

    deleting a production incident

  25. 1:20

    production database or Air Canada

  26. 1:23

    chatbot basically making an uh an

  27. 1:26

    incorrect refund. And both of these uh

  28. 1:30

    incidents or a lot of these incidents

  29. 1:32

    could have been prevented uh by good

  30. 1:36

    systems thinking when building these uh

  31. 1:40

    AI agents. So for instance for the

  32. 1:42

    replet a uh uh uh incident we could have

  33. 1:48

    good uh

  34. 1:50

    uh we could have robust backups. We

  35. 1:53

    could have scoped authority. we should

  36. 1:54

    we shouldn't ideally have uh allow AI

  37. 1:58

    agents to delete production databases.

  38. 2:00

    Uh moreover for Air Canada chatbot

  39. 2:04

    it would have been uh a good idea to

  40. 2:06

    have uh authoritative source of truth

  41. 2:09

    retrieval so that it's not making uh uh

  42. 2:13

    decisions based on stale or incorrect

  43. 2:15

    policies.

  44. 2:19

    So let's uh go over the transition from

  45. 2:21

    chatbot to production system. Uh so

  46. 2:26

    uh initially when we were in the uh in

  47. 2:30

    the uh age where LLMs were just chat

  48. 2:33

    bots uh we had prompt in and we were

  49. 2:37

    outputting text there were no side

  50. 2:39

    effects the agent was not interacting

  51. 2:41

    with any other system.

  52. 2:44

    However, uh due to agentic uh in the

  53. 2:48

    agentic era in the agentic revolution,

  54. 2:51

    now those agents uh by ingesting prompt

  55. 2:54

    can uh run an agent loop, call external

  56. 2:58

    services, call tools and also perform

  57. 3:00

    state changes. The architectural

  58. 3:02

    boundary now has moved uh way beyond an

  59. 3:06

    LLM model. And the difference is that it

  60. 3:10

    can now cause side effects in the

  61. 3:11

    outside world. So when basic when

  62. 3:14

    building AI agents, it is important to

  63. 3:17

    recognize the external systems that it

  64. 3:19

    is talking to, [clears throat] the

  65. 3:21

    states that uh it is interacting with

  66. 3:25

    and what credentials does it have and

  67. 3:28

    the actions that it can perform.

  68. 3:32

    uh I ideally like to think about it as

  69. 3:36

    uh uh AI agents as basically having a

  70. 3:40

    probabilistic coordinator.

  71. 3:42

    In distributed systems as well, we used

  72. 3:44

    to have services which were coordinating

  73. 3:46

    uh multi-step workflows. However, they

  74. 3:49

    were deterministic in nature. But in the

  75. 3:52

    case of AI agent, the AI acts as a

  76. 3:55

    probabilistic coordinator. The amount of

  77. 3:57

    action, the kind of actions that it can

  78. 3:59

    take can vary quite a lot. It is not

  79. 4:02

    just a decision tree that uh we

  80. 4:05

    typically in traditional systems would

  81. 4:08

    have mapped out

  82. 4:10

    and those uh actions can have severe

  83. 4:13

    consequences uh ba uh if they are not

  84. 4:17

    confined by our determinist by having

  85. 4:21

    deterministic controls in place. So it

  86. 4:24

    is important to ensure uh that we have

  87. 4:28

    deterministic controls in place to

  88. 4:30

    ensure that agent or the AI agent is not

  89. 4:33

    performing any uh

  90. 4:36

    any actions that might be uh uh

  91. 4:40

    problematic.

  92. 4:42

    So uh

  93. 4:45

    let's uh discuss the how a typical agent

  94. 4:49

    loop might look like. So at first it

  95. 4:53

    might uh do some planning. Then based on

  96. 4:57

    that plan it will it will perform an

  97. 4:59

    action and it will then observe the

  98. 5:02

    results of those actions and uh it might

  99. 5:05

    persist that into some d some data store

  100. 5:09

    and then decide what to do next.

  101. 5:12

    Each step in this loop is basically

  102. 5:14

    crossing a a boundary. During planning,

  103. 5:17

    it can interact with data sources to

  104. 5:20

    retrieve some data. Uh during action, it

  105. 5:23

    can call external APIs, tools, uh

  106. 5:27

    databases and perform any actions.

  107. 5:30

    During observation phase, it can perform

  108. 5:33

    it can get partial results and basically

  109. 5:37

    plan or make subsequent actions based on

  110. 5:41

    those partial results. It can persist

  111. 5:44

    incorrect data or uh and uh when

  112. 5:48

    deciding it might also

  113. 5:52

    decide to uh perform an incorrect action

  114. 5:55

    or uh worse it can also do a retry

  115. 5:59

    storm.

  116. 6:01

    So it is very important when building an

  117. 6:03

    agent loop to persist every step of the

  118. 6:07

    process. Whatever actions the agent is

  119. 6:09

    doing, whatever context it is

  120. 6:11

    retrieving, it is important to uh

  121. 6:13

    persist that so that if anything fails,

  122. 6:16

    the agent is able to recognize where it

  123. 6:18

    failed and it can perform uh a

  124. 6:21

    reversible action. Uh it can perform

  125. 6:24

    undo operations. Similarly, there should

  126. 6:26

    be explicit transactions uh identified

  127. 6:30

    for each step. So for instance, if an

  128. 6:32

    agent is making a call, if it fails,

  129. 6:35

    what it should do? What should be the

  130. 6:37

    transaction to compensate for a uh for a

  131. 6:40

    irreversible or unsafe operation? For

  132. 6:43

    instance, if an agent makes sends an

  133. 6:45

    email to a a wrong email to a customer,

  134. 6:48

    what should it do to compensate for

  135. 6:50

    that?

  136. 6:53

    So, uh tool calls are just wrappers

  137. 6:58

    around uh external external APIs,

  138. 7:02

    databases, cues, uh and so on.

  139. 7:06

    And uh with uh when calling the when

  140. 7:10

    making these remote calls, there are

  141. 7:13

    some failures that you incorporate uh

  142. 7:16

    such as network delays, timeouts, uh you

  143. 7:19

    can make duplicate requests or worse the

  144. 7:22

    server side request uh might succeed.

  145. 7:26

    However, the client however the client

  146. 7:28

    might be reported an error.

  147. 7:30

    We have we have seen uh instances where

  148. 7:35

    uh a data by base might have written the

  149. 7:37

    data. However, due to some other errors,

  150. 7:40

    the server might have reported uh uh to

  151. 7:44

    us the error and

  152. 7:47

    uh with humans in the loop we can make

  153. 7:50

    we can basically perform correct

  154. 7:53

    corrective actions based on uh by seeing

  155. 7:56

    uh the database and actual source of

  156. 7:57

    truth. But in agent's case, we need to

  157. 8:00

    ensure that we have uh we have proper

  158. 8:03

    guardrails in place. So for instance,

  159. 8:06

    an agent calls refund customer uh tool

  160. 8:09

    call which basically performs a refund

  161. 8:11

    to the customer. The request times out

  162. 8:14

    uh that did the refund happen or not?

  163. 8:18

    What will the agent uh infer from that?

  164. 8:22

    Would it retry uh refunding to the

  165. 8:24

    customer? you basically the the timeout

  166. 8:27

    does not actually mean that there a

  167. 8:29

    failure had occurred. It means unknown.

  168. 8:32

    And it is important to have uh when

  169. 8:36

    designing these tools, it is important

  170. 8:38

    to have request ids, item potency keys

  171. 8:42

    so that when making duplicate requests,

  172. 8:44

    they are not causing duplicate side

  173. 8:46

    effects. uh and the system can always do

  174. 8:49

    a status lookup like what the previous

  175. 8:52

    request was and what was the status of

  176. 8:55

    that so that it is not making side

  177. 8:57

    effect it is not making side effects

  178. 9:00

    with duplicate a with duplicate

  179. 9:02

    requests.

  180. 9:05

    So [clears throat] AI agents when they

  181. 9:09

    whenever they uh uh whenever they uh

  182. 9:14

    they face failures they retry the their

  183. 9:17

    first uh action is to perform retries.

  184. 9:20

    So it is really important to have item

  185. 9:23

    potency baked in. uh it if a same

  186. 9:27

    request is coming in to an external API

  187. 9:30

    or the tool it should recognize that

  188. 9:32

    this is a duplicate request and ensure

  189. 9:34

    that no side effects are being take are

  190. 9:36

    taking place. Moreover, uh we should

  191. 9:40

    also prevent uh AI agents to perform

  192. 9:43

    retry storms to external APIs because

  193. 9:45

    this can cause cascading failures. uh we

  194. 9:49

    we should have max turns budget spend

  195. 9:52

    and max parallel calls to prevent uh to

  196. 9:56

    uh to ensure that the fan out is not

  197. 9:59

    that large. Moreover, we should have

  198. 10:02

    exponential back back off in place to

  199. 10:04

    ensure that uh the downstream

  200. 10:07

    dependencies are not being uh burdened

  201. 10:11

    and we should also have compensation uh

  202. 10:14

    operations in place for uh operations

  203. 10:18

    that uh that that can have side effects.

  204. 10:25

    Uh

  205. 10:27

    so uh

  206. 10:29

    a lot of uh

  207. 10:32

    teams when building AI agents think of

  208. 10:35

    AI agent context as just a AI cont the

  209. 10:39

    context that uh the AI agent has as uh

  210. 10:43

    as just a context. However, when that

  211. 10:46

    context can influence an action, it's a

  212. 10:49

    state and that state can become stale

  213. 10:53

    that can conflict with the authoritative

  214. 10:54

    data or corrupt future actions that the

  215. 10:57

    agent might perform.

  216. 10:59

    I like to classify it into two different

  217. 11:02

    types of uh memory that the agent has.

  218. 11:05

    First is the short-term memory which is

  219. 11:07

    the jet thread uh that the agent has uh

  220. 11:11

    the which is tied to a single execution

  221. 11:13

    thread and the second is the long-term

  222. 11:15

    memory. It can be project files uh

  223. 11:18

    system prompts uh databases that it

  224. 11:21

    interacts with the cache layer and so

  225. 11:23

    on.

  226. 11:25

    It is important to uh to to decide what

  227. 11:29

    will be the source of truth when these

  228. 11:32

    uh different data sources have

  229. 11:35

    conflicting information and we should

  230. 11:38

    ideally treat memory as a cache which uh

  231. 11:43

    can be invalidated which can have

  232. 11:46

    provenence attached to it. So for

  233. 11:49

    instance whenever a data store or a

  234. 11:51

    database is updated or the source of

  235. 11:53

    truth is updated we in we invalidate the

  236. 11:56

    context or the memory that the agent has

  237. 11:59

    to ensure that it is not making actions

  238. 12:01

    based on the uh incorrect or stale data.

  239. 12:08

    So

  240. 12:10

    usually these agents perform multi-step

  241. 12:12

    actions and uh the agent can succeed on

  242. 12:17

    uh on uh on the first couple of steps

  243. 12:20

    and then it fail. Uh it is important to

  244. 12:23

    reverse the entire transaction that was

  245. 12:26

    performed and these can uh then can

  246. 12:29

    cross system boundaries. So for

  247. 12:31

    instance, an agent can update an

  248. 12:34

    internal ticket uh send an email to a

  249. 12:37

    customer and fail to update the CRM. We

  250. 12:41

    need to figure out what is the uh

  251. 12:45

    correct compensation operation when it

  252. 12:48

    when it hits that failure.

  253. 12:51

    So for instance uh as I mentioned

  254. 12:53

    earlier that uh it improperly uh it

  255. 12:59

    improperly sends an incorrect email to

  256. 13:01

    the customer. It is important that the

  257. 13:03

    compensation operation is defined for

  258. 13:05

    the AI agent to ensure that it is

  259. 13:07

    sending an uh uh an apology email to the

  260. 13:11

    customer or any or or any email or an

  261. 13:14

    email that is correcting that mistake.

  262. 13:19

    So uh

  263. 13:22

    a the AI agent basically runs in a loop

  264. 13:25

    and uh whenever uh like it can it can do

  265. 13:30

    multiple calls. It can it can have a

  266. 13:33

    retry uh retry loop that it can run

  267. 13:37

    based uh whenever it fails. So it is

  268. 13:40

    important to have uh circuit breakers

  269. 13:43

    whenever it is making making external

  270. 13:45

    calls uh to ensure that the uh that the

  271. 13:49

    that it is not uh burdening the

  272. 13:52

    downstream system. Uh for instance if a

  273. 13:56

    downstream is unhealthy there should be

  274. 13:57

    system break uh circuit breakers in

  275. 13:59

    place that prevents AI agents to call

  276. 14:01

    call that dependency. Moreover, it also

  277. 14:04

    prevents cascading failures when for

  278. 14:06

    instance the downstream dependency is uh

  279. 14:10

    unhealthy or uh is saturated.

  280. 14:14

    It is also important to assign rate

  281. 14:16

    limits and budgets. Uh an agent can uh

  282. 14:21

    go over uh can run your cost uh if it's

  283. 14:24

    not assigned proper budgets and rate

  284. 14:26

    limits. it will uh keep retrying and try

  285. 14:30

    try to uh try to solve the problem that

  286. 14:33

    if it if it's facing. So it is important

  287. 14:36

    that it is uh that we have uh set up max

  288. 14:39

    turns, max parallelism, max spend uh to

  289. 14:42

    ensure that the model is not uh uh not

  290. 14:46

    uh crossing the uh the budget boundary

  291. 14:49

    that we have set.

  292. 14:52

    Moreover, uh ideally uh usually whenever

  293. 14:58

    we are building AI agents, uh we usually

  294. 15:02

    try to give all the permissions that it

  295. 15:03

    can have to ensure that it has all that

  296. 15:06

    it can perform perform the task that we

  297. 15:08

    have. That's the that's the uh first uh

  298. 15:14

    uh thing that we have that that's the

  299. 15:16

    first step that we take usually that to

  300. 15:19

    give the AI agents all the uh cred all

  301. 15:21

    the uh privileges to perform any actions

  302. 15:25

    like for instance if it's interacting

  303. 15:27

    with the database we just give it all uh

  304. 15:30

    the readr access to the entire table.

  305. 15:32

    However,

  306. 15:34

    uh it is important to give scoped

  307. 15:37

    credentials to it. There should be

  308. 15:39

    separate read and write permissions and

  309. 15:41

    there should be allow list for the tools

  310. 15:43

    that it can call. A harmless model can

  311. 15:47

    become dangerous when it can perform

  312. 15:49

    unsafe operations. Moreover, uh a human

  313. 15:53

    approval shouldn't be tied uh to a

  314. 15:56

    blanket approval. It should be tied to

  315. 15:59

    uh action, timestamp, actor and

  316. 16:03

    expiration. So for instance, if a user

  317. 16:06

    has given uh an approval to approve a

  318. 16:10

    $30 refund, it shouldn't turn into a

  319. 16:13

    subsequent approval for $300 refund.

  320. 16:17

    It is important that whenever an

  321. 16:20

    approval is given, it should be tied to

  322. 16:24

    the particular parameters that it was uh

  323. 16:28

    asked for.

  324. 16:31

    So, uh observability is an important

  325. 16:36

    requirement when building AI agents

  326. 16:38

    because uh

  327. 16:41

    and logs are not enough. Teams need to

  328. 16:43

    reconstruct when an agent failed, what

  329. 16:45

    happened, what information was was it

  330. 16:48

    reacting to and why it failed. And logs

  331. 16:51

    alone are not enough to uh for an agent

  332. 16:55

    to uh for teams to determine that.

  333. 16:59

    It is important to trace the model that

  334. 17:01

    was called, the prompt that was uh that

  335. 17:04

    was uh given to it and uh also the tool

  336. 17:08

    calls that were made uh the request uh

  337. 17:11

    that was made, the response from the

  338. 17:14

    tool, the errors that it got, the

  339. 17:16

    retrieved context, what the agent was uh

  340. 17:19

    was the the retrieved information that

  341. 17:22

    the agent was reacting to, the rights

  342. 17:24

    that it made, and the approvals that it

  343. 17:26

    got and so on.

  344. 17:31

    So uh I would like to uh end with uh the

  345. 17:37

    idea that yes model capability matters.

  346. 17:40

    Having good models uh improves the uh

  347. 17:44

    likelihood of it making uh correct

  348. 17:47

    operations. Smarter models reduce

  349. 17:49

    mistakes. It uh it uh improves the

  350. 17:54

    capability that the model has. However,

  351. 17:56

    it cannot eliminate network failures,

  352. 17:59

    stale data or adversarial input. It is

  353. 18:03

    important when building this

  354. 18:04

    architecture,

  355. 18:06

    we also reason about can we bound,

  356. 18:09

    observe and recover from actions

  357. 18:12

    performed by the AI agent. It is

  358. 18:14

    important to have tool contracts in

  359. 18:16

    place to ensure that uh it is only

  360. 18:21

    allowed to make uh operations that it is

  361. 18:23

    uh given that it is provided the

  362. 18:25

    contract and the contracts are clearly

  363. 18:27

    establishing the request and response uh

  364. 18:30

    response uh response types uh the schema

  365. 18:35

    and all these tools have item potency

  366. 18:37

    baked into it. so that uh when repeated

  367. 18:41

    requests are sent in uh it is not

  368. 18:43

    causing unsafe operations to be retried.

  369. 18:46

    Moreover, there should be source of

  370. 18:48

    truth decisions made uh when there are

  371. 18:50

    conflict conflicting uh memory states.

  372. 18:53

    It is important uh for the agent to

  373. 18:56

    realize this is the source of data that

  374. 18:58

    it should rely on and we should have re

  375. 19:01

    retry policies uh like rate limits set

  376. 19:05

    in to ensure that the agent is not uh

  377. 19:07

    retrying uh ext uh aggressively.

  378. 19:11

    Moreover, uh permissions should be set

  379. 19:15

    up. There should be traces and recovery

  380. 19:17

    paths. So

  381. 19:20

    when building AI agents, we should also

  382. 19:23

    ask what the system lets it do when it

  383. 19:26

    is wrong.

  384. 19:28

    Thank you.

  385. 19:46

    >> [music]