# Paving the Road to Production: Governed Enterprise AI Agents

Harish Gaggar · AI Engineer NYC 2026 · October 14

[Watch recording](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14322s)

[03:58:42](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14322s) Hello, everyone.

[03:58:43](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14323s) I would like to walk you through that how we can transition in AI agents from an experiment

[03:58:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14328s) to the real enterprise environment.

[03:58:50](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14330s) So before I begin, a quick introduction about me.

[03:58:53](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14333s) My name is Harish Gaggar.

[03:58:55](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14335s) I'm a senior staff software engineer at Intuit Credit Karma,

[03:58:58](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14338s) where I built and own the AI analytics infrastructure and services.

[03:59:03](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14343s) And beside that, I'm advisor, author, researchers,

[03:59:08](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14348s) and also a program committee members for various organizations

[03:59:12](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14352s) where I mentor the young researchers as well.

[03:59:14](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14354s) All right.

[03:59:16](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14356s) So let's walk through the agenda here.

[03:59:21](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14361s) So first, we would like to talk about what are the challenges we have when we build an AI agents and deploy into the production systems and how we can build a different framework to address that different challenges here.

[03:59:34](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14374s) Then how the architecture looks like for it.

[03:59:37](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14377s) Then how you can build your own MCP servers and MCP gateway.

[03:59:43](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14383s) and then some monitoring on top of that gateway as well.

[03:59:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14388s) Then further, we're going to talk about what are the different type of agent framework you can have

[03:59:53](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14393s) and then some additional framework around managing the memories, tracking and eval,

[03:59:59](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14399s) how you can

[04:00:00](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14400s) block the PII data going before the LLMs, and then Context Optimizer to save your token.

[04:00:07](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14407s) So without delay, let me walk you through the challenge. Of course, there are many agents that generally get failed in production because their foundation controls are missing.

[04:00:18](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14418s) And the key reason behind is that, you know, like most of the people are missing the gateway to make sure that the agent can, you know, communicate to the gateway to get authenticated first with the right auth providers so that they can redirect to the right MCP servers.

[04:00:35](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14435s) Right. Second, that MCP servers are missing the right tool to execute your query.

[04:00:40](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14440s) Third, do we have like enough tracking and evaluation system to make sure that every query when you are sending to the agents, whether they've been tracked or not, and are you evaluating their quality response or not?

[04:00:52](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14452s) Right. Do we have any memory management system or not?

[04:00:55](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14455s) In terms of, let's say you are doing the interaction with agent for long or for many days, is it able to recall that what you have been asked in the past?

[04:01:03](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14463s) Right. And then there are other framework, of course, like do you have a context optimizers to save the token?

[04:01:09](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14469s) or do you have enough production in place

[04:01:11](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14471s) to make sure that any secrets should not go into LLM

[04:01:14](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14474s) or tracking or tracing or any memory DB or so, right?

[04:01:18](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14478s) So a lot of open questions.

[04:01:20](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14480s) So in order to resolve this,

[04:01:23](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14483s) we are not going to, you know,

[04:01:25](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14485s) like build a magical agent here in this demo.

[04:01:28](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14488s) We're going to talk about like different framework

[04:01:31](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14491s) that you can build to address this.

[04:01:33](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14493s) So first is the agent framework.

[04:01:35](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14495s) This is where like we use the,

[04:01:37](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14497s) So like we choose to use the LangGraph framework, which is provided by LangChain community.

[04:01:42](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14502s) This has helped us in building the task-specific node based on your questions,

[04:01:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14508s) and which is easy to plug in any like marketplace plugins or skills and prompts

[04:01:54](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14514s) to make sure that agents respond efficiently based on your query.

[04:01:59](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14519s) Further, the second part is we are also building the MCP gateway to make sure that whenever agents make the call

[04:02:06](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14526s) or any service account from that agent make the call,

[04:02:09](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14529s) make sure that they are securely get authenticated

[04:02:11](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14531s) to that MCP gateway

[04:02:13](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14533s) and then get redirected to the right MCP servers.

