Find a file
Evgeny Boger 984680ab27 polish(pull): add a steady-tick spinner to the bar template
The bar position only advances on LayerDownloadComplete or
LayerMaterializeComplete. For the materialize step that fires roughly
once every 15s, so the bar visually freezes between layers even while
microsandbox is working hard. Embed a {spinner} in the bar template and
leave the steady_tick enabled past the Resolved transition so the line
always shows activity.
2026-05-17 19:30:16 +03:00
crates/agent-vm polish(pull): add a steady-tick spinner to the bar template 2026-05-17 19:30:16 +03:00
images fix(image): restore the apt cache cleanup lines that the last commit dropped 2026-05-17 19:26:03 +03:00
vendor Phase 0: scaffold microsandbox-based rewrite 2026-05-17 17:05:07 +03:00
.gitignore Phase 0: scaffold microsandbox-based rewrite 2026-05-17 17:05:07 +03:00
.gitmodules Phase 0: scaffold microsandbox-based rewrite 2026-05-17 17:05:07 +03:00
ARCHITECTURE.md Phase 2: claude/codex/opencode/shell launcher with project-scoped state 2026-05-17 17:55:02 +03:00
Cargo.lock feat(run): show pull progress bars during image fetch + materialize 2026-05-17 19:15:52 +03:00
Cargo.toml Phase 0: scaffold microsandbox-based rewrite 2026-05-17 17:05:07 +03:00
LICENSE first commit 2026-01-28 01:15:09 +01:00
PLAN.md Phase 2: claude/codex/opencode/shell launcher with project-scoped state 2026-05-17 17:55:02 +03:00
README.md Phase 2: claude/codex/opencode/shell launcher with project-scoped state 2026-05-17 17:55:02 +03:00

agent-vm (microsandbox rewrite)

Work-in-progress rewrite of agent-vm on top of microsandbox. The goal is sub-second cold-start microVMs for AI coding agents (Claude Code, Codex CLI, OpenCode) with host-rooted credentials and no in-VM proxy.

This is a long-running rewrite. The current state lives on rewrite-microsandbox. The original agent-vm continues to live on main until v1 of the rewrite ships.

Where to look

  • PLAN.md — phased roadmap, what's in/out of v1.
  • ARCHITECTURE.md — running record of design decisions, filled in as each phase lands.

Status

  • Phase 0 (scaffolding): done.
  • Phase 1 (base OCI image + agent-vm setup): done.
  • Phase 2 (launcher MVP — claude/codex/opencode/shell): done; live API smoke deferred to Phase 3.
  • Phase 3 (host-rooted secrets via microsandbox TLS intercept): pending.

Building

git submodule update --init vendor/microsandbox
cargo build -p agent-vm

Building the base image

./target/debug/agent-vm setup        # build + verify in a throwaway sandbox
./target/debug/agent-vm setup --no-verify

Requires Docker on the host. A registry:2 container named agent-vm-registry will be created on first run and bound to 127.0.0.1:5000.

Running an agent

cd your/project
agent-vm claude        # or codex / opencode / shell
agent-vm claude -- -p "fix the lint errors"  # forward args to the agent

# Smoke / scripted use:
agent-vm shell -- -c 'ls /workspace && claude --version'

The first arg after the subcommand is treated as input to the agent. Use -- if any forwarded arg starts with - (otherwise clap will try to claim it). Project state lives in ~/.local/state/agent-vm/<hash>/ and survives between launches. Phase 2 supports auth via the ANTHROPIC_API_KEY / OPENAI_API_KEY env vars only; the OAuth-refresh path lands in Phase 3.

Actually running a sandbox requires the microsandbox runtime prerequisites (Linux with KVM, or macOS Apple Silicon). See microsandbox's README.