# Transcript You worked with your AI agent for the last 2 years. You gained 2 years of experience. Your agent, none. 10 people on your team worked with the same AI agent. They cumulatively gained 2 decades of engineering experience. Your agent, still none. It keeps on repeating the same mistakes again and again.
I was talking to a senior executive at the world's biggest hedge fund and he said, "Sperj, the problem is not that the AI or the agents are not smart. The problem is that it keeps on repeating the same mistakes again and again. If I course correct it today, then in the next session or with another team, it just makes that same mistake again. And the issue is that there are so many mistakes that we cannot improve those things at all times. We need a mechanism or we need a system to resolve this issue."
And at that point of time, we realized that everyone is talking about context. Everyone is talking about memory. And the answer is we just need to take all the context, all the memory and give it to agents such that it will figure out. It was good in the start. But soon, we realize at enterprise scale, the issue is the context can be too big and giving all the facts to the agents just not increase the performance. It increases the cost, it increases the effort, it increases the overall time taken. And on top of that, it decreases the overall accuracy that is there. It decreases the performance.
And there we realize that more context doesn't equal better intelligence after a point. When we are starting, when we have a smaller context, it means that. But after a point of time, it doesn't mean that. And we need a better mechanism, a better way to solve that problem. Here, we went back to the drawing board. Think about how, why exactly we humans get better with time. And at that point of time, we realize we humans have this skill of experience of judgment. And this judgment layer gets better with time when we learn something, when we make mistakes, and when we course correct it. And that is a missing piece from a lot of these agents.
And there, we realized that at this point of time earlier, the memory was not learning for us. When we came back, when we built the system, the performance game for us was 10x. And what exactly we came upon as the understanding of the memory is, it's divided into two parts: the short term memory and long term memory. Short term memory is the working memory or active session memory. The long term memory is divided into two parts: fact-based memory and experiential memory.
This layer of experiential based memory was something that has been missing now. And these are abstracted out learnings from whatever we do with agents. And this is what makes us humans different from the AI that was there earlier.
And further, this experiential layer can be broken down into three different categories: the case-based, strategy-based and the skill-based. Case-based is the detailed case and the detailed learning. The strategy is, if you were in that particular situation, then what kind of strategy worked for us and what we should use. And then finally, is something that can be abstracted out, generalized very well. We abstract that thing out into a skill which an agent can use again and again. And this is how we build this experiential layer in the agents. This experiential memory is something that helps us.
At this point, we thought we have solved the problem of memory infrastructure. But solving this problem made us realize that this is just the start of the problem and there are so many other bigger problems out there that form just because we solved this problem and we are able to see it because we reached this stage. And that is in the current times. The systems are changing very fast. The data drift, the system drift, the overall environment drift. The world is changing every week, every month and year feels like a decade in the AI age. So the agent that works today doesn't work in a month or a year's time frame. And we need to think through how we update that thing.
And once we ran through lots and lots of experiments, we came upon this understanding that memory is not just you make the system or the memory once, but you have to evolve or make it better with time. And then in the final case, we came upon this architecture. Memory infrastructure pipeline is divided. The lifecycle is divided into three parts: the formation, the updation and the retrieval.
Retrieval is very important. Now formation we already understood right now. The updation is the part which evolves the system in which you add new nodes when there are new experiences of facts. You update the older nodes or deactivate the nodes which are no longer useful. And then finally you have this forgetting.
In updation, only storing the final layer of judgment is not enough in all these. Because if you just store that, the agent can make a mistake and go back to the older point which was earlier and we just removed. So a better way is if it's a surface level research, it just looks at the active nodes. And if it's a deeper research, it looks at the active nodes and the inactive nodes. And inactive nodes are the temporal journey that the system took to get the final layer of the judgment that is there.
And then finally is the forgetting node which is a must of a very important layer and we cannot forget it. Let me give you an example. In the late 20th century, there was a person named Chevy Sharovsky. This is a human with near perfect memory with a 100% recall. Now you might be thinking, if we have got that particular memory, our life would have been amazing. But when the scientists and researchers studied his life, they started to realize a lot of times when he had to make a smaller decision, his life was miserable. Because every point used to compete for an equal prioritization and equal weight in things for something which we humans can take in a decision in a quick second. It was 100 thoughts fighting in his mind.
And that is the issue with our agents. If you keep on adding everything, if you keep on accumulating everything, and if you do not forget things which are no longer true or which are no longer required, then you might end up in a state where the system gets overwhelmed and the results just doesn't get better with time. So you need to have a mechanism to forget things. Now, once you build this pipeline, we started with providing this memory to agents. We build this experiential agents. Now we build this evolving experiential agents. But still, everything is manual. We thought we have solved the problem. But what's possible today, it was just half of the solution.
Let me ask you a question. In the past six months, what has changed in the AI world? The models have become smarter. But that's only a smaller part. The bigger breakthrough is that the model is smart enough that it can be the verifier. Until now, the situation was we always have to have the humans in the room to review everything. But now for the first time, the model is smart enough such that we can bake that thing into a layer in itself as a verifier into the system, so that the system gets better with time by itself.
And then finally, we had this retrieval part. Now, in the retrieval aspect of things, your system's maximum performance can be just equivalent to the maximum performance of the retrieval. You might be asking why? Let me give you an example. Let's say I work in San Francisco and I have a home here. I also have a home in New York. I got out of my office and I asked my AI agent, pull the maps for the home. Midway through the route, I realized this is not a place where I should be going. And then I realized I wanted to go to my San Francisco home for the agent. The home is home, whether it's New York or San Francisco, and you put the map for the New York home.
And there I realized no matter how good my system is, the formation and the application and the knowledge I have and the experiences I have, if my retrieval doesn't give me the right information, it's just of no use. The whole system is of no use. And that's where the retrieval part of our system is very, very important. And then finally, once we have this thing, we have the formation, the updation and the retrieval. This is how we complete the life cycle of the memory infrastructure we have.
And let me tell you earlier for gathering context for our agent for a lot of cases, it used to take 20 minutes. But now if we have gathered that context earlier, and we know what all together, the same agent just takes two minutes of time. And that's not only the improvement in the timing, it is improving in the efforts it has to make, it improves in the tokens it costs, and it overall improves the performance of our agents in the long horizon task, because it doesn't have to think through too much in the things we have already thought earlier.
And this is just the start of the system. Now the next level comes, that is, how we made the system self evolving and experiential. And in that particularly, we built this concept of cycles, or dreaming cycles. Now we humans have a tendency, when we take rest, or when we sleep, our mind, it cleans the things which are no longer important. It takes the prioritized items to the front, and whatever is left, it rearranges and cleans everything. Such that next day when I wake up, I feel very refreshed. I can think clearly.
And that is something we built within the agents. We built this looping and the eval infrastructure, such that we clean the things which are no longer important. We update the things which should be prioritized, and we rearrange the things, such that the next day, and whenever the context is getting accumulated, the agent is able to perform better and better. And then finally, once you build this infrastructure, earlier, the issue for us was, the agents cannot remember anything. But now, with the two years of experience, we are able to give more experience to the agents than any one of us humans.
And we learned that there are three golden rules when we are building this experiential memory. First, do not dump everything. You have to remember, you have to disclose progressively. Second, you cannot make a system once, and assume it will always perform good. You have to improve the system continuously. And then finally, instead of writing prompts, you have to move towards writing these loops, because that is how you make this whole infrastructure autonomous.
An example for us is, once you build this memory layer, formation, updation, and retrieval, we build an observability layer around it. Once we have observability, we build this looping layer combined with the eval layer, such that which after every session, after every day, extracts the learnings, improves the systems, test it independently, and then finally, make the changes in the real system. Now, this looping, these evals, and the security guardrails around the whole memory infrastructure is a very interesting topic. But that's a topic for my next talk.
And coming back to the problem we had, that we were not getting experiences. Now with this thing, whenever the agent work with me, it gains that experience. Whenever it works with anyone on my team, it gains that experience too. So for me as a human, I'm getting only one year of experience in one year. But this agent, since it's working with all those 10 members, it's getting the 10x experience, and it's getting better than any one of us in the team.
And now, because of that, we have started to see these autonomous teams of humans plus AI agents combined. And in some of the teams, I know like their team is 10x or 100x, because this agent that they have created, this agentic infrastructure and the memory behind it, it's just that is powering them, it's just empowering these agents, such that some of these agents are far better than any of the best engineers or people or employees out there in their team.
And soon, in the next six to nine months, we will start to see more and more of these autonomous AI companies in which agents are collaborating with each other, and they just remember everything such that now if you implement these things, whatever performance you have, it just will compound exponentially with time, because it's not learning only with you, it learns with every member of the team, and it gets better and better with time. Such that in the near future, there will be a stage in your enterprise, where this agent has learned more than any one of our person in the different domains, in the different management.
And I would like to tell this one thing is, people who do not remember from the mistakes, or the agents who do not remember from their mistakes are condemned to repeat it. Build this memory infrastructure, build this memory structure, and get back to growing exponentially better, and build a 10x or 100x team. And once we ran through a lot and lots of experiments, we came upon this understanding of the memory is that it's not just you make the system or the memory once, but it's just you have to evolve or make it better with time. And then in the final case, we came upon this architecture.
Memory, infrastructure, pipeline is divided, the lifestyle is divided into three parts. The formation, the updation and the retrieval. Retrieval is very important. Now formation we already understood right now. The updation is the part which evolves the system in which you add new nodes when there are new experiences of facts. You update the older nodes or like deactivate the nodes which are no longer useful. And then finally you have this forgetting. In updation, only storing the final layer of judgment is not enough in all these. Because if you just store that, the agent can make a mistake and go back
to the older point which was earlier and we just removed. So a better way is if it's a surface level research, it just looks at the active nodes. And if it's a deeper research, it looks at the active nodes and the inactive nodes. And inactive nodes are the temporal journey that the system took to get the final layer of the judgment that is there. And then finally is the forgetting node which is a must of a very important layer and we cannot forget it. Let me give you an example. In the late 20th century, there was a person named Chevy Sharovsky. This is a human with near perfect memory with a 100% recall.
Now you might be thinking, if we have got that particular memory, our life would have been amazing. But when the scientists and researchers studied his life, they started to realize a lot of times when he even has to make a smaller decisions. His life was miserable. Because every point used to compete for an equal prioritization and equal winning in things for something which we humans can take in a decision in a quick second. It was 100 thoughts fighting in his mind. And he gets over it. And that is the issue with our agents. If you keep on adding everything, if you keep on accumulating everything, and if you do not
forget things which are no longer true or which are no longer required, then you might end up in a state where the system gets overwhelmed and the results just doesn't get better with time. So you need to have a mechanism to forget things. Now, once you build this pipeline, we started with providing this memory to agents. We build this experiential agents. Now we build this evolving experiential agents. But still, everything is manual. We thought we have solved the problem. But what's possible today, it was just half of the solution. Let me ask you a question. In the past six months, what has changed in the AI world?
The models have become smarter. But that's only a smaller part. The bigger breakthrough is that the model is so smart enough that it can be the verifier. Until now, the situation was we always have to have the humans in the room to review everything. But now for the first time, the model is smart enough such that we can bake that thing into a layer in itself as a verifier into the system, so that the system gets better with time by itself.
And then finally, we had this retrieval part.
Now, in the retrieval aspect of things, your system's maximum performance can be just equivalent to the maximum performance of the retrieval. You might be asking why? Let me give you an example. Let's say I work in San Francisco and I have a home here. I also have a home in New York. I got out of my office and I asked my AI agent, pull the maps for the home. Midway through the route, I realized this is not a place where I should be going. And then I realized I wanted to go to my San Francisco home for the agent. The home is home, whether it's New York or San Francisco, and you put the map for the New York home.
And there I realized no matter how good my system is, the formation and the application and the knowledge I have and the experiences I have, if my retrieval doesn't give me the right information, it's just of no use. The whole system is of no use. And that's where the retrieval part of our system is very, very important. And then finally, once we have this thing, we have the formation, the updation and the retrieval. This is how we complete the life cycle of the memory infrastructure we have. And let me tell you earlier for gathering context for our agent for a lot of cases, it used to take 20 minutes.
But now if we have gathered that context earlier, and we know what all together, the same agent just takes two minutes of time. And that's not only the improvement in the timing, it is improving in the efforts it has to make, it can make, it improves in the tokens it costs, and it overall improves the performance of our agents in the long horizon task, because it doesn't have to think through too much in the things we have already thought earlier. And this is just the start of the system. Now the next level comes, that is, how we made the system self evolving and experiential. And in that particularly, we built this concept of cycles, or dreaming cycles.
Now we humans have a tendency, when we take rest, or when we sleep, our mind, it cleans the things which are no longer important. It takes the prioritized items to the front, and whatever is left, it rearranges and cleans everything. Such that next day when I wake up, I feel very refreshed. I can think clearly. I can think clearly. And that is something we built within the agents. We built this looping and the eval infrastructure, such that we clean the things which are no longer important. We update the things which should be prioritized, and we rearrange the things, such that the next day,
and whenever the context is getting accumulated, the agent is able to perform better and better. And then finally, once you build this infrastructure, earlier, the issue for us was, the agents cannot remember anything. But now, with the two years of experience, we are able to give more experience to the agents than anyone of us humans. And we learned that there are three golden rules when we are building this experiential memory. First, do not dump everything. You have to remember, you have to disclose progressively. Second, you cannot make a system once, and assume it will always perform good.
You have to improve the system continuously. And then finally, instead of writing prompts, you have to move towards writing these loops, because that is how you make this whole infrastructure for you autonomous. An example for us is, once you build this memory layer, formation, updation, and retrieval, we build an observability layer around it. Once we have observability, we build this looping layer combined with the eval layer, such that, which after every session, after every day, extracts the learnings, improves the systems, test it independently, and then finally, make the changes in the real system.
Now, this looping, these evals, and the security guardrails around the whole memory infrastructure is a very interesting topic. But that's a topic for my next talk. And coming back to the problem we had, that we were not getting experiences. Now with this thing, whenever the agent work with me, it gains that experience. Whenever it works with anyone on my team, it gains that experience too. So for me as a human, I'm getting only one year of experience in one year. But this agent, since it's working with all those 10 members, it's getting the 10x experience, and it's getting better than any one of us in the team. And now,
because of that, we have started to see these autonomous teams of humans plus AI agents combined. And in some of the teams, I know like their team is like 10x or 100x, because this agent that they have created, this agentic infrastructure and the memory behind it, it's just that is powering them, it's just empowering these agents, such that some of these agents are far better than any of the best engineers or people or employees out there in their team. And soon, like in the next six to nine months, we will start to see more and more of these autonomous AI companies in which agents are
collaborating with each other, and they just remember everything such that now if you implement these things, whatever performance you have, it just will compound exponentially with time, because it's not learning only with you, it learns with every member of the team, and it gets better and better with time, such that in the near future, there will be a stage in your enterprise, where this agent has learned more than any one of our person in the different domains, in the different management. And I would like to tell this one thing is, people who do not remember from the mistakes, or the
agents who do not remember from their mistakes are condemned to repeat it. Build this memory infrastructure, build this memory structure, and get back to growing exponentially better, and build a 10x or 100x team.
And come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come back to come