[04:02:16](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14536s) Third is the customized MCP,

[04:02:18](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14538s) which means that you are building your own MCP servers

[04:02:20](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14540s) with the right tool in place to execute your query.

[04:02:23](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14543s) And then finally, some audit

[04:02:25](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14545s) on top of what actually operation you're performing, right?

[04:02:29](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14549s) And then we talk about some additional framework

[04:02:31](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14551s) around, you know, like how you can block the PIA secrets,

[04:02:35](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14555s) how you're going to store the tracking value into the cloud, and how you're going to

[04:02:40](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14560s) purchase the memories, especially any threads and checkpoints on every context. And then also how

[04:02:46](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14566s) you can optimize overall your context to make sure that you don't burn too many tokens when

[04:02:53](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14573s) you run your query. All right. So we'll talk about now the agent infrastructure. So firstly, we'll

[04:03:01](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14581s) go through the local development. The way the approach should be is that, you know, like

[04:03:07](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14587s) whenever you build an agent, right, first you have to register your agent into some system.

[04:03:11](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14591s) You usually tell that, hey, look, this is my, the use case, and these are the use case going to use

[04:03:17](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14597s) for this particular vertical or system. And you feed all those information and generate an ID for

[04:03:23](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14603s) your agent, right? Once you have that, then you can have a dev portal, internal portal, where you

[04:03:28](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14608s) You can ingest all the details saying that, hey, look, this is my agent use case.

[04:03:33](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14613s) This is my agent ID.

[04:03:34](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14614s) This is the framework I'm going to use, either LangGraph, LangChain or so.

[04:03:38](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14618s) These are my language I'm going to use, either Python or TypeScript.

[04:03:41](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14621s) And then you can choose, you know, like your skills or prompts.

[04:03:47](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14627s) And then you submit your information, right, to this.

[04:03:50](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14630s) Once you submit this, the dev portal is going to create a repository, which is going to

[04:03:54](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14634s) contains not just the agent framework like your LangGraph agent framework but is also going to

[04:03:59](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14639s) contains your memory framework your tracking eval framework right and then your context

[04:04:05](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14645s) optimizer framework and your PII blocking in web framework as well so the reason for that is

[04:04:12](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14652s) because not necessarily all your developers are taking care of all this framework right they just

[04:04:19](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14659s) sometimes create the framework

[04:04:21](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14661s) what generally AI assistant tool

[04:04:23](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14663s) are generally support, right?

[04:04:25](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14665s) Or they stick to one or two framework, right?

[04:04:27](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14667s) So we just want to make sure that

[04:04:29](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14669s) when you roll out such framework,

[04:04:32](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14672s) make sure they are consistent across the company

[04:04:34](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14674s) and they can take care of

[04:04:36](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14676s) and they can be centralized in one place

[04:04:38](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14678s) so you can visualize those results as well, right?

[04:04:41](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14681s) So once you have that repository,

[04:04:43](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14683s) so developers basically clone that repository,

[04:04:46](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14686s) they can build their agent

[04:04:47](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14687s) as a Docker image into containers

[04:04:49](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14689s) and test their agent input and output through the query.

[04:04:53](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14693s) And they can also test this on their local memory,

[04:04:55](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14695s) maybe cloud spanner evaluator here.

[04:04:57](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14697s) And you can also store this tracking in some of your DB,

[04:05:00](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14700s) maybe SQLite or maybe BigQuery,

[04:05:03](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14703s) to make sure that agents are fully working on your local.

[04:05:06](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14706s) So once your agents are running in local,

[04:05:09](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14709s) then you're ready to go ahead and generate a PR.

[04:05:12](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14712s) And then once you get your two PR approval,

[04:05:14](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14714s) then it's go to the CI-CD pipeline.

[04:05:16](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14716s) So the PR is basically going to, firstly, is going to register your agent into some centralized agent registry system, which provide a Langfuse URL to it to make sure that you see all the traces.

[04:05:28](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14728s) And then the CI-CD pipeline is basically, you know, whatever the local Docker container you built here is going to build that container into production system.

