The Agentic AI Engineer - Benedikt Sanftl, Mutagent

AI Engineer · 34 min · 267 sentences · from YouTube's caption track

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

  1. 00:01Hi everybody.
  2. 00:03Welcome to our talk the Agentic AI engineer.
  3. 00:06I'm Bene.
  4. 00:07CEO and co-founder of Mutagent and I'm here with my colleague.
  5. 00:13Hi, I'm Burak.
  6. 00:14I'm the CTO of Mutagent and today we're basically going to talk about loops and how the Agentic AI engineer works.
  7. 00:28So, as you all are aware of now, loops is the hot topic how you build software in an Agentic loop.
  8. 00:35And we apply the same loop to the building of AI agents.
  9. 00:40And as you all aware, there is uh two concepts here.
  10. 00:44One is the offline loop where while you build, you iterate um on your agent, you test it, you evaluate it, you improve it, and you go on.
  11. 00:54And then you have a second loop which is we call the online loop where once the agent is deployed to production, you monitor its traces, you diagnose it, and then you feed it back into your optimization
  12. 01:05loop uh yeah, to iterate and have multiple versions of your agents.
  13. 01:13Yeah, up to until now um what we did was uh just doing this loop manually.
  14. 01:20It's quite slow.
  15. 01:21Um the life cycle is basically um you have an issue, um you want to change something to your agent.
  16. 01:28Um yeah, you implement the change.
  17. 01:30Um
  18. 01:31[snorts]
  19. 01:31you maybe vibe implement the change if you use coding agents for it.
  20. 01:35Um yeah, you generate some samples for this new feature or issue to test it.
  21. 01:39Um yeah, then you look at the result, you look through the traces, how does the outcome look like.
  22. 01:45Then you maybe ship it, you do AB testing, and all your feedback is kind of manually, it takes very long.
  23. 01:51Um yeah, and uh the the bottleneck basically becomes the human review and the human yeah, building time.
  24. 02:01And yeah, that you can't scale especially if in your organization you're not planning to roll out hundreds of agents etc. Yeah, and uh yeah, this is why we think the Agentic AI engineer is the natural next step to build agents.
  25. 02:22And I'll have Burak deep dive into how we improve timing and the road to production reliability with the Agentic AI engineer.
  26. 02:33Uh so, yeah, the key thing here is basically once you reach a certain number of agents or AI-based features, the human performing this loop again cannot really scale in enough time.
  27. 02:49So, this is why doing this agentically is the key to increasing the throughput because then you can fit many more cycles into the same time window.
  28. 03:00And now how that loop works is basically we have a few stages.
  29. 03:09So, this is when you are starting from scratch like the current software development practices, you first create a spec for your agent or your skill in this case.
  30. 03:23And here you need to define all the responsibilities and the functions that agents needs to handle, the decisions that it has to make on certain conditions.
  31. 03:36And here again, this is only the definition stage.
  32. 03:40Once you defined your agent's requirements, then you can finally go on to the build.
  33. 03:46And build is where you then realize that spec in a specific harness or uh agent framework or in these days you could even build it as a cloud code or a codex agent.
  34. 04:01Then comes the next step.
  35. 04:03This is where you define clear evaluations to evaluate your agent's performance because these are the key metrics then where you can say, "Hey, my agent is functional or not."
  36. 04:17Uh can think of essentially the equivalent to unit tests for coding.
  37. 04:23This is how you verify your agent works.
  38. 04:27Then after evaluation, if everything looks fine, you usually have the ship basically where you deploy this agent to production.
  39. 04:37Uh again, this can be a code update.
  40. 04:40This can be a direct update on a any agent platform or again your local harness agents.
  41. 04:48Then comes the online part.
  42. 04:51This is where then the agent is continuously monitored for issues and based on certain trigger conditions, then you can start automatic diagnostics.
  43. 05:01Again, this can be based on the volume of traces that your agent generates or, you know, weekly or daily jobs.
  44. 05:10Uh then we go into diagnosis stage.
  45. 05:13This is where you collect all the failures for your agents and do structured root cause analysis to then understand where the failures are coming from.
  46. 05:25Once you understand and categorize the failures, then you can finally go on to the optimization stage.
  47. 05:31This is where then you create, let's say, very specific changes or mutations for your agents and to deal with the found failure modes.
  48. 05:43And then the whole cycle repeats again.
  49. 05:46You evaluate and if everything looks good, then you can deploy again.
  50. 05:52Now, we will maybe do a deep dive on each stage, what that entails.
  51. 06:00Then
  52. 06:01So, before we continue, Burak, um we have two passes here.
  53. 06:07Like one is the cold start path, and one is basically existing features.
  54. 06:11Um should we dive deeper for like a half a minute on what differences here, what we see, and why this is important.
  55. 06:18Yeah.
  56. 06:19Yeah, so today, if you again sit down to build an agent, there are, you know, two options.
  57. 06:27Either you already have an agent, it's built, it's already running somewhere with um, you know, certain accuracy.
  58. 06:36However, the other option is again you are creating from scratch.
  59. 06:43So, when you create from scratch, obviously you design with the spec and the conceptualization stage.
  60. 06:50If you have an existing feature, the most likely again the agent is there, but then you are optimizing over something that already exists.
  61. 07:01Okay, cool.
  62. 07:02And
  63. 07:02[snorts]
  64. 07:04Yeah, let's dive deeper into each phase.
  65. 07:06I mean, you just mentioned the specking of new building agents, so this seems to be an important artifact, so let's dive into it.
  66. 07:15Right.
  67. 07:16So, with the spec-driven development, also prevalent for building software artifacts these days, or any kind of coding agent workflows, basically the goal is to capture the requirements for the agent, and especially
  68. 07:36the success criteria.
  69. 07:39The reason being, apart from coding agents, the agents in other domains they handle specific processes and this differs from company to company, so it's very specialized to the environment
  70. 07:56where the agent is in.
  71. 07:59And then the key point here is to clearly define which context requirements that the agent has, again which integrations and tools it then needs to have.
  72. 08:13What are the jobs to be done or the responsibilities that the agent will handle and what it will not.
  73. 08:21And then finally again the constraints and in general the boundaries for the agent.
  74. 08:32Okay.
  75. 08:32Now once we can define a clear spec as I said it becomes like a blueprint for any future development which then the implementation is held against.
  76. 08:46Okay.
  77. 08:47And let's dive into how we would then build an agent from the spec, right?
  78. 08:53Right.
  79. 08:54So basically then the spec tells your coding agent what to build and then here the target platform choice is entirely yours.
  80. 09:10Cuz as I mentioned agent space is very changing very rapidly these days.
  81. 09:19So the framework you are using today, you might want to change, you know, in a year or so.
  82. 09:26So essentially because of that spec is isolated from the implementation details.
  83. 09:35So once you decide to you can pick any target.
  84. 09:41Here then your coding agent of your choice will take that spec and give you a, you know, initial version of that agent, which is then basically customized to run on any platform
  85. 09:53that you see fit.
  86. 09:55Why would I want to change the platform in a year down the line?
  87. 10:00So, what what what did we learn out of experience here?
  88. 10:04Um
  89. 10:05Uh again building agents for the last 3 years, sometimes the agent framework or the harness does not always have the capabilities.
  90. 10:18So, occasionally you hit um like a bottleneck or a roadblock, and then you have to rely on the underlying framework to kind of get rid of that, and this can sometimes take a while.
  91. 10:34The key here is to be flexible because yeah, essentially again, it you want to pick the best harness or the framework that can, you know, fulfill your requirements.
  92. 10:49Mhm.
  93. 10:51I mean, we've all seen it in the in the last months, we how new harnesses shipped and yeah, how everything went from like a agents building code towards yeah, defined as like a agent loop run time.
  94. 11:05I mean, we've seen Hermes coming up, deep agents, and all of these frameworks, right?
  95. 11:10Yeah.
  96. 11:12Okay, let's continue.
  97. 11:14What happens after build?
  98. 11:16Now, after you build for agents, you essentially go into the eval-driven development loop, which I would call.
  99. 11:29And this is kind of equivalent to test-driven development for building software with agents because then the agents needs uh termination condition, right?
  100. 11:40So, when is an AI feature or an agent is good enough?
  101. 11:46So, here again there are two ways to kind of create your eval suite, which is composed of the evals like the metrics and the criteria you evaluate.
  102. 11:59And the data sets themselves, which usually contain the cases you have to satisfy.
  103. 12:06Now, in the beginning, the original option is that you can sit with your domain experts and then try to write down eval metrics and criteria that would cover the feature or the agent you want to build, but most teams working on that will already know that this is a bit difficult
  104. 12:34as in you cannot pre-guess the entire evaluation suite from the beginning.
  105. 12:41And secondly, you can always start with historical data or synthesized data from a known you know, sample of the data that you would like agent to be tested on.
  106. 12:57But essentially, the real and the complete eval suite is a product of discovery.
  107. 13:04What that means is over time, from user feedback, from production failures, you collect the metrics and criteria plus the additional data set cases, uh which is often representative for edge cases or you know, hard cases that the agent needs to deal with.
  108. 13:26And with that, then you finally have an evaluation suit where you can run the agent against an exactly know where it fails.
  109. 13:38Okay, before we continue, why does the Agentic AI engineer help us here so much?
  110. 13:44So, um obviously we're talking about the evaluator agent.
  111. 13:47So, why is it so why is it so good to use this kind of concept or thought process in the building?
  112. 13:56Well, I mean one issue is again, imagine you have a data set item of 200.
  113. 14:04Here, without automated evals, running this and evaluating by like human eyes takes quite a while.
  114. 14:14Um you would have to again scroll through an observability dashboard and logs and this in turn increases your loop time per eval state.
  115. 14:29So, as soon as you have a lot of features that you need to evaluate and experiment on, then it suddenly becomes impossible to, you know, do this quickly or in parallel.
  116. 14:41Then the human essentially becomes the bottleneck.
  117. 14:45Okay.
  118. 14:45So, we just have an agent do this work in sifting through traces.
  119. 14:50Yes, as the current era says a bit, you know, um you design loops for your agent so then they can autonomously work as many of these things in the background.
  120. 15:04Uh and then your job becomes designing these loops with a clear eval or termination gate.
  121. 15:12Okay.
  122. 15:13Understood.
  123. 15:13So, let's look at the how good eval uh supposed to be constructed and what it kind of evaluates.
  124. 15:23Right.
  125. 15:24So, in the context of agents in general, the mainly the trajectory is important because agents receive input or let's say intent or tasks and then they have a specific
  126. 15:42system prompt or like a decision tree that they kind of operate over.
  127. 15:48And when doing agent evaluations, again in general, we check, "Hey, was the context complete?"
  128. 15:56As in, did the agent have all the required context to perform the task end to end?
  129. 16:03Then this includes also chain checking every, you know, tool output in the trajectory because every wrong tool output in session can in the end lead to our wrong output
  130. 16:19as the final output.
  131. 16:21And apart from that, again, there are different things you can evaluate on.
  132. 16:29So, these days also the harness that the agent is operating on has quite drastic effects on the agent behavior.
  133. 16:40And this is again another vector of optimization.
  134. 16:44But in the end, when you evaluate an agent, you would like to evaluate all of these things and not something in just isolation.
  135. 16:54Mhm.
  136. 16:58Right.
  137. 16:59And in general, here, what makes an eval useful?
  138. 17:06So, you can always have you know, metrics or evals that are working in a LLM as a judge fashion and give you some score, but here, in order to make an eval,
  139. 17:22you know, useful, it has to provide actionable feedback.
  140. 17:27Uh, as in when you use score-based evals, unless your rubric is very well defined, then this does not exactly tell you what to fix.
  141. 17:42Uh, in such cases, using uh, binary type of evals or criteria, is preferred because there you have a kind of a call to action.
  142. 17:55If an eval or a criteria fails, then you know exactly what happened and how to kind of deal with that problem.
  143. 18:05Then, uh, another point is your LLM as a judge solution should be calibrated so that you don't have the, uh, scoring noise between judges because since LLM LLMs are undeterministic,
  144. 18:23what you will mostly encounter is the same judge can, uh, evaluate a problem different ways on each run.
  145. 18:33And then here, you have to make sure your LLM as a judge solution deals with this variance problem.
  146. 18:40Otherwise, it's hard to run experiments and conclusively say, "Hey, my initial or my improved version is better than my initial version of my agent."
  147. 18:54Mhm.
  148. 18:57Right.
  149. 18:58Uh, after then evaluation, basically, we go live and this is where then, uh, collecting, let's say, learned failures, failure or primary signals from the execution takes place.
  150. 19:20Um here the idea is again when an agent encounters a problem over time, there will most likely be multiple occurrences of these.
  151. 19:32So, it starts by identifying what failure mode uh that the agent has encountered and then grouping essentially these failure modes by the root causes and where they originate from.
  152. 19:50Again, this could be a section in the agent prompt.
  153. 19:53This could be missing tools or, let's say, malfunctioning tools.
  154. 20:00But, after your diagnostics results are categorized, then you can finally generate new evaluations.
  155. 20:10First, to detect these problems.
  156. 20:13And then, second, you can generate improvements and remedies based on these problems.
  157. 20:24And yeah, with that, over time, you have um build-up of these learned failure modes.
  158. 20:33So, then every agent over time uh gathers these historical data that it can always check against.
  159. 20:44When you uh start diagnosing, there's a bit of a upfront cost in the beginning because you often need to deep read the LLM traces to find out what's going on.
  160. 20:58Over time, you can collect code-checkable indicators per failure mode.
  161. 21:06What that means is there are maybe specific pieces of content or there's a specific tool called sequence where you know that the agent will encounter an issue and then this later on helps you to diagnose
  162. 21:22problems in your traces without actually having to read through all your traces.
  163. 21:28Now, why is that a problem?
  164. 21:30Because if you have let's say millions of agent traces and to read all of these uh it actually costs more than the execution itself.
  165. 21:44So, it's not the most efficient way of diagnosing the problems.
  166. 21:50Uh what you want to aim for is again try to uh pick a representative sample from your um whole traces by you know intelligent segmentation strategies and using again as I said the learned indicators.
  167. 22:13Okay, cool.
  168. 22:14And then with that you can finally start building the autonomous optimization loop because here then given that you have a eval suit, you can you know vary your feature again update certain
  169. 22:36or even run auto research style experiments to see that whether you can reach the desired or the target scores for your evals.
  170. 22:47As long as you can reach that then it's automatically shipped to production.
  171. 22:52Then from production you have your outer loop.
  172. 22:58Again, every issue that's found then on diagnostics gives you a improvement or a remedy which then you can optimize on and then as long as the eval suite is green then this again gets deployed to production.
  173. 23:16Let's continue now with the whole life cycle.
  174. 23:19Um yeah, as we learned now the details of each everything starts with a spec.
  175. 23:25Um you define and design it.
  176. 23:27Uh you build your agent and all of this can be done obviously agentic.
  177. 23:32So you define agents that do this work.
  178. 23:34And then they all together become uh the agentic AI engineer.
  179. 23:38Um you go through the offline loop where once you build your evaluation system uh yeah, you evaluate, you optimize, you test, you improve your accuracy on your test data set.
  180. 23:51Once you feel ready, you deploy it to production.
  181. 23:54And that's when the online loop starts.
  182. 23:57Here you get real feedback from users.
  183. 23:59Um yeah, uh you review the test cases, you continuously monitor them, you look at your live traces, you diagnose them as we learned before with the diagnose agent you can do root cause analysis, you can cluster your failure modes.
  184. 24:13Uh you'll derive new eval criteria from it.
  185. 24:16They become part of the spec.
  186. 24:18Uh they become part of the agent.
  187. 24:21So they they continuously grow with you while you use your agent in production.
  188. 24:26And uh yeah, this becomes the online loop.
  189. 24:29And the more use cases you collect, the more is production data you see, the better your agent becomes and the better scoring your agent becomes.
  190. 24:38And this all together now um becomes one end-to-end loop that you can run agentic.
  191. 24:44And uh yeah, from here on uh yeah, you can now see the combination to software-driven development with coding agents.
  192. 24:53You can transport this concepts also for AI engineering and building AI agents.
  193. 24:58And uh now, as we at Mutagen work on this, we're going to show you now how this looks like as a product.
  194. 25:06Um This is kind of how it looks like.
  195. 25:13Um for now, everything runs in your environment.
  196. 25:16And we it as cloud and local, um we'll offer a managed service down the line.
  197. 25:23Um so, it's a set of agents.
  198. 25:26We have two in research preview.
  199. 25:27The ones we talked deep about this in our talk.
  200. 25:30First one is the evaluator agent that helps you build an eval set, a good data set, because this is the core of the optimization, the eval driven development loop.
  201. 25:39The second one we have is the diagnose the diagnostics agent.
  202. 25:44It does you It helps you diagnose your traces you already have in productions, because we learned from our users that reading through these traces took them a lot of time, and having kind of they can just spin off from their coding environment to analyze the traces
  203. 26:00is very helpful to them.
  204. 26:03And as you can see here, um both of these agents um are connected through an orchestrator, which runs in your coding environment.
  205. 26:12And what you need basically is connectors to sources where you basically have all your traces, where you get your incidents from.
  206. 26:20This could also be like your ticketing system, um Slack where people report failures of your agents.
  207. 26:27Then you connect them.
  208. 26:28And then, obviously, as we mentioned before, there's different target platforms.
  209. 26:33Um this could be come a PR that automatically gets raised in GitHub.
  210. 26:37Um this could be just the adjustment of your agents in uh in MD files.
  211. 26:43Uh yeah, different frameworks we target.
  212. 26:45And or being deployed to managed services.
  213. 26:48Um yeah, kind of this is how our platform works.
  214. 26:52We spin up different agents.
  215. 26:54They are connected to an orchestra and I guess Burak, let's show uh our first agent in research preview to the audience.
  216. 27:05Uh in practice, as I said, you have um orchestrator which kind of handles the dispatch for all the other sub agents or stages we have.
  217. 27:18And then you can use it in any coding harness or agent you want.
  218. 27:26In this case, I'm using code code.
  219. 27:29But then what it will do is when you first boot up, it will show you kind of like a dashboard of which stages you have and also kind of the existing
  220. 27:39things in uh let's say your code base, your agents, and the prior configurations.
  221. 27:46Now here I have some start commands.
  222. 27:50These are basically, let's say, trigger commands for the workflows or specific stages.
  223. 27:57And if I type diagnose here, this will basically start the diagnostic stage for the root cause analysis.
  224. 28:07And here again, you can point the diagnostics into a specific scope.
  225. 28:13This can be an agent.
  226. 28:15This can be a skill as well.
  227. 28:17So you could basically diagnose all invocations of a particular skill.
  228. 28:24Here uh when you start the diagnostics, it will uh retrieve traces from your configured source platform.
  229. 28:36In this case, again, it can be something like LangFuse.
  230. 28:39It can be your local cloud transcripts or another you know, like a JSON L format that's like exported from one of the observability platforms.
  231. 28:53Now, the diagnostics run itself takes quite a while to finish, so I will show you instead a pre-generated kind of version of what it does and how that looks like in the end.
  232. 29:08Okay, so what do we see here now?
  233. 29:12So, basically, once you run the diagnostics agent, as I said, on your agents, you will get a um, generated HTML artifact, which basically shows you, you know, the details of your agent,
  234. 29:32which tools you have.
  235. 29:35Uh, then in general, if you if you have code access, it will also tell you which harness or the framework that the agent is using.
  236. 29:46And then here, in general, it will basically go through your traces and then select primary signals, or let's say failure modes, depending on how frequent they occur in the trace samples.
  237. 30:05Now, as I said, most of the time you don't want to read all of your traces because this is not cost-efficient.
  238. 30:14So, there the diagnostics use like a a multi-tier filtering or segmentation to kind of pick a representative sample, so uh, originally, a few, you know, pieces of the traces, or let's say,
  239. 30:35portion will be read by the LLM to see that if there any detectable obvious problems.
  240. 30:44And based on that, then diagnostics can decide or to focus on a particular failure mode or a signal.
  241. 30:54Uh the other option is then trigger the diagnostics, you can also specify an issue that you have seen yourself or issue that you're looking for.
  242. 31:08This could be something that the users reported.
  243. 31:12Uh in this case, it's again more of a guided search, meaning hey, if you tell the diagnostics agent you have a particular problem you're interested in, then it will try to find all
  244. 31:26incidents or occurrences regarding the same problem.
  245. 31:32Okay.
  246. 31:33And what do we see here in uh in yeah, in full here?
  247. 31:38Uh so, this is in general the overview, which tells you again which issues kind of were detected and kind of shows you like the frequency giving the given time frame.
  248. 31:56Then for each tab, you will have a failure mode and kind of like an explanation of the problem.
  249. 32:04And then here, you can kind of see where that problem comes from or why it happens.
  250. 32:12The agent will provide kind of like um uh recursive why chain, let's say, to then tell you, "Hey, this is where the issue is originating from."
  251. 32:25Now, in addition, it will offer you kind of remedies or fixes to deal with that.
  252. 32:33And then here, you will see an assumptions block.
  253. 32:36Uh here, this is important because uh when you are reading traces, sometimes you don't always have access to the code, so this helps us detect uh, LLM or let's say the diagnostics
  254. 32:53agent makes certain assumptions that are also not correct and we can see and correct them here.
  255. 33:00Uh, but in the end you will be presented by certain corrections or remedies, which then kind of can fix your problem.
  256. 33:10You can, you know, pick either the recommended or, you know, as many as you need as it's multi-choice.
  257. 33:18And once you basically go through all your problems, uh, at the end you kind of get to a decisions page and here again for those using, you know, text-to-speech
  258. 33:36or speech-to-text AI features like Whisper flow, there's always a general feedback box so that you can always talk into your mic.
  259. 33:46And finally, when you are happy with all the decisions, you get a markdown, let's say, um, task definition for your coding agent.
  260. 33:59So, all the fixes or the remedies can then be directly applied to once you go back to your terminal and to your coding agent.
  261. 34:11Thanks for the demo, Burak.
  262. 34:13So, last words on our product.
  263. 34:20Yeah, so, uh, thanks for listening into our talk.
  264. 34:24Um, yeah, I hope we could show you some, uh, good insights on how we envision the future of agent building with the Agent AI engineer.
  265. 34:32Um yeah, stop uh, the debugging.
  266. 34:36Um have agents do the tedious work and reach out to us if you have further questions.
  267. 34:42And yeah, have a great conference.