Agent37
Agent37 provider for ComputeSDK - persistent Linux sandboxes for AI agents, with signed URLs for any port and an optional Performance type whose cores are held for it.
Sizes
instances.create({ sizeClass: 'md' }) requests 2 vCPU/4096 MiB; lg requests 4 vCPU/8192 MiB. Other standard tiers are unsupported (the vendor has a 4-vCPU ceiling). Native 4-vCPU/16- or 32-GiB shapes are not standard xl/2xl. See Sandbox sizes for conflicts and type restrictions.
Installation & Setup
npm install @computesdk/agent37Setup
Create an API key at agent37.com/dashboard/cloud/api-keys
Set the environment variable:
export AGENT37_API_KEY=sk_live_your_api_keyQuick Start
import { compute } from 'computesdk';
import { agent37 } from '@computesdk/agent37';
compute.setConfig({
provider: agent37({ apiKey: process.env.AGENT37_API_KEY }),
});
const sandbox = await compute.instances.create();
const result = await sandbox.runCommand('node -v && python3 --version');
console.log(result.stdout);
await sandbox.destroy();Or call the provider factory directly:
Configuration
Create Options
templateId
template
Template name. Default agent37-base (Debian with Node, Python, git and build tools).
type
type
default, performance (a whole machine whose cores are held for it) or vm.
cpu (or vcpus, cpus)
resources.cpu
vCPUs. Sizes are 2 vCPU / 4 GB, 4 / 8, 4 / 16 and 4 / 32.
memory (MB, or memoryMiB, memoryMb)
resources.memory
Rounded up to whole GB.
diskMb (or diskMiB)
resources.disk
Rounded up to whole GB.
region
region
us (default), eu or ap-south.
envs
env
Environment variables for the sandbox.
name, metadata
name, metadata
Labels returned on the instance.
Features
Command execution with
cwd,envand background commandsFilesystem read, write, list, mkdir, exists and remove
Port URLs:
getUrl({ port })returns a signed URL that reaches the port without an API key for one hourPersistence: a sandbox keeps its files and installed packages until you destroy it
Limitations
Output is returned when the command finishes; there is no streaming.
runCommand'stimeoutstops waiting for the result. The command itself keeps running in the sandbox.Sandboxes have no lifetime limit, so always call
destroy()when you are done.
Links
Last updated
Was this helpful?