[04:05:36](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14736s) It will scan that image, make sure that there's no vulnerability.

[04:05:39](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14739s) If everything looks great, security approved, you can move that image back into the registry.

[04:05:45](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14745s) Right. Further, you have your own deployment platform or orchestrator platform, which is going to deploy that agent into the Kubernetes cluster in a given namespace.

[04:05:54](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14754s) Right. So the good part here is that this portal is not just creating the repository.

[04:06:01](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14761s) Right. It also do create a bunch of other production resources.

[04:06:05](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14765s) For example, the workload identity. Right. And then memory DB or tracking and eval tables and then agent secret management.

[04:06:14](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14774s) Right. So it based on whatever the name we provide it, not just again, like not just repository, create all those different resources as well.

[04:06:24](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14784s) So what happened is when this internal orchestrator, when deploy the agents, the agent already know that, hey, what workload identity is supposed to work with.

[04:06:32](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14792s) Right. That binding should already happen. So once this case to GSA binding happens, the agent will start communicating to all these resources.

[04:06:41](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14801s) Once everything in place, agent is further going to communicate to the rest of your endpoint services, like, for example, AI gateway or MCP servers or Langfuse for tracing or some other API endpoints.

[04:06:55](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14815s) So now, firstly, we talk about the MCP server as well.

[04:06:59](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14819s) So we talk about architecture.

[04:07:00](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14820s) Now we're going to the different component.

[04:07:02](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14822s) So MCP server is something that you can definitely use, something which is outside available.

[04:07:07](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14827s) But if you're working on air gap environment, it's highly recommended that you build your own MCP servers.

[04:07:12](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14832s) So, yeah, and you can use the I will not go with the definition.

[04:07:18](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14838s) Everyone knows about it. So the way the framework has been built here is that you can leverage the FastMCP server package or wrapper to, you know, build that MCP servers.

[04:07:29](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14849s) and you can create a different set of tools inside that FastMCP wrapper

[04:07:33](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14853s) to construct the overall servers.

[04:07:37](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14857s) And then you make sure that every tool when you define an MCP server,

[04:07:42](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14862s) they have to be fully reviewed by your own internal security team

[04:07:47](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14867s) to make sure that only authorized tool can be go in production.

[04:07:51](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14871s) And that's how you can enforce some filters, limits, and block the fills,

[04:07:58](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14878s) which is really not required to go to LLM and get you the information,

[04:08:02](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14882s) which is you're not supposed to get.

[04:08:05](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14885s) And third part is, of course, you need to make sure that you build your MCP server

[04:08:09](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14889s) in a way that whenever the traffic is coming from your MCP client to MCP gateway to MCP servers,

[04:08:14](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14894s) either is coming from user or service account,

[04:08:17](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14897s) they has to be authenticated to the MCP gateway first

[04:08:20](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14900s) so that they can access your MCP tool to get that right information.

[04:08:27](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14907s) All right. Now the gateway part. So the how the gateway works. So this is again, you can build it your own internal MCP gateway if you are again working on your air-gap environment. So the way it works is you are working on like local, you know, code assistance tool or maybe your agent. Right.

[04:08:44](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14924s) So the moment you submit your first query to your agent, it will send that one-time authentication request to the MCP gateway.

[04:08:52](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14932s) MCP gateway recognized and take your request.

[04:08:55](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14935s) First, it will save your session state into the Redis.

[04:08:58](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14938s) And then it will return back the JWE access token back to your client.

[04:09:05](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14945s) Once client will receive that JWE token, it will know that what MCP server needs to call.

[04:09:11](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14951s) right so it will submit that tool slash call request on a given namespace slash mcp meaning

[04:09:16](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14956s) let's say artifactory or github slash mcp with the auth bearer uh generally um token um into that

[04:09:23](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14963s) so once mcp gateway um received that uh it will understand that what namespace meaning mcp server

[04:09:29](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14969s) needs to look up for and then it will unwrap that jwe token and then it will attach that user token

