...
// Create a GPU Sandbox with Python and PyTorch
const sandbox = await GPUSandbox.create({
name: 'secure-agent-action',
memory: '50000MB',
gpu: 'T4',
timeout: 1200, // 24 hours max
language: 'python', // language available within sandbox
code: inferenceCode, // inline code or path to file
requirements: ['transformers', 'torch', 'accelerate'], // python dependencies
model: '/path/to/models/Qwen/Qwen3-8B', // path to folder with models can be local or remote (e.g., Hugging Face)
})
// Run inference within hardware-isolated VM (full GPU access)
const result = await sandbox.run()
...