SDK Setup
All AerolVM SDKs connect to the same REST API using a PAT token set during server installation. AerolVM also exposes compatibility facades for the Daytona SDK and E2B SDK, so existing clients can point at the same server without a rewrite.
Configuration
Section titled “Configuration”| Variable | Required | Description |
|---|---|---|
SB_PAT_TOKEN | Yes | The token set with --pat-token during installation. |
SB_API_URL | No | Server base URL. Defaults to http://127.0.0.1:21212 if omitted. |
Compatibility SDKs
Section titled “Compatibility SDKs”Daytona
Section titled “Daytona”AerolVM exposes a Daytona-compatible API under /daytona. Use the official Daytona SDK with your normal AerolVM PAT token and point its apiUrl at https://your-host/daytona.
See Using Daytona SDK for setup details and example code.
AerolVM also exposes an E2B-compatible control plane under /e2b and a runtime proxy under /e2b/runtime. Existing E2B SDK code usually only needs environment variable changes.
See Using E2B SDK for the required environment variables, examples, and current compatibility limits.
TypeScript
Section titled “TypeScript”npm install @aerol-ai/aerolvm-sdkimport { MicroVM } from '@aerol-ai/aerolvm-sdk'
const client = new MicroVM({ apiUrl: process.env.SB_API_URL, patToken: process.env.SB_PAT_TOKEN,})
const sandbox = await client.create({ image: 'ubuntu:22.04' })console.log(sandbox.publicUrl)await sandbox.destroy()Python
Section titled “Python”pip install aerolvm-sdkfrom microvm import MicroVM
client = MicroVM( api_url='https://sandbox.example.com', pat_token='your-token',)
sandbox = client.create(image='ubuntu:22.04')print(sandbox['id'])sandbox.destroy()go get github.com/aerol-ai/microvm/sdk/go/pkg/microvm@latestimport ( "os" microvm "github.com/aerol-ai/microvm/sdk/go/pkg/microvm" sdktypes "github.com/aerol-ai/microvm/sdk/go/pkg/types")
client, err := microvm.NewClientWithConfig(&sdktypes.MicroVMConfig{ PATToken: os.Getenv("SB_PAT_TOKEN"), APIUrl: os.Getenv("SB_API_URL"),})
sandbox, err := client.Create(ctx, microvm.CreateOptions{Image: "ubuntu:22.04"})fmt.Println(sandbox.PublicURL)defer client.Destroy(ctx, sandbox.ID)Add the GitHub Packages repository and dependency to your pom.xml. See Server Setup for the GitHub token needed for read:packages.
import ai.aerol.microvm.MicroVMClient;import ai.aerol.microvm.MicroVMConfig;
MicroVMClient client = new MicroVMClient( new MicroVMConfig() .setApiUrl("https://sandbox.example.com") .setPatToken(System.getenv("SB_PAT_TOKEN")));cargo add aerolvm-sdkuse aerolvm_sdk::Client;
let client = Client::new( Some("https://sandbox.example.com"), Some("your-token"),)?;Next Steps
Section titled “Next Steps”- Quick Start - run your first command inside a sandbox
- Create Sandbox - full sandbox lifecycle with all SDK examples