Your agent architecture has a half-life of 6 months — Dan Farrelly, CTO, Inngest

AI Engineer · 19 min · 254 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:06[music]
  2. 00:12Going good.
  3. 00:13All right.
  4. 00:14There we go.
  5. 00:16All right.
  6. 00:17Hello everyone.
  7. 00:18All right, just checking voice.
  8. 00:20All right, good.
  9. 00:22All right, well uh my name is Dan and I'm here to talk to you about how your agent architecture has a half-life of 6 months.
  10. 00:33But first who am I?
  11. 00:36I'm Dan, I'm the CTO and co-founder at Ingest.
  12. 00:39And why should you listen to me?
  13. 00:42Well, first I lead an amazing team over at Ingest.
  14. 00:45We We build a system that reliably executes anything from agents to workflows to contact pipelines, whatever you want.
  15. 00:55I'm deep building AI infra every [clears throat] day and on top of that also building agents, not just pontificating up here in theory about how you should build it.
  16. 01:07So speaking of building agents if you've been building agents for more than 6 months, you've likely rewritten something, maybe more than once.
  17. 01:18A new model a new framework or framework version new tool calling standard, a new pattern, suddenly your architecture doesn't fit.
  18. 01:29It's not a complaint.
  19. 01:30It's just the reality.
  20. 01:32Right, things move faster than ever.
  21. 01:34You can see if you've been to any of the the sessions or keynotes.
  22. 01:38So I want you to think about what you shipped 6 months ago and how much of it still runs the way that you originally wrote it.
  23. 01:52Some parts of your code likely survives.
  24. 01:54But did they survive by accident?
  25. 01:57Or did you design it that way?
  26. 01:59Did they survive by design?
  27. 02:03How did you actually architect your agent?
  28. 02:06Did you architect it at all?
  29. 02:08It's okay.
  30. 02:09Uh did you use a framework?
  31. 02:11Did you custom roll something?
  32. 02:14Was the architecture an intentional design that you really thought through?
  33. 02:18Or just kind of evolved into what you have now?
  34. 02:21These are all various ways of where people are these days.
  35. 02:25So, a lot of folks have talked about harness architecture, building harnesses.
  36. 02:33But mostly, I think a lot of people draw diagrams and they talk about specific components.
  37. 02:39Draw just nice lines.
  38. 02:40It looks very similar like, you know, kind of simple.
  39. 02:44But I want to talk about the conceptual layers when you're building a system like this.
  40. 02:49This is maybe the mental model.
  41. 02:51Not specific components.
  42. 02:54So, in my opinion, there are three discrete layers.
  43. 02:58First, the execution layer.
  44. 03:01I think of this as the brain.
  45. 03:03It's where flow, state, durability, retries happen.
  46. 03:09Then there's the context layer.
  47. 03:11This is the knowledge.
  48. 03:13All right, this is models, prompts, tools, memory.
  49. 03:18This is the layer that changes the most.
  50. 03:21And then there's compute.
  51. 03:23There are um this is the hands, right?
  52. 03:26This is sandboxes, runtimes, browsers that you're automating.
  53. 03:32I think these layers are important to consider for the following reason.
  54. 03:37It's your half-life.
  55. 03:39And what is half-life?
  56. 03:40All right, it's a scientific term.
  57. 03:42And it's a scientific term for the time that it takes for your for something to decay by half.
  58. 03:51And I think that your architecture has a half-life, also.
  59. 03:55So, prompts last weeks, if you're lucky, maybe maybe a single week.
  60. 04:00Uh the models that you use, months, again, if you're lucky.
  61. 04:03Uh but I think that execution can last years, if you do it right.
  62. 04:09So, the problem is that I think that most teams couple everything together.
  63. 04:15And what happens then is that one layer's half-life kind of leaks and drags the other components down.
  64. 04:21You're building it's technical debt by another name.
  65. 04:25So, my thesis is think in layers.
  66. 04:30Decouple them.
  67. 04:33So, let's talk about what I mean.
  68. 04:37Teams run into a lot of issues with the approaches that they choose.
  69. 04:40You might choose a framework, it might feel super magical to get going.
  70. 04:44You might grab a pre-built harness from one of the frontier labs or wherever.
  71. 04:50And or you might custom roll the entire system yourself, and it might take months or weeks or whatever.
  72. 04:55But I think in a lot of these situations, the abstractions either are not there at all or they're too high-level or the layers merge.
  73. 05:04You know, like orchestration is buried deep inside the chain or inside the framework, and you don't know what the heck's happening.
  74. 05:11Uh state might be kept in a sandbox.
  75. 05:14Uh retries get tangled with prompts, the prompt logic.
  76. 05:19And what's hard is you can't re- you can't like swap any of these things out without rewriting almost everything.
  77. 05:26So, I think you need to embrace the change.
  78. 05:30Know that things are going to change.
  79. 05:32Know that things are moving fast.
  80. 05:34But I think also with that is I want to focus on a layer that I think is the stable layer here.
  81. 05:39Where you can invest and think about and get your abstractions right, so you don't need to rewrite a large component every 6 months.
  82. 05:48So, I'm talking about the execution layer.
  83. 05:50I don't think enough people talk about this.
  84. 05:53And I define it as the execution layer as being the system responsible for running your code reliably, managing how, when, or whether each piece of work completes.
  85. 06:06And that's independent of the infrastructure that it's on.
  86. 06:11So, what does this look like in an agent architecture?
  87. 06:14So, the execution layer manages the full life cycle.
  88. 06:19You know, plan, call a model, run code, invoke a sub-agent, loop, retry, coordinate.
  89. 06:28You can swap the model, swap the context, swap the sandbox, the execution layer should be able to remain the same.
  90. 06:35It's just the the fundamentals.
  91. 06:37And that's how you, I think, decouple and you build the system that it can evolve for change.
  92. 06:43So, let's talk about what the execution layer has to do.
  93. 06:47First, resumability.
  94. 06:50Your execution layer must enable your system to pick up after failures without restarting from the beginning.
  95. 06:59You know, agents are handling longer-running tasks than ever before.
  96. 07:03So, they must be able to resume when an LLM call fails, a tool call fails, everything flakes out.
  97. 07:09We all know.
  98. 07:11So, if you have a failed reflect step 38, you should be able to retry, wait, continue onwards, instead of having to go from the beginning, and you're going to lose tokens,
  99. 07:23costs, time, work that your agent might have completed.
  100. 07:28So, for this this to work, a 3-hour run cannot hold state in memory or in disk.
  101. 07:35The state must live outside of the work.
  102. 07:38So, this means that the state must be durable and external.
  103. 07:43So, without it, you might cobble together maybe some manual checkpointing.
  104. 07:48You might come up with a system that has like a log-based approach where you're going to be like hydrating the state back if you have to pick up where you left off.
  105. 07:57But, I think a lot of those abstractions start leaking into the other layers of your harness, right?
  106. 08:01It gets harder to change.
  107. 08:04So, next, a key aspect of the execution layer is that it must enable you to combine a lot of invocation patterns.
  108. 08:13You're going to need crons.
  109. 08:15You're going to need to trigger things with events.
  110. 08:17You're going to need APIs, human in the loop.
  111. 08:20Subagents or dynamic workflows also must be possible.
  112. 08:25You're going to need to be able to invoke these things synchronously, asynchronously, delaying invocation.
  113. 08:33And I think the key here is that flexible execution and orchestration primitives will enable you to build the pattern or the system the architecture that you actually need.
  114. 08:46So, if not, I think again, your harness logic starts absorbing other concepts like queues, workers, polling, backoff, scheduling.
  115. 08:56And now you end up kind of a mess bad abstractions.
  116. 09:01So, lastly, execution needs to provide observability across your entire session.
  117. 09:09Not just the LLM calls, the tool calls, but database errors, permissions issues, um triggers, performance.
  118. 09:19So, the full session trace across your entire run is essential.
  119. 09:23So, if you can't see the entirety of a trace from the trigger through the whole stack, it's really hard to debug it, let alone improve your agent and keep evolving it.
  120. 09:37So, what about sandboxes?
  121. 09:39Sandboxes are so hot.
  122. 09:41So, agents need sandboxes.
  123. 09:45We kind of like settled upon that at this point in time.
  124. 09:48They need to execute code.
  125. 09:50They need to browse.
  126. 09:51They need to manipulate files.
  127. 09:53They might work on disk.
  128. 09:55But, a sandbox is ephemeral and stateless by design.
  129. 10:00So, using it for durability, snapshots, or something in state, I think is an anti-pattern.
  130. 10:05I think it's a difficult thing where the state gets lost and you're kind of trying to peel pull the pieces back together.
  131. 10:12So, I think when you have the execution layer separate, the execution layer is what gives the sandbox its context, its sequence, its durability.
  132. 10:22So, I think of the sandbox as the hands and execution as the brain.
  133. 10:29So, So, what's next?
  134. 10:32All right, what are the next six months of architectures that you're going to need to handle?
  135. 10:38So, if you're paying attention, you're joining a lot of these sessions, you'll see what architectures are emerging and what each approach brings new engineering requirements.
  136. 10:49You know, you have background agents, dynamic workflows, autonomous loops, agent factories, whatever you want to call it, all these emerging trends that we're seeing the last couple days.
  137. 11:02They're all long-running.
  138. 11:04They're asynchronous.
  139. 11:06They're delegated.
  140. 11:09That means that you need to be able to observe them all uh down to the core.
  141. 11:14All right, they need to be inspectable by human and by an agent.
  142. 11:18So, the patterns, as you see, they as these things emerge, they must be mixed and combined together.
  143. 11:26So, what does this all have in common?
  144. 11:29I think that execution is fundamental to building any of these systems.
  145. 11:33So, let's just take one example here, background agents, right?
  146. 11:38They're not request response.
  147. 11:39There's no person just waiting there for you for the the the chatbot to respond.
  148. 11:43So, it could might run for minutes or hours.
  149. 11:46It's going to have maybe hundreds of calls to you know, maybe 200 tool calls.
  150. 11:52You're going to probably guarantee to have at least one failure in that.
  151. 11:56So, you can't even debug your background agent that's running asynchronously without the right infrastructure, without the observability, without everything that's going on in that process or multiple processes.
  152. 12:11And another example that we have is is loop architectures.
  153. 12:16Right?
  154. 12:16I think we're talking about slash loop commands and whatnot and coding agents, but I think where we're taking this is how are you building actual systems in your products that employ these these these approaches.
  155. 12:30So, like what is a loop?
  156. 12:32Right?
  157. 12:32A loop is a system that basically just runs continuously or on a schedule and it's assessing the state of the system against the the goals that you set or the criteria that you set and determines what to do next.
  158. 12:45So, you're going to need crons, sub-agent delegation, the history needs to be inspectable, and of course it needs to be reliable because you don't know when things are running or how the system is continuously
  159. 12:57continuing to evolve.
  160. 13:00So, the frameworks of 3 months ago were not designed to handle this.
  161. 13:05Right?
  162. 13:05Like you're going to need to design these systems yourself.
  163. 13:09So, I think you're going to need a proper execution layer.
  164. 13:12So, let's look at just some examples of code.
  165. 13:14It's small on here, but in general, let's just look at how we might put it together.
  166. 13:20In your loop, you're going to need some sort of cron.
  167. 13:22Maybe that cron here is some sort of health check system runs every 30 minutes, pulls down some key high-level system metrics, and it looks you pass to an LLM.
  168. 13:33You say, "Is this healthy?
  169. 13:34Is this looking okay?
  170. 13:35Should we do more?
  171. 13:37And it is it is healthy or not?
  172. 13:38What should we do?"
  173. 13:39And if it isn't healthy, maybe you just invoke a a triage agent that goes and looks at that individual service and goes and digs more.
  174. 13:47It's pretty simple looking, right?
  175. 13:50Now you have this triage agent itself.
  176. 13:52You've just triggered it.
  177. 13:54This should maybe pull some more context, pull some detailed metrics.
  178. 13:58It's just context.
  179. 13:59And then you're passing to the LLM to start that investigation.
  180. 14:03Putting in a loop, you're calling some tools, trying to get to the root cause.
  181. 14:07This may run for a minute.
  182. 14:09This may run for multiple minutes.
  183. 14:11It needs to spin up a sandbox, uh maybe clone code, maybe analyze commits.
  184. 14:16It's going to be doing a lot of work here, and you don't know when this is going to run.
  185. 14:20It might run, it might not.
  186. 14:21How do you know?
  187. 14:21How do you observe that system later?
  188. 14:24And then to complete the loop, there you may have a reviewer function, right?
  189. 14:29Like, are we Is the system actually performing as expected?
  190. 14:34Right?
  191. 14:34Like, it's going to run every week and look at the history of what just happened and evaluate how the triage system is working.
  192. 14:42Do we need to adjust the prompts?
  193. 14:44Do we need to do better metrics?
  194. 14:45Does this have the data that it needs?
  195. 14:47Is it doing anything at all?
  196. 14:48Is it overreacting?
  197. 14:51So, it needs to be execution aware.
  198. 14:53And I think it needs to be execution aware, orchestration aware, because it needs to be able to pull the logs of the system and understand, all right, what was executed?
  199. 15:00What did this agent choose to execute?
  200. 15:03What sub agents did it fan out?
  201. 15:05What workflows did it call upon?
  202. 15:09And then it needs to be able to analyze that and understand what happened and come back to you, either make the change itself or tell you this is where we performed or underperformed.
  203. 15:18This is what we can do, how we can improve the system overall.
  204. 15:21So, this completes this improving loop.
  205. 15:24It's three functions.
  206. 15:25It's pretty simple by design.
  207. 15:27It's flexible to iterate on.
  208. 15:29I know things get always a lot more complex in production, but I think about when when I think you think about the layers this way, makes things a little bit little bit easier to think about building such a complex system that feels like it's,
  209. 15:40you know, something that you might not be able to reach right now.
  210. 15:44So, in the spirit of the reviewing functions, what do you think about measuring your agent, how your agent is performing?
  211. 15:53You know, I think what's interesting is this execution layer sits between what your users' input is and what's happening throughout the system.
  212. 16:02So, user feedback, actions, um and the results of the sessions all flow through this execution layer.
  213. 16:10And I think this makes it uh an ideal place because it becomes the hub for observability.
  214. 16:15And it allows you to be able to score and understand what your agent is doing.
  215. 16:21So, to iterate on your application, you kind of need all this data connected and it needs to be aware of how your code is actually executing.
  216. 16:29Right?
  217. 16:30So, I think the the linking of this is is extremely important.
  218. 16:33So, this is what we built Ingest for.
  219. 16:37We're durable execution for AI agents.
  220. 16:40We're the execution layer.
  221. 16:42You can plug in any context layer, bring a model, framework, tool, any compute layer.
  222. 16:49Bring whatever sandbox you want.
  223. 16:50Bring whatever browser you want.
  224. 16:52You get durable steps, small primitives, right?
  225. 16:55Uh event triggers, scheduling, agent-to-agent coordination, full session traces, no infra to manage.
  226. 17:05And I think like I just mentioned with scores, we also think that that that the middle of the execution layer, when your agent is running, is a key place to instrument
  227. 17:15and score your agents.
  228. 17:17When you have access to the data that you need that's all flowing through there or you've just executed something, it's a perfect place to run something after and defer some scoring
  229. 17:29for with the whole trace information, maybe the inputs and the outputs.
  230. 17:33So, again, that's just execution orchestration, delayed task deferrals on and since there's also data flowing through, you can also wait for additional events and attach them to the sessions that you're building and understand
  231. 17:51did this did this actually work, right?
  232. 17:53If you're if you're running this triage, um was this triage successful?
  233. 17:57Did it result in an action by the engineering team?
  234. 18:00Then that means it probably was a positive result.
  235. 18:02Instead of a thumbs up, thumbs down, it's like did we open the PR, right?
  236. 18:06If it's a research agent, was this research saved?
  237. 18:09Was it a good report?
  238. 18:11That is these these things that are events that you should be able to attach and when you have a system that can connect all these pieces, I think it's really makes doing a lot of those things
  239. 18:20um like creating outcome-based scores a lot easier.
  240. 18:25So, to wrap up, build your harness.
  241. 18:30You know, understand the layers of the architecture.
  242. 18:32We have to embrace fast-paced pace of change.
  243. 18:37And I think if you can get your execution layer right and think about the right primitives, everything else can quickly evolve around it.
  244. 18:44And the next 6 months, the next 3 months will all be a lot easier for especially as everything continues to change.
  245. 18:50You all are here.
  246. 18:52So, thanks for listening.
  247. 18:54I'm Dan.
  248. 18:55Um come and find me at the ng-js booth.
  249. 18:57We're right on the other side of this wall.
  250. 18:58We're very bright and orange.
  251. 19:00So, thanks everyone.
  252. 19:02Appreciate it.
  253. 19:18[music]
  254. 19:19Mhm.