1. Archil serverless tool calls
Best for: an agent's bash, Python and Node tool calls and generated code, where each call must be isolated but see the same files
A serverless tool call runs one command in a fresh Firecracker microVM with one or more Archil disks mounted under /mnt/archil, then shuts the VM down. Nothing carries over between calls except what the command wrote to the disk, and those writes are committed before the call returns, so the next call sees them. Calls start from a pool of ready microVMs: Archil measured a median 37 ms queue time and 82 ms end to end, including about 40 ms of internet round trip, and 331 ms for the first call on a new disk (latency). The same disk mounts in an Archil sandbox when work needs longer than one call allows.
Strengths
- Every call gets its own microVM with its own kernel, so one call's leftovers can't affect the next
- $0.05 per 1,000 calls at the default 2 vCPU and 4 GiB, with execution included; calls up to 32 vCPU and 64 GiB bill as multiples of the default
- Files persist on a durable disk; a call can mount several disks, read-only or limited to a subdirectory
- Any public amd64 OCI image via
baseImage, or a private image built with the images API - Per-call egress rules, such as deny-all except a package registry, on Developer and up
- Hundreds of calls in parallel by default, raisable to thousands
Tradeoffs
- 5 minutes per call, then it returns
504; longer work belongs in an Archil sandbox, which has no per-command timeout - A custom image or size boots on demand, so its queue time is higher than the 37 ms figure
- Public tool calls run in three AWS regions (us-east-1, us-west-2, eu-west-1); other clouds need BYOC
- No GPUs
- Called from your code through the SDK, REST API or CLI; there is no function hosting or documented event trigger, so the loop runs in your backend or an Archil sandbox
- 100 KiB command input with no stdin, and the first 4 MiB of stdout and stderr returned; larger data goes through files on the disk
- Disks mount in shared mode by default, so a command calls
archil checkoutbefore changing files other clients also use