Introduction
One router for sandboxes and Actions. Run agent code and GitHub workflows; ComputeSDK handles the compute.
One router for sandboxes and Actions. Run agent code and GitHub workflows across compute providers. Let ComputeSDK choose, pick a provider, or set a fallback order through the same integration.
Start with managed compute; you do not need a vendor account or provider key. Bring your own keys whenever you want more control.
Start with an interface
Choose the interface that fits your workflow. All five use the same ComputeSDK routing, organization and billing.
Install the CLI, then run:
compute new
compute exec echo hello
compute destroyThe CLI guides setup and selects your sandbox. CLI quickstart.
import { compute } from 'computesdk';
const sandbox = await compute.instances.create();
try {
console.log((await sandbox.runCommand('echo hello')).stdout);
} finally {
await sandbox.destroy();
}Install computesdk and set COMPUTE_API_KEY. TypeScript quickstart.
Connect a repository and enable a workflow such as .computesdk/workflows/hello.yml:
name: Hello ComputeSDK
on: workflow_dispatch
jobs:
hello:
runs-on: ubuntu-latest
steps:
- run: echo helloRun it from the dashboard, or dispatch it with the CLI:
compute actions dispatch myorg/myrepo --workflow .computesdk/workflows/hello.yml --ref mainActions provisions compute for the job. Follow its steps, logs and result in the dashboard. Actions guide.
Set COMPUTE_API_KEY to your organization API key, then create a sandbox:
Copy sandbox.id from the response into SANDBOX_ID, then run a command and release the compute:
Destroy the sandbox even if your command fails. REST API reference.
Build with sandboxes
A sandbox is the environment where your code runs.
Run code, tests or agent tools
Read, write, upload or download files
Send a local project to a sandbox
Start a server and share a URL
Reconnect, control lifetime or clean up
Manage compute
The platform overview covers providers, routing and account management. Open the dashboard to manage resources and account settings. See pricing and billing for credits, compute rates and cleanup. A sandbox keeps running until destroyed or its lifetime expires.
Last updated
Was this helpful?