Missing Layer0:00
Alright, so we built an agent, you launched it, everything works pretty well in the demo, everyone is happy, but now let me ask you a few simple questions. So: how do you know if it's actually working out there?
How do you watch across hundreds or thousands of real conversations every day? How do you feel or understand the health of the system? How do you make it better? How do you find the holes that you don't know are there yet?
That's the thing,right? Most of the talk is about the agents and about the moment when you ship. So we build it, you work, the end. But I think the shipping is the moment when the real work begins. And somehow only a few people are talking about that, and I'm calling it the missing layer.
So let's dive into it. So this is the world that we're living in. You can create a whole product, you can create a whole startup in a couple of days, in a couple of weeks. You can write hundred thousands of lines of code, you can spend a lot of tokens, and to be honest, it's the easiest part today with the help of the latest models.
But I think the shipping is the moment when the real work begins. Because you need to close the loop as soon as possible. So after you launch, you need to have some control and understanding of the system. And from my experience, the loop is at least as important as the product itself, sometimes even more, because the tight feedback is the one that helps you to make the product better every single day.
And that's the missing layer, and that's what the rest of this talk is all about. So what happens after you launch? And this is not something surprising. We had the same questions in classical old software. You need to monitor what is happening, you need to understand how it behaves, you need to have some logs to detect the problems and fix them.
And for agentic systems, each one of those are even harder, and sometimes they turn into something genuinely new. So let's talk about why this is hard, and why this is hard now. So the agent is not a normal software,right?
Agentic Shift1:57
You don't have a few features, several buttons. You don't have a predefined flow that you can test before you go to the live. And the coverage is endless. So think about, like, Claude Code or Codex. They can do a giant range of stuff wherever the user needs, and most of the agents do the same,right?
So you give the instructions and they can handle it. And you cannot write all the conversations in advance. So this leads to a deepest part of the problem, the part that keeps me up all night, which is: you lose the feel for your own system.
So after you build the product, you need to have some kind of understanding. Does it get better or worse? So you need to monitor, understand what is happening. And the problem is that the normal safety nets don't save you here.
And believe me, we tried a few stuff. We built a unit test. We had some regex, some rule-based checks. We even created some scripts to simulate the customer conversation. And yeah, it helps in some ways. But at the end of the day, it is like only one slice of the whole problem.
Because customers always do something different. You cannot write it all down. They are too many, and they are all different. And the Harrison put it in the same way. So you don't know what your agent will do until it is in production.
So why this is a new problem? So as you know, LLMs are not deterministic. The same input can have a different path. Even a slight modification of the input can cause a different trajectory, and the coverage is endless.
You cannot list it all down. You cannot pre-test until you go into production. The second and the scariest one is the failure height itself. So let's think about what happens when the agent is running for a long time.
It struggles in the middle of a task. It has some problems, but it was lucky. It was recovered. It finds some workarounds, tries some other tool calls, or whatever. And you do not get any red alerts, any problems on the dashboard.
Everything looks fine. But you know this is an early warning for you. This is a problem that is hidden and that lives in your codebase, and you need to fix it as soon as possible. Because if we are talking about reliable agents, it should not depend on the luck,right?
And also, as Anthropic mentioned in a blog post, sometimes the agent loves to mark the features as complete without checking if they actually worked. The next one is the tool calling,right? So the tool surface is huge. So a long-running task needs hundreds of tools, even thousands of tools.
Market.
Sometimes it.
So conversation in the middle.
It uses some sub-agents.
The client will be set to.
It uses a terminal, for sure. It calls some other company services, third-party libraries. And they work a different way all the time, so actually you don't know what you're looking for. So sometimes finished doesn't mean it is helpful for the user.
Maybe there wasn't any problem, so agent finished, everything looks good, the answer was successful. But what happens? For example, for our use case, sometimes a user asks to build the itinerary, agent runs the flow, it builds a trip, but it booked a different service, it made a lot of mistakes in calculating the price, so the user is not happy.
So technically it is successful, but still fail in the task. And as I mentioned, the unit tests don't save you here, and production is the place where you learn what you need to test in the first place. Alright, so what happens after you launch the product,right?
So you need to monitor, you need to understand and improve the system. And what's the source of the truth,right? This is the logs. Everyone has the logs. Everyone loves the logs. You have structured information. And you know those machines are the best to understand and explore the logs, much better than any human, much faster.
Log Monitoring5:50
They can write some scripts to filter the giant of walls. And this is the most obvious way that you can hand it to the agent. But as soon as you start working on that, maybe you build an agent or a skill, whatever, you quickly understand this is not as easy as you imagine.
Because it needs a lot of reasoning. You need to understand the problem, to differentiate if it's a real bug or a noise, to deep dive in its trace or trajectory, understand if it's a symptom or a root cause.
So actually, you'll find out that the operating agent itself is an agentic problem. So this is what it looks like end to end. So you have traces, you have trajectories, you give the agent to access the codebase, it diagnoses the problem, understands what was happening, and sends the PR.
And then you can have a skill or sub-agent or whatever that controls the PR. Because you know most of the agents are pretty eager to send the PR. They love to fix the problems. We prefer to have a separate agent which has fresh context.
It tries to check the PR on a different angle, on a different view, runs the focus tests. And it is not biased of the problem itself. It tries to criticize, score the PR. And sometimes it requests changes. Maybe it closed the PR directly and it helped us to filter those problems.
And then you have the human in the loop. Sometimes you don't. And we can talk about it later. But you know this is the most obvious thing that you can hand it to the agent, which seems like pretty obvious for most of the people.
And a lot of teams use the same practice. But I think people don't appreciate how important it is. And you need to spend some time on that. You need to calibrate. You need to make it reliable, to trust the loop.
And this is the fastest loop that we've ever had. So you know after you build this simple system, you already have the feel and understanding how it behaves, what is happening. You detect the problem, some local fixes as soon as possible.
And you can have the PR ready in half an hour, and you can easily understand what is happening. So let me walk you through how I'm handling this. Maybe this is not optimal, but I think this will help you to get some point.
So actually, we have two main flows. The first one is the fastest loop that helps you to detect and fix the problems as soon as possible. And the other one is more on a Zoom mode that helps you to have a high-level understanding, and it helps you to have a hand on the pulse.
Two Loops8:47
So the first one is a log monitoring agent, the one that I already mentioned. So you have trajectories, you have logs, you have access to a codebase, and it runs every hour or every 15 minutes. And it tries to understand the problem.
It deep dives in the logs, understands, does the user end up stuck, and sends the PR, or sometimes sends a Slack alert. And this is pretty important because sometimes the problem is so critical, so you need to
fix them as soon as possible. And yeah, it works pretty well. So this is the one example of how the PR can look like. So you have a nice description, a short explanation of what is happening. You have some metadata.
You have nice diagrams, metameter or ASCII tables. Maybe you will have some HTML artifact that helps you to give you a glance of the problem and quickly understand what is this PR for. So this is an example of how a Slack notification can look like.
It helps you to quickly give you feedback, detect if there are some critical problems. Sometimes it is just like heads-up, so you know there are some warnings, there are some problems, so you need to check them when you have some time.
And as I mentioned, the review agent is pretty critical because it tries to check the problem from a different angle. It always tries to criticize the problem, score the problem, and as soon as it's ready, it sends the PR to the human.
And sometimes people talk about that, if you need to have a human in the loop, because you know still a human is the bottleneck in this case. In our case, the PR agent and the review agent send 10 times more PR than the three of us every day.
So you need to have some clean system, how we're going to handle this, to not be a bottleneck in this system. But from my experience, as I mentioned, this PR and the review agent helps me to have a nice description, some artifacts that helps me to quickly understand the problem.
And maybe I spend a few minutes to at least understand what is happening. So I think at this time it's okay, but maybe we will remove it in the future. And yeah, people are talking about that. So you don't need to be a bottleneck in this problem.
Some of them prefer to remove the humans in this loop. But you know the trend is that you need to close the loop first. So let's make the problem when you are the bottleneck, and then you can remove yourself pretty easily, I think.
So these are some examples of how the review agent feedback can look like. As you know, it requests some changes. You have some summary. You have some diagrams, explanation, where are some risks, some edge cases. And sometimes after a few iterations, they go in the loop where the kit is ready.
So you don't need to have any more changes. So after that, the human will jump into the loop. So the previous agent, as I mentioned, that is especially good when you want to fix some local problems. For our case, it runs every hour.
Session Health12:30
It checks only a one-hour window of the logs. And it doesn't have any high-level understanding of the problem. So we found out that we need to have another system that helps us to get
more of a high-level explanation, some kind of a health of the system. And you know visibility is the easiest piece. Before the agent, it was impossible. So you cannot deep dive or summarize hundreds of conversations. Butright now, you can have a system that helps you to score every conversation, understand what was happening, and give you a high-level zoom out of the system.
So this is the session analyzer, and the main goal is to just give me the score of the health of the system,right? So it tries to check every conversation, runs a lot of sub-agents, it spends a lot of tokens.
But yeah, it helps us to detect some patterns, connecting the dots, and try to understand some high-level patterns. And yeah, it also detects some
classical problems. What is the cost? How many tool calls did you use? How many sub-agents? How many summaries happened, or whatever. But also it gives some AI insights, some entities, so you have an understanding of the problem. So,right, as I mentioned, one of the main problems is that you lose the control after you launch the production.
So you need to have a system that helps you to control, at least to have some understanding of what is happening, how it looks like, is it healthy or not. So
actually, let me show you
one of the examples of how it looks like. So actually, we built it ourselves. So there are a lot of other companies and tools that provide the same kind of system. But I prefer to build it myself because I know what I'm interested in, what I'm looking for.
So as you can see, we have the health of the system, we have the number of sessions that were analyzed, the cost, we have the average score, some success rate, we have some trends, we have the AI insights.
And this is the most important part. When the agent tries to connect the dots, find the patterns, if there are some critical ones, you have a description for each of them. What is this? Why it matters? What are the root causes?
What were the sessions affected? And some recommendation fixes. Soright now, this is just anonymized data, but it comes from real conversations. So we have a score distribution. Each company, number of sessions, or cost. You have the sentiment analysis, some entities.
We have analytics about tool calls, what was the success rate, how many rejected, and why. And you have detailed analysis of each session. So it ranks each one of them, scores. It is how many times it was running, how many messages, how many tool calls, how many summaries.
And you have a detailed explanation for each of them. What was the problem? It is something that you need to attention. And the limit helps a lot. And it helps you to check and watch across hundreds of conversations.
So the main goal of this dashboard and the system is not to fix some
specific problems or bugs. This is more on a high level that helps you to watch across hundreds or thousands of real conversations. So you can run it once in a week, two times in a week, or something like that.
Alright, so the next one is that so the problem of the previous agent that I mentioned is like the first one helps you to detect the specific problems. The second one is to give you a high-level understanding. But both of them work from an angle of the logs or the code or the session itself.
User View16:13
But you need to have some kind of user perspective,right? So that's why we have some computer-used agent that helps you to open the browser, to log in, and that tries to simulate the customer itself. Because sometimes you have some problems in the UI.
You need to
check if everything looks good. And yeah, sometimes code and logs don't help you in this way. So this is an example of how it looks like. So you use Codex sometimes. So it uses the browser itself.
Actually, this is pretty slow. And we try to build a specific skill that knows our website, our DOM, how it looks like. And that is much faster. And it can open the website, log in, open the sessions, send the messages, check what is happening, and also check how it looks like, what are some artifacts.
And yeah, it works pretty good. But yeah, you need to know that it will spend a lot of tokens. And also, for all of those problems, you need to remember that you need to give access to all kinds of tools that are needed.
So you need to have logs, trajectories, and metrics, database, UI, so as the humans need,right? So you need to give all context, all possibilities to understand what is happening. For example, for the computer-used agents, when it detects some problems, it should be able to analyze the trajectories, check the database to understand what happened.
And you know that's why I'm calling it the meta harness, the whole system, when everything is connected. And the PR or the answer from the agents depend on the real problem, and they're not guessing what is happening. So the most is not the model alone.
And you need to build the agent or a system or a harness around it, which watch itself, understand, improve, and help you at least to monitor what is happening. But also, in the ideal case, to close the loop, send automatic PR, notifications, wherever, and help you to speed up the process.
So shipping is the easiest part today. If you want to build a production agent, you need to close the loop first. Because somehow people are not talking about how important it is, what happens after you launch. So everyone can have the same model, everyone can have the same agent or harness.
Closing Loop19:01
But you need to have some internal system that helps you in this process, detect the problems, and give you a sense of what is happening, and helps to make the product better. Thank you.





