Live data from Hacker News

Coding Agent VMs on NixOS with Microvm.nix

michael.stapelberg.ch

11–20 of 58 posts

Re: Coding Agent VMs on NixOS with Microvm.nix

#12
post #5

That is quite an involved setup to get a costly autocomplete going. Is that really where we are at? Just outsource convenience to a few big players that can afford the hardware? Just to save on typing and god forbid…thinking? “Sorry boss, I can’t write code because cloudflare is down.”

Keep in mind that this setup is a one-time cost. Also, a lot of the code is related to configuring it the way the author wants it (via Home Manager).

Generally speaking, once you have a working NixOS config, incremental changes become extremely trivial, safe, and easy to rollback.

Re: Coding Agent VMs on NixOS with Microvm.nix

#14
post #11

Couldn't you replicate all of your setup with qemu microvm? Without nix I mean

Yep. What nix adds is a declarative and reproducible way to build customized OS images to boot into.

Nix is the best answer to "works on my machine," which is a problem I've seen at pretty much every place I've ever worked.

Re: Coding Agent VMs on NixOS with Microvm.nix

#15
I was looking for a way to isolate my agents in a more convenient way, and I really love your idea. I'm going to give this a try over the weekend and will report back.

But the one-time setup seems like a really fair investment for having a more secure development. Of course, what concerns the problem of getting malicious code to production, this will not help. But this will, with a little overhead, I think, really make development locally much more secure.

And you can automate it a lot. And it will be finally my chance to get more into NixOS :D

Re: Coding Agent VMs on NixOS with Microvm.nix

#17

[flagged]

Precisely! There's a fundamental tension: 1. Agents need to interact with the outside world to be useful 2. Interacting with the outside world is dangerous

Sandboxes provide a "default-deny policy" which is the right starting point. But, current tools lack the right primitives to make fine grained data-access and data policy a reality.

Object-capabilities provide the primitive for fine-grained access. IFC (information flow control) for dataflow.

Re: Coding Agent VMs on NixOS with Microvm.nix

#20

we run ~10k agent pods on k3s and went with gvisor over microvms purely for density. the memory overhead of a dedicated kernel per tenant just doesn't scale when you're trying to pack thousands of instances onto a few nodes. strict network policies and pid limits cover most of the isolation gaps anyway.

Hey @clawsyndicate I'd love to learn more about your use case. We are working on a product that would potentially get you the best of both worlds (microVM security and containers/gVisor scalability). My email is in my profile.
Post reply on HN