[04:09:36](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14976s) in that request and send it to the respective MCP servers.

[04:09:40](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14980s) Now, once MCP server receives it,

[04:09:42](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14982s) it will make that respective API calls

[04:09:44](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14984s) to that endpoint of that, you know, to the service.

[04:09:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14988s) And then it will exchange that ID token

[04:09:50](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14990s) and return the response based on whatever scope

[04:09:53](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14993s) that user is authorized to see, right?

[04:09:56](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14996s) So once the user receives the token,

[04:09:58](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=14998s) you know, MCP

[04:10:00](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15000s) server basically unwrapped all the data, make the payload which is compatible for MCP Gateway to receive, and then finally the final payload will send back to the client to see the data points.

[04:10:11](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15011s) So what it shows is that, you know, like we build this MCP gateway to make sure that we have a centralized authentication and routing hub that securely connect any coding assistant tool or agents to the endpoint via this MCP gateway and MCP server.

[04:10:27](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15027s) There should not be direct access provided on any endpoints.

[04:10:32](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15032s) There has to go through the MCP gateway through proper authentications before they're reaching to the MCP server and the endpoints.

[04:10:40](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15040s) All right.

[04:10:42](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15042s) So now the part is the gateway monitoring, right?

[04:10:46](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15046s) We talk about, again, we talk about architecture,

[04:10:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15048s) we talk about MCP server, MCP gateway.

[04:10:50](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15050s) Now it's a monitoring.

[04:10:51](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15051s) Again, the AI agent cannot be trusted

[04:10:53](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15053s) without continuous monitoring, evaluation, and feedback, right?

[04:10:56](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15056s) This is why we are building the MCP gateway monitoring.

[04:11:00](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15060s) So the way the monitoring work is usually like

[04:11:03](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15063s) the moment you submit any calls to your agent,

[04:11:06](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15066s) it will send all the operation log into the log store.

[04:11:09](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15069s) You can use ELK, Loki, or CloudWatch or so.

[04:11:12](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15072s) And generally, this contains information like, show me all last 401s in my last 10 minutes call, right?

[04:11:19](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15079s) And what did or do when the token refresh failed, right?

[04:11:23](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15083s) So those kind of requests can go to the log store.

[04:11:25](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15085s) Now, there are some traces and metrics data, like real-time data that goes to the OpenTelemetry as well.

[04:11:33](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15093s) OpenTelemetry, again, is open source solutions, which is going to collect all your traces and metrics and is going to process the data.

[04:11:41](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15101s) and redirect to the backend system, right?

[04:11:44](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15104s) And in this case, the traces will go to the Tempo.

[04:11:46](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15106s) This is, again, an open source solutions,

[04:11:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15108s) which is going to store all your traces in terms of, like,

[04:11:52](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15112s) traces in the sense, like, you know, like,

[04:11:53](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15113s) information around, like, which tool was slow on this request,

[04:11:57](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15117s) whether this call is coming from agent or IDE,

[04:12:00](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15120s) what was the exact error on this failed call or so, right?

[04:12:04](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15124s) So these kind of data are going to store into the Tempo.

[04:12:07](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15127s) Oh, my bad. Okay.

[04:12:08](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15128s) And then the metrics is about the Prometheus is all about the information about like what are P95 latencies for a given tool, right?

[04:12:21](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15141s) Whether my auth rejection is spiking on a particular time or not, right?

[04:12:26](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15146s) So those kind of metrics is going to store in Prometheus.

[04:12:29](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15149s) So once you get all this data point like traces and metrics, this entire aggregate data back actually save into the Grafana for your

[04:12:40](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15160s) All right. So the MCP server, gateway and monitoring is covered. Now we're going to talk about the framework. So the agent framework, right? So we use LangGraph for most of the cases.

[04:12:54](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15174s) and is basically LangGraph, again,

[04:12:57](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15177s) it's provided by LangChain community.

[04:12:59](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15179s) It's provided a graph-based architecture

[04:13:01](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15181s) that support loops, branching, state management

