Run AI agents in sandboxed MicroVMs
LAUNCH · RUN · COLLECT · CLEAN UP
Give an agent a copy of your project, let it edit files and run tools in a
remote AWS Lambda MicroVM, and bring back the results. Use the microvm CLI
or a Python, JavaScript/TypeScript, or Rust SDK. No local Docker daemon or
hypervisor is needed.
Start in 90 seconds
Section titled “Start in 90 seconds”With the CLI installed, AWS configured, and Bedrock model access enabled for your caller, start a coding agent from your project directory:
microvm agent-up --vm-name review --agent claude-code --project .microvm agent-prompt --name review --agent claude-code \ "Review this project and write your findings to REVIEW.md."microvm cp --name review vm:/workspace/REVIEW.md ./REVIEW.mdmicrovm terminate review --waitThe agent runs as a non-root user inside the VM, using a short-lived Bedrock
token minted from your AWS credentials. Replace claude-code with codex in both commands
to use Codex CLI.
First time here? Install the CLI, then
configure AWS. You need AWS CLI v2, gh or curl, AWS credentials,
Lambda MicroVMs access, an artifact bucket, and build/execution roles.
The first image build takes several minutes; 90 seconds is the path to
starting the workflow, not a promise that AWS setup or the build has finished.
VMs, builds, and stored images create AWS charges.
Pick your interface
Section titled “Pick your interface”| Use | Install | Start here |
|---|---|---|
| Terminal | cargo binstall microvms-cli --no-confirm |
CLI and AWS setup |
| Python 3.9+ | pip install microvms |
Python SDK |
| Node 22.13+ | npm install @theagenticguy/microvms |
JavaScript / TypeScript SDK |
| Rust | cargo add microvms-core |
Rust SDK |
The CLI install command needs cargo-binstall. Installation
also covers standalone binaries and Cargo source builds. All interfaces can
launch a VM, run commands, transfer files, stream output, and terminate it.
The SDK guide includes complete programs you can save and run.
Start with a command
Section titled “Start with a command”For a sandbox that needs no Bedrock model access, run microvm quickstart
after AWS setup. It builds an image, runs hello-world, reports the result and
estimated cost, and attempts cleanup. Then reuse a named image:
microvm build --name agent-toolsmicrovm run --image agent-tools --exec "uname -m"The command prints aarch64 from inside the VM. Use
project uploads for your code and
custom images for dependencies.
Choose the next task
Section titled “Choose the next task”| Task | Guide |
|---|---|
| Run Claude Code or Codex against a project | Coding agents in sandboxes |
| Use a sandbox in your application | SDK examples |
| Keep working in the same VM | Long-lived VMs |
| Restrict internet access | Networking |
| Find a flag, response, or error | CLI reference |
| Recover resources after failed cleanup | Recovery |
The VM separates the agent’s work from your local machine. agent-up enables
outbound networking, and workloads can obtain the execution role’s credentials.
Keep that role minimal. Internet isolation needs a VPC with no internet route;
omitting --egress does not enforce it. See Trust.
For automation, microvm manifest describes the installed CLI and
For agents explains JSON and streaming. Every page has a Markdown
twin at its path ending in .md; llms.txt indexes them.
Internals covers the daemon, wire protocol, and platform behavior.