Maximum security confinement for your AI agents with microVM.nix
This demo shows that the wrapper script terrax can dynamically mount different directories for the microVM at runtime. TL;DR Use microVM.nix for extreme isolation for running AI agents. For the impatient: Get the repo git clone https://github.com/kohane27/agents-in-microvm-nix cd agents-in-microvm-nix Prepare the ssh key mkdir -p ~/.ssh/microvm ssh-keygen -t ed25519 -f ~/.ssh/microvm/ssh_host_ed25519_key -N "" -C "microvm-host-key" Prepare the user key ssh-keygen -t ed25519 -f ~/.ssh/microvm-user -N "" -C "microvm-user" Replace username with your_username cd agents-in-microvm-nix find . -type f -name "*.nix" -not -path "./terrax/home-manager.nix" -not -path "./terrax/user.nix" -exec sed -i 's/username/your_username/g' {} + Add the public key to user.nix PUB_KEY=$(cat $HOME/.ssh/microvm-user.pub) sed -i "s|.*ssh-ed25519.*| \"$PUB_KEY\"|" ./terrax/user.nix Add the following inputs to your host flake.nix: { microvm = { url = "github:microvm-nix/microvm.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; sops = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; # more up-to-date LLM packages llm-agents = { url = "github:numtide/llm-agents.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; } Copy agents-in-microvm-nix content to your NixOS dotfiles ...