[04:13:05](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15185s) for complex multi-agent AI workflows, right?

[04:13:08](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15188s) And the way it works is,

[04:13:10](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15190s) the moment you submit your first query,

[04:13:12](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15192s) we do interpret your question first,

[04:13:17](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15197s) what type of questions it is

[04:13:19](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15199s) and what response it's looking for.

[04:13:22](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15202s) and based on that, it's create a plan, right?

[04:13:25](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15205s) Then it will send for classify area

[04:13:29](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15209s) where it will determine that,

[04:13:31](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15211s) hey, whether it is just like a read operations

[04:13:33](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15213s) or whether it is just like a, you know,

[04:13:35](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15215s) modification level changes coming up

[04:13:37](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15217s) or whether you really want to delete something, right?

[04:13:40](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15220s) Or some sensitive operations.

[04:13:42](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15222s) Based on that, it adjusts the overall structure

[04:13:45](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15225s) and then plan accordingly.

[04:13:47](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15227s) The next step is plan.

[04:13:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15228s) It's actually itself is a subgraph

[04:13:50](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15230s) where you do the measure of your operations,

[04:13:53](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15233s) meaning that in the plan,

[04:13:55](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15235s) like once you know what operation you're performing,

[04:13:57](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15237s) it goes to the, like, let's say in a fetch evidence section

[04:14:00](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15240s) where it actually call that,

[04:14:02](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15242s) whatever the question you ask here,

[04:14:04](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15244s) after all, interpret and classify,

[04:14:07](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15247s) it actually go ahead and make the call to the MCP gateway,

[04:14:11](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15251s) make sure they get authenticated,

[04:14:13](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15253s) and then it make the call to the MCP server

[04:14:16](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15256s) using the right tool and get the data

[04:14:19](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15259s) and then generate that evidence, right?

[04:14:22](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15262s) Once you validate all your finding,

[04:14:24](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15264s) then it will check the policies.

[04:14:26](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15266s) It will check whether it is a read-only,

[04:14:28](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15268s) then go ahead and execute,

[04:14:29](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15269s) and I will save all the record points

[04:14:31](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15271s) into our audit logs.

[04:14:32](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15272s) But if it is a write and sensitive operations,

[04:14:35](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15275s) definitely it will go through the HITL process

[04:14:37](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15277s) where you wait for an approval.

[04:14:39](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15279s) If it is approved, you go ahead and execute.

[04:14:41](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15281s) If it is get rejected,

[04:14:43](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15283s) in either case, it's going to save into the audit log, right?

[04:14:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15288s) So if we combine all this together, like MCP gateway, MCP server, and agent, this is how things looks like.

[04:14:57](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15297s) So ultimately, whatever the agent you are building, whatever the call you are submitting, it will go to the MCP gateway for authentications.

[04:15:05](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15305s) And then it will redirect to the right MCP servers to execute your query on a given tool so that it make the API call to that endpoint and get the response.

[04:15:16](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15316s) right all right if it if we think from the infrastructure perspective this is how it looks

[04:15:21](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15321s) like so agent is communicating to the mcp gateway goes to the mcp server and to the endpoint

[04:15:28](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15328s) all right so now the we talked a lot about mcp gateway mcp servers um the monitoring

[04:15:36](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15336s) um and the agent framework now we talk about uh three and four additional framework that we should

[04:15:43](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15343s) have to take care of when building the end-to-end ecosystem, right? One is them is agent memory

[04:15:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15348s) management. Again, it's basically a process where you can save and restore the state of your

[04:15:57](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15357s) workflow over the time, right? Ensuring that it's provide you a durability and seamless recovery

[04:16:03](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15363s) across your every query run. So, the way it work is like whenever you submit any query to your agent,

[04:16:10](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15370s) it actually generate a thread, right?

[04:16:14](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15374s) On that given thread, when you ask your first question,

[04:16:17](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15377s) it will going to create a run ID for that.

[04:16:20](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15380s) So the moment you ask some deeper questions,

