Agents Are Where Microservices Were in 2015 — Roberto Milev & Uday Kanagala, Navan

AI Engineer · 19 min · 191 sentences · from YouTube's caption track

Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.

  1. 00:01[music]
  2. 00:13Right.
  3. 00:14Hello, everybody.
  4. 00:15Um welcome to our talk.
  5. 00:17My name is Roberto Milev.
  6. 00:18I am the chief architect at Navan.
  7. 00:21And I have Uday here, who's also part of the architecture team.
  8. 00:25Uh Navan is a travel and expense management company.
  9. 00:30And we'll share with you some of our learnings around how you run an AI and what have we uh discovered.
  10. 00:37So, uh if you've been long enough um in this industry, you remember that over time there are a few paradigm shifts.
  11. 00:47And we all tend to jump on a bandwagon and try to uh kind of do things, all right?
  12. 00:53Last time was when we all jumped on the microservices bandwagon.
  13. 00:58And out of that, a lot of good things came out, like container orchestration, Kubernetes.
  14. 01:04Then we had service mesh, uh circuit breakers, all of those good things.
  15. 01:10But it didn't happen overnight.
  16. 01:12Like it took a long time.
  17. 01:14It took some time for us to learn how to do these things.
  18. 01:18So, one of the quotes from there is, "If you can't build a well-structured monolith, why even try to build microservices?"
  19. 01:25Uh it kind of translates today because if you can't build a single agentic loop, why go in and try to build a multi-agent orchestrated system?
  20. 01:37So, over time, just like previously, uh a reference architecture is emerging.
  21. 01:44So, we have learned a few things by by doing in production.
  22. 01:50We have a lot of agents, a lot of tokens per day being used.
  23. 01:55And as I said, there are few layers that have standardized, that have crystallized around what do we need to run agentic flows reliably in production.
  24. 02:07Runtime memory, context management, all around operational cross-cutting concerns, and around orchestration as well.
  25. 02:16So, today we'll go over some of these layers, all of these layers actually, and we will show kind of where the industry is, what we have done, what we have learned,
  26. 02:26and and so on.
  27. 02:28So, starting at the runtime layer, we've talked a lot and we've built a lot of services in order to scale them statelessly before.
  28. 02:40And now we're in a new world where, you know, agents are stateful by nature.
  29. 02:44They need to have persistent sessions.
  30. 02:48They need to have isolation.
  31. 02:50Their life cycle is different than the life cycle of a traditional API service, and so on.
  32. 02:57So, the cloud providers have jumped in and try to fill this gap.
  33. 03:03Um, you know, AWS, GCP, Azure, they all have a some incarnation of a agentic runtime.
  34. 03:13If you scan the QR code for this slide and for the following slides, you will see a comparison of some of the features and how different cloud providers try to try to
  35. 03:23approach this.
  36. 03:25At Nvono, we run everything on AWS.
  37. 03:28AWS has an agent core runtime.
  38. 03:31We heavily use that, but we have filled some gaps around that, like the session persistence and rehydration is something that we have built.
  39. 03:41And we also run a bunch of other bunch of SDKs for writing agents.
  40. 03:47And part of these runtimes is typically they are framework agnostic, although they all prefer their native framework in a way.
  41. 03:57Um the next layer in the stack is around memory.
  42. 04:03Um we started with rag.
  43. 04:05Rag was kind of a big thing for a while.
  44. 04:08We were kind of driven to that out of necessity because you cannot fit an unlimited amount of context into an agent.
  45. 04:18And over time um all of these cloud providers and the industry has implemented a pipeline where memory is kind of automatically generated by following a workflow of ingestion, extraction,
  46. 04:32and then consolidation and retrieval.
  47. 04:34And there are parts of rag that are built in things like a long-term memory that inherently has some semantic characteristics.
  48. 04:43But memory is built up over time from short-term conversational memory to long-term memory that you kind of manage yourself.
  49. 04:51Uh then episodic memories about kind of instances that worked well and didn't work well.
  50. 04:57Uh and so on.
  51. 04:58We at Navan again being a AWS shop, um utilize their agent core memory.
  52. 05:06But we are also kind of doing it in a way that uh matches matches our our use case.
  53. 05:14And then the next thing is context management.
  54. 05:16You know, it's a hot topic.
  55. 05:18It was a hot topic and it's still a hot topic.
  56. 05:20Context windows are growing bigger, but there's never enough context or if there is too much context again, agents struggle with that cuz you lose focus and so on.
  57. 05:31Um what we found working is that uh focusing on skills as a unit of context.
  58. 05:38And I'll explain what I mean by that.
  59. 05:40Uh we look at skills as both having context, meaning instructions and uh setup about a certain domain or a task.
  60. 05:49And there's also the the second part of the skill, which is the tool execution and you know, the agentic part.
  61. 05:56And we compose context dynamically out of skills that we use as units of work that are pluggable, that we can test independently, and that we can reuse.
  62. 06:11So, for example, when we are we have an agent, we have skills that are that are specific to a domain.
  63. 06:19And based on that, we compose them.
  64. 06:21And we rely on the you know, the progressive disclosure, which is a feature of the skills itself to start with a limited scope of context and then expand by included
  65. 06:34metadata further down the the line.
  66. 06:39I'll hand it over to Uday Uday now to kind of walk us through the rest of this.
  67. 06:44Thanks, Rudra.
  68. 06:46All right.
  69. 06:47Can I have a quick show of hands here who have who had built an agent uh which failed halfway through multi 20 20 step or 30 step process and be able to figure out quickly
  70. 07:00or reason about why the agent failed.
  71. 07:05So, again, logs we've generally been traditionally with microservices, we all are familiar with logs.
  72. 07:11There's logs out there and then we go check out the logs.
  73. 07:13But this changes everything the moment we switch to agents.
  74. 07:17Agents output a lot of thinking.
  75. 07:20There's too much to consume.
  76. 07:22So, that's not the right way to do it, right?
  77. 07:23So, traditionally, that was the way, but our thought has to be changed right now.
  78. 07:28In the in the way they Claude as an example, when we take Claude as an example for an agent, there is hooks and we can intercept everything that Claude as an agent that does at that level.
  79. 07:40So, what kind of tool it calls, right?
  80. 07:43What kind of decision it's making?
  81. 07:44So, before pre-tool and post-tool call or a pre-decision or a post-decision, so all of that are a point point in time for us to intercept and make a decision
  82. 07:54and either block to do a blocking operation or to log in metric or emit a metric, right?
  83. 08:01So, this is a critical place where we can emit auto traces.
  84. 08:06At Nvone, we use one of our provider to interest to emit these auto traces and through these traces we should be able to figure out the spans, the traces and at what point in time where the agent is stuck,
  85. 08:20which gives much more confidence into how we operate and build the agent.
  86. 08:26This is day-to-day operational challenge.
  87. 08:29Building agent these days there's so many frameworks, but how do you navigate building and operating an agent later is primary concern.
  88. 08:37Um And moreover, the reasoning chain, the thought process and critical signals that we emit here as part of the trace captures, we emit a few primary signals here.
  89. 08:50What is the current goal the agent is going through, the reasons behind its operations and the belief status and the tool calls that it's making.
  90. 08:58So, this kind of gives us a judgment pointers.
  91. 09:00Um Um in the traces.
  92. 09:03And when we make when the agent makes a decision, there is a confidence score, how confident it is when it makes the judgment, right?
  93. 09:12So, whether there are multiple paths that it leads to this choice or whether this is an inferred answer.
  94. 09:18So, basically these are signals that gives us confidence later to review.
  95. 09:22If this is an inferred answer, there could be a human in the loop to guide through and tweak the agent to perform a little better.
  96. 09:32Again, um Can I have a raise of hands again to see how confident are you like 100% confident in testing pipelines with your agents?
  97. 09:43Right.
  98. 09:43So, this is one of the other um critical aspect today.
  99. 09:49Um Because agents are non-deterministic.
  100. 09:53We've all been used to program and write much more deterministic flows.
  101. 09:57And we know how it works.
  102. 10:00The Can I ask an engineer?
  103. 10:01Engineer can come and tell me how this the algorithm, the sequence of operations.
  104. 10:05Everything is programmed in our mind.
  105. 10:06Everything is expectations.
  106. 10:08But now the agents come into a non-deterministic way.
  107. 10:10And how do we test them, right?
  108. 10:11So, that is very criticality here.
  109. 10:14And yeah.
  110. 10:15We are also struggling.
  111. 10:17Um we've uh started doing building agents.
  112. 10:20We the day to operations was challenging and then we failed in a lot of steps.
  113. 10:24How do we course correct?
  114. 10:25The moment we change something, something else broke breaks, right?
  115. 10:29So, how do we do that?
  116. 10:30Um one one approach that we took uh this is from um research papers uh around the in a multi-step uh orchestration, when an agent makes uh 30 steps or decisions to make to reach to a goal,
  117. 10:46if that is a program or that's a different story.
  118. 10:49But this is not a program.
  119. 10:50This is non-deterministic way of It makes up its own steps every time uh differently.
  120. 10:58So, how can we chart a deterministic graph here?
  121. 11:03Is it possible?
  122. 11:04No. Can we have a trajectory of its starting from an end to a goal and then see how much how far it went in the trajectory and how far it went from the source to the destination
  123. 11:17is what we can compute to evaluate the efficiency or the completeness of the agent agent evaluation.
  124. 11:26So, we we heavily rely on um trajectory vals um and uh this There are few other signals uh as I briefly spoke around uh in the previous slide around the inferred signal.
  125. 11:38Um If the answer is from an in in inferred answer, uh how can we uh loop that into uh and make a signals around uh how can we classify that this is a regression and make fixes towards the agent?
  126. 11:59Uh So, the next is the uh guardrails.
  127. 12:06Um Where Is this the one?
  128. 12:12Yeah.
  129. 12:15So, guardrails and authorization, um this is uh critical displays a critical role in enterprise AI.
  130. 12:24A lot of information is being piped to models.
  131. 12:28Um there could be sensitive information that goes into it uh without our knowledge.
  132. 12:33And we as uh uh leaders, how can we put in this governance layer um to stop this um is very uh critical here.
  133. 12:43And and the concept of uh authentication and authorization um is taking up a different approach here.
  134. 12:51Um traditionally, we've seen um a user or a service account, but now what is an agent?
  135. 12:57Agent can be acting as on behalf of users.
  136. 13:00There is so much of things uh so many of use cases there.
  137. 13:03Hey, book me a flight whenever it's cheaper than $200, right?
  138. 13:07So, we just tell this assertion and then agent go figures out and does this action on behalf of me.
  139. 13:12So, is it me making this purchase or is it agent me making on behalf of me?
  140. 13:17So, there is Agent acts as a on behalf of user or agent uses a service account as well.
  141. 13:24So, the line is being blurred here and we need to make fine-grained authorization decisions here, and the policy layer that's where the guardrails and authentication authorization plays a critical role.
  142. 13:36And in the one what we employ here is before every tool call pre-tool and post-tool, we have this guardrails to check and block and make a informed decisions.
  143. 13:52And this single agent versus multi-agent, again, this is kind of a orchestration wars you can think of with it to build a single agent or a multi-agent.
  144. 14:03Again, as Roberto briefly hinted if you can't perfect and build a single agent, why go towards multi-agent, right?
  145. 14:12So, learn from our uh failures, experiences, and build towards that.
  146. 14:18At Navan, yeah.
  147. 14:20What the approach that we have taken is single master, and then we adopted sub-skills.
  148. 14:26Um There are sub-agents within it.
  149. 14:29So, it's a single agent that can progressively load the skills and understand decisively what needs to be loaded into the context, and then make this navigation through the use case.
  150. 14:44But there are other patterns that are also emerging.
  151. 14:48There are different class of use cases here.
  152. 14:50One is um agent-to-agent communication.
  153. 14:53So, there are If you take a large scale organization, and there are so many of these teams that are that are acting as the boundaries, and they don't talk to each other, let's say.
  154. 15:02How do we communicate?
  155. 15:03There are two agents on either of the side, right?
  156. 15:06How do we do it?
  157. 15:07So, there is A2A protocol which can help us establish the contracts in terms of skills.
  158. 15:14And we can use A2A as a protocol there, which kind of is a boundary between the teams.
  159. 15:22Yeah, over to you, Uday.
  160. 15:29All right.
  161. 15:29So, as we went through the stack, it's obvious that um some components of the stack are in a more mature state and we already have good answers for them.
  162. 15:40As Uday said, the runtime, I think it's pretty much solved.
  163. 15:43We are so advanced in orchestration and we are running LLMs in kind of uh a very uh brute-force way.
  164. 15:51So, scaling is not a not a problem.
  165. 15:53Also, memory, I think uh as uh the frontier LLMs get better and as our practices get better, we will uh find a way to cover the majority of the use cases and there is good maturity around the the cloud providers.
  166. 16:10Uh MCP has emerged as the de facto protocol and tool calling is now a feature that everybody supports.
  167. 16:18So, we are seeing some industry convergence around that as well and MCP as a standard is also evolving.
  168. 16:25Now, it's becoming stateless.
  169. 16:27It's uh we are reaching a point where kind of we know how to invoke uh services and and and tools with agents.
  170. 16:35Uh in some areas, things are happening, but you know, there's still a lot of unknown.
  171. 16:41Around observability, there is a push towards OTEL, but does OTEL really work for agentic calls?
  172. 16:49Uh yeah, you can make it work as Uday was saying.
  173. 16:52Um also, we are getting more comfortable around um around that the the the the testing patterns.
  174. 16:59It's very hard to test, but we have found a way to give customers um quality experiences even with the unreliability of agentic system and I think that's kind of
  175. 17:09uh getting in a in a state that is uh that is more better defined.
  176. 17:15Orchestration is another one um, where, you know, we have a uh, we have patterns, uh, we can build, you know, bigger agents, smaller agents.
  177. 17:27Uh, as we said previously, probably the right answer is to not over-engineer.
  178. 17:34Uh, so we're learning there and and and uh, a pattern of school thought is also emerging.
  179. 17:41Uh, where we're all struggling with and the previous talk was about this for the developer, um, AI assistant development perspective, but also we're seeing these issues from our production agents.
  180. 17:54It's very hard to predict cost and it's very hard to manage cost, uh, and put guardrails and solve this in a way where there is reliable, maybe fallback or have agents be,
  181. 18:07uh, using cheaper models for certain tasks.
  182. 18:11Uh, uh, this is all driven by kind of the big AI vendors who, I think, their interest is for us all to spend more tokens.
  183. 18:21Um, replay and debugging, Woody talked about that, that's also a big big issue.
  184. 18:26It's very hard to understand, but I think this is also something that that is going to be solved because we can now use, uh, agents to uh, get over the cognitive overload of trying to debug
  185. 18:41what they do.
  186. 18:43And then standards, um, standards are emerging uh, by, you know, the community.
  187. 18:50Uh, Hotel, as I mentioned, agent to agent is young, it's kind of pushed by certain vendors, but I think over time we will we will get, uh, there.
  188. 19:00Uh, with all of this said, you know, we know what we need and it's up to us to write and build it.
  189. 19:07Thank you, everybody.
  190. 19:09[applause]
  191. 19:27I