Kagex/Guides
20–50 msSpeed & Workflows · 4 min read

Inside Kagex's 20–50 ms Warm Pool Engine & Instant Agent Attachment

Eliminate multi-second container pulls and cold VM boots by pairing background warm standby pools with fast delta workspace mirroring.

Warm attach
20–50 ms
Cold kernel boot
1.2 s baseline
Exec RPC
< 5 ms over AF_VSOCK
Trace phase-by-phase warm pool boot timing
ID=$(sandboxctl create -w ~/code/app | awk '{print $1}')
sandboxctl trace "$ID"   # scheduler.reserve -> vm.restore -> workspace.sync

Key Engineering Points · One-Way Workspace Sync, 3-Way Apply & Undo

All 10 key points →
  • 1Host folders are never shared or mounted into guest microVMs — virtio-fs and 9p mounts are intentionally disabled.
  • 2Workspace synchronization moves strictly one way (host -> VM) over explicit AF_VSOCK tar streams checked by guest/files.
  • 3Running rm -rf /workspace inside a sandbox has zero effect on the developer's repository on disk.
  • 4Before every sandbox_exec, incremental host file changes delta-sync automatically into guest /workspace.
  • 5Diff previews compare VM edits cleanly against repository git HEAD without mutating host git refs, index, or checked-out branches.
  • 6Applying approved patches uses temporary git merge-file 3-way merges rather than blind file overwrites.

Pre-Warming Beyond the Critical Path

Cold Linux boots (~1.2 s) happen in the background ahead of user prompts. When an agent invokes sandbox_exec, Kagex simply binds the workspace and policy to an already running standby slot.

Pressure-Aware Eviction

When host memory is tight for other applications, internal/scheduler shrinks idle standby instances automatically so standby pools never steal needed desktop RAM.

Inspect this architecture live in 3D

Step through MCP ingress, Ghost Secrets, CoW blades, and run sandboxctl commands interactively in your browser.

Frequently Asked Questions

Kagex restores from the cached golden snapshot (~0.5 s) or cold boots cleanly (~1.2 s) with zero dropped requests.