[04:16:23](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15383s) it will go on a particular node in that LangGraph

[04:16:26](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15386s) and execute that query.

[04:16:27](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15387s) And on that node, it's going to save

[04:16:30](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15390s) that respective checkpoint here, right?

[04:16:32](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15392s) Now, if you ask your follow-up questions on the same thread,

[04:16:35](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15395s) it's going to create another run ID.

[04:16:37](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15397s) And again, depend on your follow-up questions,

[04:16:39](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15399s) it go to a specific node and save the checkpoint over there, right?

[04:16:44](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15404s) And all this data for your local development,

[04:16:46](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15406s) you can use the SQLite DB,

[04:16:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15408s) but in production, unless in GCP,

[04:16:51](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15411s) you can use Cloud Spanner

[04:16:52](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15412s) and in respect to databases,

[04:16:55](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15415s) you can use in Azure and AWS as well, right?

[04:16:59](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15419s) So just walk you through the quick demo here on the memory.

[04:17:04](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15424s) So for example, I have, you know,

[04:17:07](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15427s) like just built this agent locally,

[04:17:09](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15429s) And then, you know, trying to run this query on SQLite DB to see if there isn't data or not.

[04:17:15](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15435s) So I'm just, you know, initially I don't have any data.

[04:17:18](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15438s) Now I submit my query.

[04:17:19](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15439s) You will see that I received the one record, which is saying that, hey, this is my thread ID.

[04:17:23](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15443s) This is the question I have been asked and exact time, you know, when this query was executed.

[04:17:30](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15450s) Now, if I run the next query to see that, hey, how many messages I've been produced on a given thread,

[04:17:35](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15455s) you can get this information by running the further queries.

[04:17:39](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15459s) Right.

[04:17:40](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15460s) Now, if I would like to run to see that, you know, like all the metadata level information on my query, I can run my query again and you can see the detail description around, you know, like how many tool I get invoked, what is my thread ID, what is my run ID, you know, like and all those informations.

[04:17:59](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15479s) Now, if I want to also see that, hey, what tool have been executed when I run this query, you can go ahead and see the exact tool name as well on that given MCP servers.

[04:18:08](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15488s) Now further, I also want to see that how the progression was happened on my LangGraph framework.

[04:18:14](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15494s) That also you can see by running this type of query on your memory DB.

[04:18:19](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15499s) You can see that here like different kind of nodes been called when actually that query has been run.

[04:18:27](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15507s) All right.

[04:18:29](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15509s) Now the tracking and eval.

[04:18:31](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15511s) So just to make sure that there is no confusion here.

[04:18:35](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15515s) like we talked about earlier the MCP gateway monitoring,

[04:18:38](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15518s) this is agent level tracking.

[04:18:40](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15520s) So we do this because we really want to track

[04:18:42](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15522s) that what query you have been submitting to the agent

[04:18:46](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15526s) and what the response is coming,

[04:18:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15528s) what LLM model you have been used,

[04:18:50](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15530s) what's the cost of your token,

[04:18:52](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15532s) how many token you have been burned

[04:18:53](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15533s) and what's your evaluation criteria looks like,

[04:18:58](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15538s) what is the quality of your response or not, right?

[04:19:00](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15540s) So you need to store that data from the day one

[04:19:04](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15544s) And imagine that if you have a thousand plus agent, every agent will have their own, you know, agent tracking and eval project and the tables, right?

[04:19:16](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15556s) So if you combine, let's say if you have 100 agents, you will have 100 different projects and each project has their own respective tracking and eval tables.

[04:19:24](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15564s) Now, tomorrow, six months down the line, if somebody asks you that how your agent has been performed, what was the response, what was the quality, how much token you've been born,

[04:19:32](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15572s) you can aggregate all this data and you can create executive dashboards around it to see

[04:19:38](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15578s) what is the ROI in building so many agents. So let me walk you through the tracking and eval

[04:19:44](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15584s) demo here. So here, like if I look at this one, so first, like, you know, like if you see that

[04:19:55](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15595s) there are six tables are listed here, one is a job tracking table, and which is

