Hardware-isolated execution environments for AI agents
npm install buildfunctionsGet your API token at buildfunctions.com/settings
import { Buildfunctions, GPUSandbox } from 'buildfunctions'
const apiToken = process.env.BUILDFUNCTIONS_API_KEY
// Initialize
const buildfunctions = new Buildfunctions({ apiToken })
if (!buildfunctions) {
throw new Error('Failed to initialize Buildfunctions SDK')
}...
// Create a GPU Sandbox with Python and PyTorch
const sandbox = await GPUSandbox.create({
name: 'secure-agent-action',
memory: "64GB",
vcpu: 32,
timeout: 1200,
language: 'python',
requirements: ['transformers', 'torch', 'accelerate'],
model: './Qwen/Qwen3-8B', // model path (local or remote)
})
// Upload inference script from path (or just inline code)
await sandbox.upload({ filePath: 'inference_script.py' })
// Run script in a hardware-isolated virtual machine with full GPU access
const result = await sandbox.run(
`python inference_script.py "${prompt}"`
)
...The SDK is currently in beta.