← All AI Engineer talks

AI Engineer World's Fair 2025

Containing Agent Chaos

About this talk

Solomon Hykes presents Dagger's approach to controlling autonomous coding-agent chaos through isolated container environments, asynchronous execution, explicit guardrails, and efficient human intervention. He demonstrates Container Use connecting Claude Code through MCP, supporting model-independent workflows, parallel experiments, Git-based inspection, and execution across remote infrastructure or CI.

Chapters

  1. 0:00DockerCon recollections and the platform-engineering agent problem
  2. 3:48Agent chaos, background execution, guardrails, and intervention
  3. 7:22Model-independent agents and the Claude Code MCP container demo
  4. 12:52Remote execution, parallel design experiments, and Git workflows
  5. 19:57Infrastructure flexibility, CI, and the container-use repository

Talk transcript

  1. 0:00

    [upbeat music] [audience cheering] Hello.

  2. 0:21

    Hello. Hmm. Okay, my slides are up. You can see them, right?

  3. 0:31

    That's me. Okay. Well, this is a very special moment for me because I just realized yesterday walking in, this is the exact same spot, the same stage actually, that I stepped on almost exactly day for day ten years ago to kick off DockerCon twenty fifteen. [laughs]

  4. 0:48

    Thought it was pretty funny. I don't know if anyone was there for that. Maybe this audience is too young, maybe. I don't know. [laughs]

  5. 0:57

    Okay. Well, uh, I'm here to talk about chaos, specifically the kind of chaos that emerges when you try to use, uh, coding agents. Um, and

  6. 1:10

    I wanna talk about chaos from the perspective of our community at Dagger, which is platform engineers.

  7. 1:18

    Um, I don't know if there's any platform engineers in the room.

  8. 1:24

    Okay. Just you and me, ma'am. [laughs] Okay. Well, it, it, it is known, uh, uh, sometimes, uh, as other things. But basically, platform engineers have a really tough job because they don't get to build and ship cool software.

  9. 1:39

    They get to enable all of you to build and ship cool software in the most productive way possible, right? Uh, it's a really tough job. It takes range, it takes experience, it takes a lot of patience.

  10. 1:50

    But we do it for the endless gratification, you know, just the gratitude we get from developers. Just kidding. [laughs]

  11. 1:59

    No one ever says thank you, but it's okay. Someone has to do it. Tough job.

  12. 2:05

    Speaking of enabling, anyone here use coding agents?

  13. 2:12

    We are outnumbered. Okay. Well, I, I wanna say to you congratulations and welcome to platform engineering. [laughs] Yeah. I mean, your job now is to enable robots to ship awesome software while you spend more and more of your time enabling them to do that productively, right? [laughs]

  14. 2:34

    Tough job. I, I, I, I applaud you for giving up really the most fun and rewarding part of the job, you know. [laughs]

  15. 2:43

    Very selfless. Uh, yeah. So of course, this is not a completely a reality yet. I mean, we're-- we don't have quite yet the team of agents just kind of, you know, humming along, doing the, doing the job while we sit back and, um, fix environments for them.

  16. 3:01

    But you can kind of see it coming, right? I mean, some of you are definitely doing that, hacking that together. There's a lot of cool posts out there, and scripts, and tools.

  17. 3:11

    Um, so we know it's coming. The question is, how do we enable this to, um, happen not just for this incredibly cool and, uh, bleeding edge crowd, but for everyone else?

  18. 3:26

    Uh, like, everyone shipping software any- everywhere, just sort of creating maximum value by enabling agents to do the work for them, ultimately taking their jobs. That is the dream, right? [laughs]

  19. 3:40

    Okay. So yeah, how do we do that and make it not too painful? Well, um, I wanna go back to basics. What is an agent?

  20. 3:48

    Uh, the famous definition, of course, is it's an LLM that's wrecking everything in a loop on behalf of a human. [laughs]

  21. 3:55

    The diagram is from Anthropic. Thank you, Anthropic. I tweaked the explanation just a little bit. Uh, in the context of coding agents, it looks like this. Um,

  22. 4:06

    oh, man, that was supposed to be animated. It's even better when it's animated. It's okay. Yeah, you get one agent, and it's doing stuff, and the environment is your computer.

  23. 4:15

    Uh, and it can do great work. It can all do-- also do very crazy things, so you have to kind of watch it closely, right? And approve. Approve. No, no, don't do that.

  24. 4:23

    That's crazy. Yes, that's good. Um, that's kind of the status quo today. But of course, um, we want

  25. 4:32

    to scale it, right? We want a team. So how do we do that? Well, right now, I would say there are two options,

  26. 4:38

    both equally wonderful and fun. The first one I call YOLO mode. [audience laughing]

  27. 4:45

    You know, I'll just run ten. What can happen? Uh, amazingly, this diagram is not the worst case scenario. [laughs]

  28. 4:55

    But yeah, you know, you get the idea. So the, the whole methodology of watching it closely just kind of falls apart really quickly because they're all stepping on each other's toes.

  29. 5:02

    They're sharing an environment, right? Okay. Enter option two. Oh, don't worry about that. We'll run the agents, right? We'll take care of everything. We've got background mode. We've got the, we've got the model.

  30. 5:12

    We've got the tools. We've got the environment. We've got the compute. We've got the secrets. We got everything. You know, just open an issue, wait for the PR, relax,

  31. 5:21

    until, of course, it doesn't work, and then you're like, "No, that's not what I meant." Um, but these, these actually work really well. I think, like, ten of those launched just ye- just today and yesterday.

  32. 5:32

    Um, and, and it-- they're great. It's just that,

  33. 5:36

    um, you know, sometimes you just wanna get in there, like, "Okay, give me the keyboard," you know? And sometimes you just wanna run it on your machine or on your favorite compute provider, right?

  34. 5:46

    Use your favorite model. You wanna mix and match. So there are limitations to this all-in-one model. So the question is, is there something better? Uh, is there just

  35. 5:56

    a scenario where I just got a team, and they're working, and, you know, I can step in or leave them alone, and we're just kind of getting stuff done together?

  36. 6:05

    So this is how I would summarize it, what I would want.

  37. 6:09

    There's really four things. First, I want background work. You know, I don't wanna be in there just watching every action. That's obvious. Um, I want rails, and that means I wanna be able to constrain the agent to, to not just do things that I already know are not necessary.

  38. 6:27

    So obvious things like context of the project, what's, you know, what's our coding style, what's our, our what tools to use, but also, here's how to build, here's how to test, here's the base image we, we use, right?

  39. 6:36

    You can access this secret, you can access that. Just an easy way to do that 'cause otherwise I'm gonna waste so many tokens just correcting as I go, right?

  40. 6:46

    The third is inevitably when I do need to step in, I really, I want a really efficient and seamless way to do that, and it can't be watch every action, and it can't be just wait for the PR and do co-review.

  41. 6:59

    You know, there's a... I need a middle ground here. And the fourth thing is I want optionality because like I was saying before,

  42. 7:06

    it's a crazy market. You know, there's, there's awesome models, awesome compute, awesome infrastructure. Uh, agents are really cool, and as cool as they are now, I mean, you... one of you is probably, like, launching one right now, and then there's another one tomorrow.

  43. 7:22

    So I don't really want to lock myself into a whole package today and say no in advance to whatever's coming out tomorrow. Not in this market. So to get that, um, I need an environment that has properties that match this.

  44. 7:40

    It needs to be isolated, right? So background work works. It needs to be customizable so I can set up those rails. It needs to be multiplayer so I can, you know, go, "All right, give me that.

  45. 7:50

    Let me fix this," or, "Let me check. Did you do it?" You know, when the model says, "I did it." Did you do it? [laughs]

  46. 7:58

    And then, you know, it should be open. No, no shade on making money and scaling a huge cloud service. That's great. You know, we have one. They're great. But I just want choice, right?

  47. 8:11

    I wanna be able to choose and get the bo- the best commodity, let's just use this word, it's okay. It's okay to use it. The best commodity component for each, uh, job.

  48. 8:24

    And, you know, could even be open source. Who knows? We could collaborate on this. Anyway, so

  49. 8:29

    unsurprisingly, maybe I'm gonna talk about containers now. [laughs]

  50. 8:35

    Someone actually said, "You know, you should check that they know Docker, they know containers." Uh, okay, who knows what containers are? Who's used containers? [audience cheers] Okay, cool, cool. All right.

  51. 8:45

    Boost my confidence a little bit. [laughs] But the point here is we have the technology, and it's, it's not just about containers, but they do play a crucial role because it's a foundational technology, and it is, it is underutilized.

  52. 8:56

    We don't fully leverage what this technology can do because we're used to the first incarnation of the tools made for humans. Uh, same thing for Git. I see a lot of hacks involving Git worktrees.

  53. 9:09

    Anyone playing with Git worktrees to, to get stuff done? Okay. You know what I'm talking about. So this is about that.

  54. 9:16

    Um, and of course we have models that are incredibly smart, getting smarter, and they, they can exercise these technologies, uh, really fully. We just need to integrate them in a native way so that we really, um, tackle the problem at hand, which is giving great environments to these agents.

  55. 9:34

    Anyway, so if we built that native integration, what would it look like? Well, we have a take. Sorry, we at Dagger... I forgot completely to mention my company. That's okay. [laughs]

  56. 9:46

    Um, it's great. Check it out. Um, we, we have a take on that, something we call Container Use. You know, there's computer use, browser use. Uh, these agents need container use.

  57. 9:58

    Um, they need a way to use containers to create environments and work inside of them. This is not the same thing as sandboxing, right? There are a lot of ways to execute the output of the agent in a secure sandbox.

  58. 10:09

    Very useful, very cool, but that's not the same thing as the agent developing inside of containers entirely, right? That's what we're talking about here. So

  59. 10:20

    I asked my team, "Hey, we've been developing this thing." Oh, it's open source, but it's not yet open source. Like, it's not finished.

  60. 10:30

    But I asked the team, "I should show it, right?" And they said, "Absolutely not. It's not ready." [laughs]

  61. 10:38

    So anyway, you want a demo? [laughs] [audience cheers] Okay. All right, just so we're clear, this is you agreeing to watch me stumble through a broken demo of unfinished software. Yes? [audience cheers] [laughs] Okay.

  62. 10:55

    So much could go wrong right now. [audience cheers] Okay.

  63. 10:59

    This is my terminal. Can you see it?

  64. 11:02

    Okay, for, for technical reasons, I'm not gonna go to full screen. You just gotta stop me when I reach the edge. [laughs] Oh, actually I can see it. Never mind.

  65. 11:09

    Okay. Yeah, old school. Okay. We used to do this all the time [laughs]

  66. 11:19

    in the old days. Okay. So, uh, here's what I'm gonna do. I'm gonna just, um, try to develop something very simple here. I got an empty directory. I'm gonna try, try and s- make a little homepage for my awesome Container Use project, and I'm gonna use Claude, Claude Code.

  67. 11:40

    I'm gonna try and use a bunch of them. Hopefully, I made something very clear. This is not a coding agent. It's environments that are portable that you can attach to any coding agent.

  68. 11:51

    That's the idea. So you like Claude, use Claude. You like, you know, Codex, use Codex, et cetera, et cetera, et cetera, in an IDE, in the command line, whatever, and also in the cloud, right?

  69. 12:01

    In CI. Lots of cool things you can do once you're async. So,

  70. 12:07

    okay. One of the reasons the team said, "Don't do a demo," is I'm, I'm actually terrible at using Claude. So, uh, I have an alias for remembering the flag to disable all, you know, permissions.

  71. 12:17

    I got-- I can never remember it.[laughs] And I have a prompt here.

  72. 12:22

    It's-- Yeah, I'll, I'll read it to you in a minute. But it's basically, make me a homepage. Uh, make it a Go web app, so I can know what, what's going on, 'cause I'm not a cool kid writing TypeScript.

  73. 12:33

    And run the app when you're done. So while this runs, while this maybe runs, hopefully... Okay.

  74. 12:41

    Okay, cool. So what's happening here is I configured Claude Code to use-- to, you know, with container use, to use containers literally. Um, via MCP, so it was an MCP integration.

  75. 12:52

    There were other integrations that we're working on, but MCP is the obvious place to start. Um, and so now it has, you know, all its usual tools. This is vanilla, uh, Claude Code.

  76. 13:04

    But now it can create an environment for itself, and now it's editing files in that environment, like in a little sandbox. And it can also run commands to build it and test it and, of course, run it in, uh, ephemeral containers.

  77. 13:15

    This is not one Docker container sitting there. Every time an action needs to be taken, there's an ephemeral container running and then being snapshotted and, and, uh, returning. So just doing its thing.

  78. 13:26

    Um, what would I wanna show here? Okay. So here, I'm gonna first show that nothing has been polluting my workspace. It's happening in the little sandbox. And the way the sandbox works, the state of these files and the containers that are being run is, um, actually persisted, uh, in Git, in a s- in a bunch of special

  79. 13:49

    Git objects that are kind of living alongside the repo. So it's right there if I need it. This is all local. Um, but it's not polluting my workspace by default.

  80. 13:59

    So hopefully it's gonna produce something soon. Uh, while it does that, I'm gonna use this little command line. Is this readable? Okay. Little command line, see you. Like, go work.

  81. 14:10

    See you later. But no, really, it's for container use. Um, and I can list environments, and you can see there's a new environment that's been created here, uh, with a little random name here.

  82. 14:21

    And so there's a few things I can do. One thing I can do is open a terminal.

  83. 14:26

    And here-- Okay, this part is powered by Dagger, right? The, but we use Dagger as a sort of a toolbox. Just it has all the primitives you need. Um, and so here I can see exactly what the agent sees.

  84. 14:40

    Um, the files, but also the tools, so I can see, okay, what, what Go version did you configure for yourself, all right? Because the model, the, the agent is given the ability to figure out what environment it needs and then configure that, but in a repeatable containerized way.

  85. 14:54

    Uh, so here I can see, okay, does it build?

  86. 15:00

    Okay, it builds. Okay, so you're done. What's going on? [laughs]

  87. 15:05

    Okay, while we do that, I'm also gonna show you... Actually, I had two more things to say. One, uh, a really cool feature of this that I'm not gonna show is secrets.

  88. 15:14

    So you can just plug in secrets from things like 1Password. I use 1Password. I don't wanna use a separate password manager from an AI company. No offense. I just wanna use my password manager.

  89. 15:24

    So I can just plug in and say, "This environment gets this secret," and boom, it can use it, right? Um,

  90. 15:31

    and the team said, "Please don't show that. That's just-- That's gonna break for sure." Um, so I won't. And the other thing I wanna say is that because it's all powered by Dagger, um...

  91. 15:41

    And the point here, it's containers and it's open source. That's what you should know. Uh, it's running on my machine. Actually, no, it's not running on my machine because we're at a conference, and there's a lot of things that can go wrong if you run containers and download images.

  92. 15:55

    So instead, I, I just have it running on my home server in my [REDACTED:location] about one mile this way, and it just kind of works seamlessly. It's streaming files up, streaming files down.

  93. 16:06

    It all just kinda works. Um, okay, this is the part that I cannot control, as you know. Um, okay, one more thing I'll show you. You can watch. So here I can see the history.

  94. 16:20

    So behind the scenes, every snapshot of the state is like a Git log. It's actually using Git under the hood. So if I'm happy with the result, I can go and get it.

  95. 16:28

    Uh, so it's like a happy medium between the, um... It's like the, a loop, a collaboration loop that's just right. It's not watching every tool and wrecking a shared environment, but it's not waiting for a pull request and, you know, having these long back and forth.

  96. 16:45

    It's right in the middle. I can see everything going on, and I can say, "Okay, give me the history of that. I want that." Okay. It says it's live.

  97. 16:52

    It's running. Ooh, pretty nice. Cool. [audience applauding] Okay. So now...

  98. 17:01

    Okay, I appreciate it, but you guys can be honest, it's a little boring. So this design is boring. [laughs]

  99. 17:09

    Make it really pop. Trying to impress AI engineering world fair audience.

  100. 17:22

    Okay. Okay, so the reason I'm s- I'm doing that is trying to create the circumstances where I would need a lot of parallel experiments, right? Make it pop. What does that mean?

  101. 17:31

    It can mean anything. What if I wanna try several experiments in parallel, right? So I'm just gonna say... Oh.

  102. 17:38

    Well, hold on one second. Stop. Before I do that, I'm going to, um,

  103. 17:46

    merge this, right? There's still nothing here, but I'm saying I like it. So I'm gonna say merge that environment.

  104. 17:54

    And I have it. It's my history. I can open a pull request. I can clean it up, whatever. So that's, that's a loop that I can work with, right?

  105. 18:03

    Um, and now I can say, "Nah, boring."

  106. 18:07

    And then I can say, since the environment is now in this state, I can ask for help from a few other agents, right? I can say, "Okay. Hey, Claude YOLO."

  107. 18:18

    Uh, nope, that's not right. "Claude YOLO, this web app

  108. 18:24

    looks a bit boring." Can you make it pop, please? Okay.

  109. 18:31

    And go. And go. And go. [laughs] Okay, so this is where real- things start really going wrong, but- [laughs]

  110. 18:46

    ... as the team pointed out, they said, they said, "Well,

  111. 18:50

    something's gonna go wrong, right?" I said, "Yeah, but you were kind of showing that if things go wrong, you can throw away the environment and you're good. You can restart."

  112. 18:56

    And they said, "Okay, that's cool." So, um, like let's say I don't like this one. I'm like, "Nope, goodbye. That's it." I don't have to go clean up the mess, right?

  113. 19:05

    That's the whole point. Uh, okay, so this is getting a little messy. Oh, I wanted to show Goose also. So Goose is a really cool open source agent. Whoops.

  114. 19:16

    All right, hold on one second. Goose YOLO. Same thing. Everyone has complicated flags for disabling all these safeties that I don't need anymore, right? 'Cause it's [laughs] [claps]

  115. 19:28

    Uh. Okay, so. Okay, well, really taking a chance here.

  116. 19:38

    So while this is happening [laughs], uh, one thing we've been working on, but it's like, it's still work in progress, is there's a watch command. I showed you that already.

  117. 19:47

    But as, so as, um... This is a Git command, right? Thinly wrapped Git commands. Our UX is really... It is, I cannot, words cannot express how unfinished this is.

  118. 19:57

    But, [laughs] but it's, it'll evolve rapidly because the, the bones are strong. It's Git, it's Dagger, and, you know, it's your existing agent, right? So it, it's just... And then a, a little bit of glue.

  119. 20:10

    Uh, so for example, here it is literally, it's a Git command that you can copy paste. Uh, but as the agents work, you're gonna see state snapshotting, and you're gonna see these branches just kind of, um, diverging.

  120. 20:23

    And then I can diff them and apply them, merge them, whatever I want. Um, and what I really wanted to show, and then I'm done, is just I just wanna see one of them run, so you can see when the agent runs a service, like, and go, in this case, go run, npm run, whatever, it's doing it

  121. 20:43

    in its containerized environment, and that's gonna seamlessly be tunneled to my machine here on a different port without any conflicts, right? So if, when, when I say the environment's isolated, it's the, it's the files, it's context, it's configuration, and it's execution, right?

  122. 20:59

    Uh, and the cool, the cool extra thing is all of this is actually, technically, this here is running in my [REDACTED:location]. [laughs] So you can go crazy on the infrastructure side.

  123. 21:08

    Like, you can run this on a cluster. We like to run this stuff from CI. Uh, it's just a lot of fun stuff you can do. And okay, I'm getting at 30 seconds.

  124. 21:19

    Come on. Oh, Goose is, oh, Goose is running. Great. Okay. [laughs]

  125. 21:26

    I- We did not solve prompt engineering. Do it.

  126. 21:30

    Okay, not done. Not done. Oh, man. Okay. Well, just imagine [laughs]

  127. 21:38

    Okay. Well, uh, while this happens, 'cause I got 30 seconds left,

  128. 21:42

    I'm just gonna say, um, thank you. And there's one last thing I, I wanna say about DockerCon. 10 years ago, we used to open source stuff on stage all the time.

  129. 21:52

    So if you want, I can go and open source it right now. [claps]

  130. 22:03

    Okay. You have been warned though about the not finished part, right? Okay. [laughs]

  131. 22:10

    Okay. Oh, I think my... It would be funny if the demo failed at the clicking on GitHub part. [laughs] Okay. All right. Goodbye. Goodbye. Next time. I promise it works. [laughs]

  132. 22:25

    Okay. Haven't done this in a while. Wait. Oh. [laughs]

  133. 22:35

    I'm almost done, I promise. Come on. You did so well.

  134. 22:42

    Change visibility. Whoo. Yes. I want... Yes. Whoo. [claps] I have read and understand. [claps]

  135. 22:50

    Oh, God. Oh, God. [laughs] Oh. [laughs]

  136. 23:06

    Whoo. Whoo. [claps] Yes. At Dagger, we take security very seriously. [laughs]

  137. 23:15

    Okay. [laughs] All right. I think it's... Wait, I think it's done. [claps]

  138. 23:22

    Whoo. [claps] [laughs] Yes. Okay. So yeah. Thank you very much. And it's, uh, github.com/dagger/container-use. Come say hi, come participate, and thank you so much for having me. [claps]

  139. 23:41

    Whoo. [upbeat music]