[04:20:00](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15600s) contains most of this like information around what query, like what is your query, what's the response and everything. And there are a bunch of other tables as well, like your quality related and your tool invocations and then node level executions and all that.

[04:20:14](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15614s) So in this case, I'm going to submit my first query on my agent, and you will see that there will not be any data in the first place because it takes some time.

[04:20:26](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15626s) So I will refresh this again.

[04:20:29](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15629s) And this time I will see that when I refresh, I do see that for a given query, I get my request ID, my session ID, my agent name, you know, what question I've been asked,

[04:20:39](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15639s) and what was the output of that question,

[04:20:43](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15643s) whether it has completed or not,

[04:20:45](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15645s) and then what is the time it took,

[04:20:47](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15647s) what is the model I've been used,

[04:20:49](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15649s) and then some of the metadata-level informations.

[04:20:54](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15654s) Further, if I look for the quality,

[04:20:56](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15656s) again, there is eight quality checks per run.

[04:20:59](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15659s) And you can see that this one row,

[04:21:03](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15663s) each for success, latency cost,

[04:21:06](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15666s) tool accuracy, safety, et cetera,

[04:21:08](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15668s) Like all this has been stored here. Right. Now, the Eval scores, this is again, this is going to be a one row.

[04:21:17](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15677s) This is going to be a scoreboard for your given run, which is basically varies between zero to one, which is scores, you know, like all the quality dimension in a single row.

[04:21:27](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15687s) Right. Now the quality metrics. So, again, it's a deep dive on that particular one run.

[04:21:32](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15692s) Basically, a nested field for the response, quality, safety, latency, cost, and the tool stat in one wide row.

[04:21:41](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15701s) Now, the tool invocation.

[04:21:43](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15703s) So, every tool call, which MCP tool ran, how long it took, and whether it succeeded or not.

[04:21:50](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15710s) And now, the tool agent trajectory, which is talking about step-by-step story of the run, each LLM call, and the graph state in order, like plan, summarize, et cetera.

[04:22:02](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15722s) All right. So now. The next is the agent PIA treatment. This is very, very important because many times it happens that when you're working in agents or this thing, sometimes there is a possibility that there are some secret being ingested as a part of your query.

[04:22:21](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15741s) Let's say you are uploading some doc, which has some sensitive information.

[04:22:25](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15745s) And sometimes while typing, you may have some API keys or so.

[04:22:29](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15749s) So we have a framework which defines that different sort of data types and their severity level.

[04:22:35](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15755s) If your severity is above 90 percent or so, we will block and redact that secrets immediately so that make sure that that secret is never goes to LLM models.

[04:22:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15768s) Right.

[04:22:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15768s) Neither it will go to your memory DB, nor it will go to tracking and eval tables or tracing systems as well.

[04:22:57](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15777s) So the goal here is to just block this sensor data as it is the moment it gets ingested, the moment you type.

[04:23:06](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15786s) The last framework is all about now is the context optimizer.

[04:23:11](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15791s) This is one of my favorite areas where, like, you know, whenever you submit, it's very important, right?

[04:23:19](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15799s) Whenever you submit too many queries, sometimes you upload a lot of the data points and you upload a bunch of files, systems or so, right?

[04:23:27](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15807s) It's very important that time is, you know, like you make sure that you save your token in every query.

[04:23:33](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15813s) So we build in context, optimize your framework where you actually shape your query and then you prune it before you go to LLM.

[04:23:39](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15819s) In the pruning system, we do select the payload based on the token limit.

[04:23:46](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15826s) Then we re-rank that, hey, which is the most relevant information that we should target for when you submit this huge, giant context.

[04:23:54](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15834s) And then we dedupe that, remove all the duplicates and create a very unique set of very curated data, like, I mean, the main data for the LLM.

[04:24:05](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15845s) And then we finally compress this large payload before it goes to the LLM.

[04:24:09](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15849s) So let's see this demo here.

[04:24:12](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15852s) This will be quick.

