Hello everybody. Welcome to our talk. My name is Roberto Milev. I am the chief architect at Navan, and I have Uday here, who is also part of the architecture team. Navan is a travel and expense management company, and we'll share with you some of our learnings around how we run AI and what we have discovered.
So if you've been long enough in this industry, you remember that over time there are a few paradigm shifts, and we all tend to jump on a bandwagon and try to do things right. Last time was when we all jumped on the microservices bandwagon, and out of that a lot of good things came out, like container orchestration, Kubernetes. Then we had service mesh, circuit breakers, all of those good things. But it didn't happen overnight. It took a long time. It took some time for us to learn how to do these things.
So one of the quotes from there is, if you can build a well-structured monolith, why even try to build microservices? It translates today because if you can't build a single agentic loop, why go in and try to build a multi-agent orchestrated system?
So over time, just like previously, a reference architecture is emerging. We have learned a few things by doing in production. We have a lot of agents, a lot of tokens per day being used. And as I said, there are a few layers that have standardized, that have crystallized around what we need to run agentic flows reliably in production: runtime, memory, context management, all around operational cross-cutting concerns, and around orchestration as well. So today we'll go over some of these layers, all of these layers actually, and we will show where the industry is, what we have done, what we have learned, and so on.
So 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. And now we're in a new world where agents are stateful by nature. They need to have persistent sessions, they need to have isolation, their life cycle is different than the life cycle of a traditional API service, and so on. So the cloud providers have jumped in and tried to fill this gap. AWS, GCP, Azure, they all have some incarnation of an agentic runtime. If 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 approach this.
So, at Navan, we run everything on AWS. AWS has an agent core runtime. We heavily use that, but we have filled some gaps around that, like the session persistence and rehydration is something that we have built. And we also run a bunch of other SDKs for writing agents. And part of these runtimes is typically that they are framework agnostic, although they all prefer their native framework in a way.
The next layer in the stack is around memory. We started with RAG. RAG was a big thing for a while. We were driven to that out of necessity because you cannot fit an unlimited amount of context into an agent. And over time, all of these cloud providers and the industry have implemented a pipeline where memory is automatically generated by following a workflow of ingestion, extraction, and then consolidation and retrieval. And there are parts of RAG that are built in, things like a long-term memory that inherently has some semantic characteristics. But memories build up over time from short-term conversational memory to long-term memory that you manage yourself, then episodic memories about instances that worked well and didn't work well, and so on. We at Navan, again being an AWS shop, utilize their agent core memory, but we are also doing it in a way that matches our use case.
And then the next thing is context management. It's a hot topic. It was a hot topic, and it's still a hot topic. Context windows are growing bigger, but there's never enough context. Or if there is too much context, again, agents struggle with that because you lose focus, and so on.
What we found working is focusing on skills as a unit of context. And I'll explain what I mean by that. We look at skills as both having context, meaning instructions and setup about a certain domain or a task. And there's also the second part of the skill, which is the tool execution and the agentic part. And 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.
So, for example, when we have an agent, we have skills that are specific to a domain. And based on that, we compose them. And we rely on the progressive disclosure, which is a feature of the skills itself, to start with the limited scope of context and then expand by included metadata further down the line. I'll hand it out to Ude now to walk us through the rest of this. Thanks, Ruta. All right. Can I have a quick show of hands here? Who had built an agent which failed halfway through a multi-20-step or 30-step process and been able to figure out quickly or reason about why the agent failed?
So, again, logs. Traditionally with microservices, we all are familiar with logs. There's logs out there and then we go check out the logs. But this changes everything the moment we switch to agents. Agents output a lot of thinking. There's too much to consume. So that's not the right way to do it. Traditionally, that was the way, but our thought has to be changed now.
In the way the cloud, as an example, when we take cloud as an example for an agent, there's hooks, and we can intercept everything that cloud as an agent does at that level. So what kind of tool it calls, what kind of decision it's making. So before pre-tool and post-tool call, or pre-session or post-session, all of that are points in time for us to intercept and make a decision and either do a blocking operation or to log a metric or emit a metric. So this is a critical place where we can emit OTL traces. At Navan, we use one of our provider Braintrusts to emit these OTL traces. And through these traces, we should be able to figure out the spans, the traces, and at what point in time the agent is stuck, which gives much more confidence into how we operate and build the agent.
This is a day-two operational challenge. Building an agent is this. There's so many frameworks, but how you navigate building and operating an agent later is a primary concern now. 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. What 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. So this gives us judgment pointers in the traces. And when the agent makes a decision, there is a confidence score, how confident it is when it makes this judgment. So whether there are multiple paths that lead to this choice, or whether this is an inferred answer. These are signals that give us confidence later to review. If 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.
Again, can I have a raise of hands again to see how confident you are, 100% confident, in testing pipelines with your agents? Right? So this is one of the other critical aspects today. Because agents are non-deterministic. We've all been used to programming and writing much more deterministic flows. And we know how it works. When I ask an engineer, the engineer can come and tell me how the algorithm, the sequence of operations, everything is programmed in our mind, everything is expectations. But now the agents come in a non-deterministic way. And how do we test them? So that is very critical here.
And yeah, we are also struggling. We've started building agents. The day-two operations was challenging, and then we failed in a lot of steps. How do we course-correct? The moment we change something, something else breaks. So how do we do that?
One approach that we took, this is from research papers around the concept of trajectory. In a multi-step orchestration, when an agent makes 30 steps or decisions to reach a goal, if that is a program, that's a different story. But this is not a program. This is a non-deterministic way of doing it. It makes up its own steps every time differently. So how can we chart a deterministic graph here? Is it possible? No. Can we have a trajectory of it 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 is what we can compute to evaluate the efficiency or the completeness of the agent evaluation?
So we heavily rely on trajectory evals. And there are a few other signals, as I briefly spoke around in the previous slide, around the inferred signal. If the answer is from an inferred answer, how can we loop that in and make a signal on how we can classify that this is a regression and make fixes towards the agent? So next is the guardrails. Where? Is this the one? Yeah. So guardrails and authorization. This displays a critical role in enterprise AI. A lot of information is being piped to models. There could be sensitive information that goes into it without our knowledge. And we as leaders, how can we put in this governance layer to stop this is very critical here.
And the concept of authentication and authorization is taking up a different approach here. Traditionally, we've seen a user or a service account. But now, what is an agent? An agent can be acting on behalf of users. There are so many use cases there. Hey, book me a flight whenever it's cheaper than $200. So we just tell this assertion, and then the agent goes and figures out and does this action on behalf of me. So is it me making this purchase, or is it agent me making it on behalf of me? So 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.
And in Navan, what we employ here is before every tool call, pre-tool and post-tool, we have these guardrails to check and block and make informed decisions. And this single-agent versus multi-agent, again, this is orchestration wars. You can think of whether to build a single agent or a multi-agent. Again, as Roboto briefly hinted, if you can't perfect and build a single agent, why go towards multi-agent? So learn from our failures, experiences, and build towards that.
At Navan, the approach that we have taken is a single master, and then we adopted sub-skills. There are sub-agents within it. So 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.
But there are other patterns that are also emerging. There are different classes of use cases here. One is agent-to-agent communication. So if you take a large-scale organization and there are so many of these teams that are acting as boundaries and they don't talk to each other, how do we communicate? There are two agents on either side, right? How do we do it? So there is A2A protocol which can help us establish the contracts in terms of skills, and we can use A2A as a protocol there, which is a boundary between the teams. Yeah, over to your food.
All right. So as we went through the stack, it's obvious that some components of the stack are in a more mature state, and we already have good answers for them. As I said, the runtime, I think it's pretty much solved. We are so advanced in orchestration, and we are running LLMs in a very brute-force way, so scaling is not a problem. Also, memory, I think as the frontier LLMs get better and as our practices get better, we will find a way to cover the majority of the use cases, and there is good maturity around the cloud providers.
MCP has emerged as a de facto protocol, and tool calling is now a feature that everybody supports. So we are seeing some industry convergence around that as well, and MCP as a standard is also evolving. Now it's becoming stateless. We are reaching a point where we know how to invoke services and tools with agents. In some areas, things are happening, but there's still a lot of unknown around observability. There is a push towards Otel, but does Otel really work for agentic calls? Yeah, you can make it work, as Uday was saying.
Also, we are getting more comfortable around the testing patterns. It's very hard to test, but we have found a way to give customers quality experiences even with the unreliability of agentic systems, and I think that's getting in a state that is more or better defined. Orchestration is another one where we have patterns. We can build bigger agents, smaller agents. As we said previously, probably the right answer is to not over-engineer. So we are learning there, and a pattern of school thought is also emerging.
Where we're all struggling with, and the previous talk was about this from the developer AI-assisted development perspective, but also we are seeing these issues from our production agents, it's very hard to predict cost and it's very hard to manage cost and put guardrails and solve this in a way where there is a reliable fallback maybe, or have agents be using cheaper models for certain tasks. This is all driven by the big AI vendors who I think, their interest is for us all to spend more tokens.
Replay and debugging, Uday talked about that. That's also a big, big issue. It's very hard to understand, but I think this is also something that is going to be solved because we can now use agents to get over the cognitive overload of trying to debug what they do. And then standards. Standards are emerging by the community. Hotel, as I mentioned, agent to agent is young. It's pushed by certain vendors, but I think over time we will get there. With all of this said, we know what we need, and it's up to us to go ahead and build it. Thank you, everybody. Thank you. Thank you.
And we compose context dynamically out of skills that we use as units of works that are pluggable, that we can test independently, and that we can reuse. So, for example, when we are we have an agent, we have skills that are specific to a domain. And based on that, we compose them. And we rely on the, you know, the progressive disclosure, which is a feature of the skills itself, to start with the limited scope of context and then expand by included metadata further down the line. I'll hand it out to Ude now to kind of walk us through the rest of this. Thanks, Ruta. All right. Can I have a quick show of hands here?
Who had built an agent which failed halfway through a multi-20 step or 30 step process and be able to figure out quickly or reason about why the agent failed?
So, again, logs, we've generally been traditionally with microservices. We all are familiar with logs. There's logs out there and then we go check out the logs. But this changes everything the moment we switch to agents. Agents output a lot of thinking. There's too much to consume. So, that's not the right way to do it, right? So, traditionally, that was the way, but our thought has to be changed right now. In the way the cloud, as an example, when we take cloud as an example for an agent, there's hooks and we can intercept everything that cloud as an agent that does at that level. So, what kind of tool
it calls, right? What kind of decision it's making. So, before pre-tool and post-tool call or pre-session or post-session. So, all of that are a point in time for us to intercept and make a decision and either block do a blocking operation or to log a metric or emit a metric, right? So, this is a critical place where we can emit OTL traces. At now on, we use one of our provider brain trusts to emit these OTL 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, which gives much more confidence into how we operate and build
the agent. This is a day two operational challenge. Building agent is this. There's so many frameworks, but how do you navigate building and operating an agent later is a primary concern now. 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. What 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. So, this kind of gives us a judgment pointers in the traces. And when we make, when the agent makes a decision,
there is a confidence score, how confident it is when it makes this judgment, right? So, whether there are multiple paths that it leads to this choice, or whether this is an inferred answer. So, basically, these are signals that gives us confidence later to review. If 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.
Again, can I have a raise of hands again to see how confident are you, like, 100% confident in testing pipelines with your agents? Right? So, this is one of the other critical aspect today. Because agents are non-deterministic. We've all been used to program and write much more deterministic flows. And we know how it works. When I ask an engineer, the engineer can come and tell me how the algorithm, the sequence of operations, everything is programmed in our mind, everything is expectations. But now the agents come into a non-deterministic way. And how do we test them? Right? So, that is very critical here. And, yeah, we are also struggling. We've started
doing building agents. The day-to operations was challenging. And then we failed in a lot of steps. How do we course correct? The moment we change something, something else breaks, right? So, how do we do that? One approach that we took, this is from research papers around the concept of trajectory. Like, in a multi-step orchestration, when an agent makes 30 steps or decisions to make to reach to a goal, if that is a program or that's a different story. But this is not a program. This is non-deterministic way of… It makes up its own steps every time differently. So, how can we
chart a deterministic graph here? Is it possible? No. 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 is what we can compute to evaluate the efficiency or the completeness of the agent evaluation? So, we heavily rely on trajectory evals. And there are a few other signals, as I briefly spoke around in the previous slide, around the inferred signal. If the answer is from an inferred answer, how can we loop that into and make a signal that on how can we classify that this is a regression and make fixes towards the agent?
So, next is the guardrails. Where?
Is this the one? Yeah. So, guardrails and authorization. This is critical… displays a critical role in enterprise AI. A lot of information is being piped to models. There could be sensitive information that goes into it without our knowledge. And we as leaders, how can we put in this governance layer to stop this is very critical here. And the concept of authentication and authorization is taking up a different approach here. Traditionally, we've seen a user or a service account. But now, what is an agent? Agent can be acting as on behalf of users. There
is so much of things, so many of use cases there. Hey, book me a flight whenever it's cheaper than $200, right? So, we just tell this assertion and then agent go figure out and does this action on behalf of me. So, is it me making this purchase or is it agent me making on behalf of me? So, there is… Agent acts as a… on behalf of user or agent user service account as well. So, 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. And in Navan,
what we employ here is before every tool call, pre-tool and post-tool, we have these guardrails to check and block and make informed decisions. And this single agent versus multi-agent, again, this is kind of orchestration wars you can think of whether to build a single agent or a multi-agent. Again, as Roboto briefly hinted, if you can't perfect and build a single agent, why go towards multi-agent, right? So, learn from our failures, experiences and build towards that. At Navan, yeah, the approach that we have taken is a single master and then we adopted sub-skills. There are sub-agents within it. So,
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. But there are other patterns that are also emerging. There are different class of use cases here. One is agent-to-agent communication. So, there are, if you take a large-scale organization and there are so many of these teams that are acting as a boundaries and they don't talk to each other, let's say, how do we communicate? There are two agents on either of this side, right? How do we do it? So, there is A2A protocol which can help us
establish the contracts in terms of skills and we can use A2A as a protocol there, which kind of is a boundary between the teams. Yeah, over to your food.
All right. So, as we went through the stack, it's obvious that some components of the stack are in a more mature state and we already have good answers for them. As I said, the runtime, I think it's pretty much solved. We are so advanced in orchestration and we are running LLMs in kind of a very brute force way. So, scaling is not a problem. Also, memory, I think as the frontier LLMs get better and as our practices get better, we will find a way to cover the majority of the use cases and there is good maturity around the cloud providers. MCP has emerged as a de facto protocol and tool calling is now a
feature that everybody supports. So, we are seeing some industry convergence around that as well and MCP as a standard is also evolving. Now, it's becoming stateless. We are reaching a point where kind of we know how to invoke services and tools with agents. In some areas, things are happening, but you know, there's still a lot of unknown around observability. There is a push towards Otel, but does Otel really work for agentic calls? Yeah, you can make it work as Uday was saying. Also, we are getting more comfortable around the testing patterns. It's very hard to test, but we have found a way to give
customers quality experiences even with the unreliability of agentic system and I think that's kind of getting in a state that is more or better defined. Orchestration is another one one where, you know, we have patterns. We can build, you know, bigger agents, smaller agents. As we said previously, probably the right answer is to not over-engineer. So, we are learning there and a pattern of school thought is also emerging. Where we're all struggling with, and the previous talk was about this for the developer AI assisted development perspective, but also we are seeing these issues from our production agents. It's very hard to predict cost and it's very hard to manage cost
and put guardrails and solve this in a way where there is a reliable maybe fallback or have agents be using cheaper models for certain tasks. This is all driven by kind of the big AI vendors who I think their interest is for us all to spend more tokens. Replay and debugging, Uday talked about that. That's also a big, big issue. It's very hard to understand, but I think this is also something that is going to be be solved because we can now use agents to get over the cognitive overload of trying to debug what they do. And then standards. Standards are emerging by, you know, the community. Hotel, as I mentioned,
agent to agent is young. It's kind of pushed by certain vendors, but I think over time we will get there. With all of this said, you know, we know what we need and it's up to us to go ahead and build it. Thank you, everybody. Thank you. Thank you.