---
source: https://iinventedlight.com/library/notes/ao-sandbox-firecracker-and-gvisor.md
title: "Sandboxing untrusted agent code: Firecracker microVMs vs gVisor"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (firecracker-microvm/firecracker (GitHub)); Apache-2.0 (google/gvisor (GitHub)); Apache-2.0 (google/gvisor (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: firecracker-microvm/firecracker (GitHub), Firecracker README, Apache-2.0 (https://raw.githubusercontent.com/firecracker-microvm/firecracker/main/LICENSE); google/gvisor (GitHub), Introduction to gVisor security, Apache-2.0 (https://raw.githubusercontent.com/google/gvisor/master/LICENSE); google/gvisor (GitHub), gVisor Docker quick start, Apache-2.0 (https://raw.githubusercontent.com/google/gvisor/master/LICENSE)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-16
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-17
as_of: 2026-11-17
confidence: medium
untested: "Not reproduced (2026-11-16). Docs read; no API call was made for this note."
category: agent-operations
topic_area: "agent operations: sandboxing"
tags: [sandbox, firecracker, gvisor, microvm, isolation]
client: Librarian
sources:
  - id: S1
    title: "Firecracker README"
    publisher: firecracker-microvm/firecracker (GitHub)
    url: https://github.com/firecracker-microvm/firecracker/blob/main/README.md
    accessed: 2026-11-16
    license: "Apache-2.0"
  - id: S2
    title: "Introduction to gVisor security"
    publisher: google/gvisor (GitHub)
    url: https://github.com/gvisor/gvisor/blob/master/g3doc/architecture_guide/intro_to_gvisor.md
    accessed: 2026-11-16
    license: "Apache-2.0"
  - id: S3
    title: "gVisor Docker quick start"
    publisher: google/gvisor (GitHub)
    url: https://github.com/gvisor/gvisor/blob/master/g3doc/user_guide/quick_start/docker.md
    accessed: 2026-11-16
    license: "Apache-2.0"
---
# Sandboxing untrusted agent code: Firecracker microVMs vs gVisor
**Answer:** Firecracker runs workloads in lightweight virtual machines called microVMs; gVisor is an application kernel, not a virtual machine hypervisor or a system call filter. gVisor is open-source and safely runs untrusted code.

## Firecracker

Its main component is a VMM using Linux KVM to create and run microVMs. It has a minimalist design, thread-specific seccomp filters and a Jailer process that applies a cgroup/namespace isolation barrier, then drops privileges.

## gVisor

Its kernel-like component is called the Sentry and is written in memory-safe Go. While gVisor can use virtualization (KVM), it can also work without virtualization. The Gofer is a slightly-more-trusted companion process.

## Notes

- Firecracker excludes unnecessary devices and guest-facing functionality to reduce the memory footprint and attack surface of each microVM.
- The gVisor Sentry may make limited system calls to the host Linux kernel when servicing the sandboxed workload's request.
- For Docker, `sudo runsc install` adds the runtime; restart the Docker daemon, then `docker run --runtime=runsc`.

## See also

- [ao-security-gemini-cli-sandbox](https://iinventedlight.com/library/notes/ao-security-gemini-cli-sandbox/)
- [ao-sandbox-inspect-docker-tools](https://iinventedlight.com/library/notes/ao-sandbox-inspect-docker-tools/)
- [ao-security-e2b-cloud-sandboxes](https://iinventedlight.com/library/notes/ao-security-e2b-cloud-sandboxes/)

## Claims

- id: C1
  claim: Firecracker uses KVM microVMs.
  source: S1
  evidence: "uses the Linux Kernel Virtual Machine (KVM) to create and run microVMs"

- id: C2
  claim: gVisor is an application kernel.
  source: S2
  evidence: "it is an application kernel, not a virtual machine hypervisor"

- id: C3
  claim: gVisor installs a runsc Docker runtime.
  source: S3
  evidence: "This will install a docker runtime named \"runsc\" by default."

## Sources

- [S1] Firecracker README. firecracker-microvm/firecracker (GitHub). https://github.com/firecracker-microvm/firecracker/blob/main/README.md . License: Apache-2.0. Accessed 2026-11-16.

- [S2] Introduction to gVisor security. google/gvisor (GitHub). https://github.com/gvisor/gvisor/blob/master/g3doc/architecture_guide/intro_to_gvisor.md . License: Apache-2.0. Accessed 2026-11-16.

- [S3] gVisor Docker quick start. google/gvisor (GitHub). https://github.com/gvisor/gvisor/blob/master/g3doc/user_guide/quick_start/docker.md . License: Apache-2.0. Accessed 2026-11-16.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: firecracker-microvm/firecracker (GitHub), Firecracker README, Apache-2.0 (https://raw.githubusercontent.com/firecracker-microvm/firecracker/main/LICENSE); google/gvisor (GitHub), Introduction to gVisor security, Apache-2.0 (https://raw.githubusercontent.com/google/gvisor/master/LICENSE); google/gvisor (GitHub), gVisor Docker quick start, Apache-2.0 (https://raw.githubusercontent.com/google/gvisor/master/LICENSE). Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
