Building Self-Improving Agent Software Factories — Suraj Gupta, Warp

AI Engineer · 12 min · 132 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:12Um my name is Siraj Gupta.
  2. 00:13I lead Harness development at Warp.
  3. 00:15Um in case you haven't heard of Warp before, um we started off by building a state-of-the-art agentic development environment.
  4. 00:23Um we have about a million active users that use that.
  5. 00:26Um it was born out of a modern-day terminal.
  6. 00:28Um and nowadays we're building a um cloud agent platform to enable teams to build software factories.
  7. 00:35Um today I'm going to talk about um self-improving software factories, which I know might sound kind of buzzy, um but I'm going to break it down and hopefully you can walk out of here with something concrete
  8. 00:46that you can implement yourselves.
  9. 00:48Um you've probably heard of both of these terms, self-improvement and software factories, used throughout this conference, but I'm sure you've heard of them independently.
  10. 00:57Um you've heard about how self-improvement is about agents being able to um improve over time and agents and models and, you know, phasing out humans from that loop, so that way the the improvement loop can be automatic.
  11. 01:12Um and I'm sure you've heard about software factories being um the way that like the software development paradigm is shifting from individual coding agents to building out automations that take work from triage
  12. 01:25up until production.
  13. 01:26Um but less has been said about how software factories themselves can self-improve over time, so that the the factory can get better, more efficient, faster.
  14. 01:36Um and I think this is going to become an extremely important part of our jobs as software engineers as we transition from building products to building factories and and maintaining them.
  15. 01:46Um so let's dive in.
  16. 01:48Um self-improvement is a pretty broad umbrella, but I'm going to focus on three concrete ways that agents can improve over time, agent factories can improve over time.
  17. 01:58I'm going to start with um skills, then we'll talk about persistent memory, and then I'll finish off by talking about model routing.
  18. 02:04Um so skills are a great way to give your agents procedural memory.
  19. 02:09I don't think I have to kind of spell that out for you.
  20. 02:11You describe a a procedure to your agent that you expect it to have to do a task over and over.
  21. 02:17Um for example, let's say you're building a triage agent, which is a pretty common thing you might build in a software factory.
  22. 02:23Um and you give it a skill on how you want it to go about reproducing issues.
  23. 02:28Um those skills get stale over time.
  24. 02:30Um humans give feedback to the agents.
  25. 02:32Agents learn things in their own um runs and trajectories.
  26. 02:36Um and the like the skill that you previously gave it becomes dated.
  27. 02:41So, how do we fix this and let the agent improve over time using that skill?
  28. 02:45Well, one way to do it is to deploy an outer loop agent.
  29. 02:49Um and this is what we've done in our own internal software factory that's been really productive.
  30. 02:53The idea is that your um your inner loop agent is the thing that's actually applying the skill.
  31. 02:59It's like doing the triage.
  32. 03:01And then you have this other outer loop agent that is observing your inner loop agent's runs and improving its skill over time by looking for um for mistakes it made or looking at feedback that the human has given it.
  33. 03:14Um so, I'm going to show an example of that.
  34. 03:16Um let me swap here.
  35. 03:19Cool.
  36. 03:20Um so, this is actually a skill that we've used internally at Warp.
  37. 03:23We've open-sourced our client repository and it's fully run as as a factory.
  38. 03:28And so, this is an example of an of a of a skill that's that's backing a triage agent that we have today.
  39. 03:34The idea is that um you you get an issue that comes in on GitHub, and you want to automatically run an agent to figure out like what sorts of um like it what sort of information did the user not provide that is going to help us figure out if this is something that we should build, an existing
  40. 03:50issue that we might actually just want to dedupe against or something else.
  41. 03:54Um and then we have a Sorry, let me just switch over here.
  42. 03:59And then we have a workflow that actually like runs that that triage um agent.
  43. 04:06Um this is a pretty simple workflow.
  44. 04:07It just Every time an an an issue gets submitted on the repo, this um this workflow runs.
  45. 04:13And then here's the actual outer loop agent, which is about looking at the the work that the triage agent has done and improving it over time.
  46. 04:20So, the idea is that the agent looks at the decisions that the triage the inner loop triage agent made, and it um collects feedback signals, which might be uh you know, thumbs up or thumbs down on the issues.
  47. 04:33Um it might be users commenting on the issue.
  48. 04:35It might be someone from Warp um an employee of Warp commenting on the issue, uh giving the agent feedback on what it did.
  49. 04:42Um and then ultimately that leads to like some synthesis of of the of that um iteration.
  50. 04:49And so, we we end up basically updating our inner loop skill with this outer loop agents.
  51. 04:54Um and that's what leads to this self-improvement loop with skills.
  52. 04:58What's really nice about this is that um the So, in step four, you'll see we we added the triage skill, and then we open a pull request.
  53. 05:05So, that means that um all of the improvements to the inner loop skill are going to be tracked through get.
  54. 05:10So, you get like full observability into like how that skill is transformed over time.
  55. 05:15And that it also means that um a human is actually going to review those updates to the skill.
  56. 05:19So, that way, you know, this this outer loop agent doesn't make a mistake and ultimately cause your triage agent to to actually perform worse.
  57. 05:26Um yeah, so that's that's kind of what what I want to talk about for skills.
  58. 05:31Um let me talk about persistent memory now.
  59. 05:35So, I'm going to go back to my deck.
  60. 05:37Um cool.
  61. 05:39So, skills are great for remembering procedures, but what about everything else?
  62. 05:43So, like what what happens when your Sentry agent um looks for an issue and and finds an issue, does some work to like gather context about it, and fixes it, but then now you have you encounter a similar issue in the future.
  63. 06:00Your century your agent might get lucky and like be able to figure out the same root cause that it did the first time around, but that's not guaranteed.
  64. 06:08And and even if it does, you're you've probably wasted a lot of tokens re-gathering context on an issue that you've already fixed before.
  65. 06:15So, that's where something like persistent memory comes in.
  66. 06:18You can think of this as a fact store scoped to an agent.
  67. 06:22Your agent runs and similar to the skill improvement loop, you have an outer loop agent that's going to extract facts, learnings, outcomes from your from your inner loop agent.
  68. 06:30So, that way future runs of the agent can lean on what's already been done in the past.
  69. 06:35So, I'm going to show an example of this.
  70. 06:37Come back to the deck here.
  71. 06:39So, in warp or in Oz rather, like I mentioned, we built out a a cloud agent platform where you can run agents in the cloud.
  72. 06:46And for all for all these agents, you can attach memory stores to them.
  73. 06:51Again, a memory a memory store is a collection of facts.
  74. 06:54In this case, I have a century agent that has collected some memories over time about root cause analysis that it's done in the past.
  75. 07:03What's cool is like you can actually version this memory, you can update it as a human, create new memories or delete them yourselves, but primarily this this memory creation loop is driven by agents.
  76. 07:13You can also see where these memories were sourced from.
  77. 07:16So, I can actually like open up the run here to see Oh, well.
  78. 07:22I think this my IP address here keeps changing and this my our staging platform is gated to an IP address, but anyways, you should like you can see where those memories were sourced from.
  79. 07:33So, that way you can be like, oh, like maybe that wasn't actually an important memory or that was kind of like a local maxima that I don't want to include in my memory store.
  80. 07:40Um and then when your agents continue to run, so in this case I have the sentry agent that's um that's done a bunch of runs after it's created those memories,
  81. 07:49it actually can lean on those memories in the future um when it's making um when it's triaging new issues.
  82. 07:55So in this case, you'll notice that um this agent ran, it did a bunch of work to do some root cause analysis, and then it ultimately reported back on which memories it used
  83. 08:04um uh in this case it it it it was able to use those um five memories that I had in that memory sort to to speed up the work that I did this time around.
  84. 08:13Um, cool.
  85. 08:16Uh let me go back to the deck.
  86. 08:20So, what's cool in Oz is that persistent memory works across all harnesses, so Warp Zone, proprietary harness, plot code, Kodak, it doesn't really matter what you're running on Oz,
  87. 08:29um memories will automatically be created for you.
  88. 08:32Um, but you also have the control to to review those memories, version them, delete them, or edit them as you please.
  89. 08:39Um, all that being fully traceable.
  90. 08:42Um, cool.
  91. 08:43That's what I wanted to say about memory.
  92. 08:45Um, last thing I want to talk about here is model routing.
  93. 08:48So, um you may be wondering how this plays into self-improvement loops for um factories.
  94. 08:54Well, first I want to touch on why model routing is important in a factory in the first place.
  95. 08:57Um, it can become prohibitively expensive to run all of your agents that are doing simple things like triage or fixing simple CI failures with Opus.
  96. 09:05That's just like going to be really expensive over time, and I'm sure some of you have maybe been burnt by this or have heard stories of of or organizations being burnt by this.
  97. 09:14Um, so model like choosing which models you use for which tasks that is actually very important um and something that we're we've been working on at work.
  98. 09:21Um, so in Warp, you can actually use uh our out-of-the-box model routers, we call them our auto models.
  99. 09:27Um, over like as new models come out, we're all we're always evaluating like what are the best models when it comes to Pareto efficiency.
  100. 09:33And so, like if you're a new user and you just want to get started, it's much better than like pinning your model to like Opus or or or Haiku, for example.
  101. 09:42Um let me show you all um that experience in Warp.
  102. 09:47So, let me go here.
  103. 09:53Give me 1 sec.
  104. 09:54Got to drag this over here.
  105. 09:56So, here I have my Warp desktop um and you can see that um alongside being able to define models um being able to use Warp's auto models is one option,
  106. 10:07like these models here, but you can also define your own model routed um uh models, which uh basically boil down to like a set of rules that you can give
  107. 10:16um to us and we will like make decisions about model routing based on those rules.
  108. 10:21So, here I have an example of a configuration file that I've defined um where I've defined a few different rules about like I want database migrations done with with GLM fire with GLM
  109. 10:31or I want um you know, uh runbooks and API documentation done with Quen.
  110. 10:36Um So, this really allows you to like like to define classes of tasks and be able to say, "Okay, I want this this class of task done by this model because that's kind of what you've seen."
  111. 10:47At this point though, that's kind of more of an art than a science um and so uh what we're working on next is being able to define evals for
  112. 10:56um customer-facing evals where you can actually define what sorts of things you care about and what knobs you want to turn on these configurations and actually see, "Okay, is is Haiku better than fi- than GLM than Opus in a specific class of issues?"
  113. 11:11That's like specific to your workflows and not just some like generic benchmark that um that someone posted online.
  114. 11:19Um let me go back here.
  115. 11:20Give me a sec.
  116. 11:24Cool.
  117. 11:30Cool.
  118. 11:31Um and yeah, so let me uh I'm in my slideshow.
  119. 11:42So, here is kind of like a a high-level overview of how this works in Warp today.
  120. 11:46So, um internally we have our model routing rules, um but then we have like an eval sidecar that's determining um what sorts of tasks are actually better with which models.
  121. 11:56And we do this with a simple like best-at-k um approach where when you type a prompt, we run a bunch of agents in Oz uh across a different set of models.
  122. 12:04Um and we found success in like being able to determine, "Oh, like UI tasks are really well done with GLM.
  123. 12:10Um we don't really need to run those with Opus.
  124. 12:11It's much more efficient to run those with GLM."
  125. 12:14Um so, that's how we've been using it, but um sooner enough we're going to be building this into our product so that way our our customers can actually use it in their own workflows.
  126. 12:22Um Yeah, that's uh that's mostly what I had today.
  127. 12:25Um we're around in a booth around that side.
  128. 12:28So, if you're interested in this kind of stuff, come talk to me.
  129. 12:31I'm always down to talk about this kind of stuff.
  130. 12:33But yeah, thanks for your time today.
  131. 12:34That's all I had.
  132. 12:49[music]