[04:24:14](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15854s) So for example, let's say I will submit my first query.

[04:24:16](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15856s) Hey, find me all the artifacts in my JFrog Artifactory.

[04:24:20](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15860s) You see that first when even I no submitted any query yet, there is no data here.

[04:24:25](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15865s) So the moment I submit this first query, and if I refresh my query here, and then you can see that the record has been added.

[04:24:37](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15877s) So you can see there is a 24,000 token has been used.

[04:24:39](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15879s) I will go back a little bit just to show the thing.

[04:24:44](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15884s) So you can see this 24,000 token has been used for given questions.

[04:24:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15888s) Now if I ask, now I enable the context optimizer behind the scene and I'm rerun the exact same query again.

[04:24:55](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15895s) So this time you will see that, you know, for the same query, if I refresh this run and you will see that this time it used just 2,400 token.

[04:25:06](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15906s) for the exact same query,

[04:25:09](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15909s) which is almost like 90% saving.

[04:25:11](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15911s) I can rerun the same demo on the Slack bot as well,

[04:25:14](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15914s) where I'm asking Slack bot,

[04:25:15](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15915s) hey, tell me all my Docker images

[04:25:17](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15917s) across all the repositories in Artifactory.

[04:25:20](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15920s) When I run this query, there is no data.

[04:25:22](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15922s) Now I'm going to submit my query.

[04:25:25](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15925s) So once this query will run,

[04:25:28](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15928s) and if I run my query again here,

[04:25:30](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15930s) and you will see that record get created,

[04:25:32](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15932s) it's again used like 24,000 for this particular query.

[04:25:36](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15936s) Now, what I will do is I will turn on my optimizer behind the scene

[04:25:41](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15941s) and I rerun the same query in the Slack bot.

[04:25:44](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15944s) And then if I run this query again,

[04:25:47](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15947s) it will show like it exactly used 1,500 almost token,

[04:25:51](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15951s) which is again like 90% saving.

[04:25:52](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15952s) In most of the cases, we get like 70 to 78% token saves.

[04:25:56](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15956s) So imagine that you have thousands of, you know, like if you have thousands of like agents, which is running like, you know, many queries per day, imagine how much token you can save with this framework.

[04:26:12](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15972s) All right. So now the key takeaway here is, you know, like for us is like make sure that we build an enterprise framework, not just an agent.

[04:26:22](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15982s) Right. Which make sure that you have all the framework underneath. Don't try to be interested in building some agent quickly and deploy ship it.

[04:26:28](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15988s) Make sure that it has to go through all the framework altogether so that you should not realize the literacy that, you know, I should have this framework in place.

[04:26:37](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=15997s) in the very first place.

[04:26:40](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16000s) Second is make sure that you have a proper gateway system.

[04:26:44](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16004s) Make sure that every tool called request,

[04:26:46](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16006s) either you are doing this from your local or through agent,

[04:26:48](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16008s) it has to go through some sort of centralized MCP gateway.

[04:26:53](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16013s) Make sure it's authenticated before it reaching to the MCP servers.

[04:26:57](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16017s) And then make sure that your MCP servers take a control

[04:27:00](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16020s) on what tool you should use to execute a particular query.

[04:27:07](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16027s) And make sure that you have monitoring in place and complete auditing in place for that tool executions.

[04:27:12](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16032s) And of course, you should keep the always human in the loop process for every action items, every high risk items.

[04:27:21](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16041s) Make sure that there is an observability and auditing has to be in place.

[04:27:27](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16047s) And last but not least, make sure that context optimizer should always be there to justify your cost on your agents.

[04:27:35](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16055s) right um so just want to share is that i released my um mcp book recently on amazon so feel free to

[04:27:43](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16063s) download it's free and kindle um and it's a hard copy is also available all right um thank you so

[04:27:53](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16073s) much for watching this video um and if you do have any questions feel free to you know like

[04:27:59](https://www.youtube.com/watch?v=jiUC6IUMdvc&t=16079s) reach out to me over linkedin or twitter i'm happy to answer
