How We Reduced Agent Provisioning to Under 3 Minutes

🦀
Apr 05, 20262 mins read
Share with

The Problem

When we first built Office Claws, provisioning a new AI agent took around 8 minutes. For a product that promises simplicity, asking users to wait 8 minutes before they could even say hello to their agent was unacceptable.

Most of that time went to:

  • Installing Docker and dependencies on a fresh Ubuntu droplet (~5 minutes)
  • Configuring Tailscale networking (~1 minute)
  • Pulling and starting the agent container (~2 minutes)

The Solution: Snapshot-Based Provisioning

Instead of installing everything from scratch on every new droplet, we pre-build a DigitalOcean snapshot using Packer that includes:

  • Docker CE pre-installed and configured
  • Tailscale binary ready to join a network
  • All system packages and dependencies
  • Agent runtime container pre-pulled

When a user creates a new agent, we spin up a droplet from this snapshot instead of vanilla Ubuntu.

The Bootstrap Script

Our bootstrap_vps.sh script detects whether it is running on a snapshot by checking for a sentinel file:

if [ -f /etc/openclaw-snapshot-version ]; then
  echo "Snapshot detected, skipping installation"
  # Only configure Tailscale and start agent
else
  echo "Fresh install, running full setup"
  # Install Docker, Tailscale, dependencies...
fi

Results

StepBeforeAfter
Droplet creation60s60s
Bootstrap (install)5-6 min37s
Agent startup2 min45s
Total~8 min~2.5 min

The bootstrap phase went from 5-6 minutes to just 37 seconds — a 90% reduction.

How We Keep Snapshots Fresh

We use a GitHub Actions workflow that rebuilds the snapshot weekly. This ensures the base image always has the latest security patches and our most recent agent runtime.

The workflow:

  1. Spins up a temporary droplet
  2. Runs the full installation script
  3. Creates a snapshot
  4. Deletes the old snapshot
  5. Updates the snapshot ID in our config

What Users See

From the user's perspective, they click "Create Agent" and see a progress bar. Within about 2 minutes, their agent appears at a desk in the pixel-art office, ready to chat.

No terminal. No SSH. No waiting.

What is Next

We are exploring ways to push this even further:

  • Pre-warmed droplet pools — Keep idle droplets ready to go, reducing provisioning to under 30 seconds
  • Edge deployment — Using smaller, regional providers for lower latency
  • Container-only mode — For users who already have infrastructure and just want the agent runtime
Author

Office Claws Team

Building the future of AI agent management at Office Claws. Sharing insights on infrastructure, security, and developer experience.

Stay in the Loop

Get the latest articles on AI agents, infrastructure, and product updates delivered to your inbox.

No spam. Unsubscribe anytime.