Skip to main content
A workflow’s repository agent can run its commands in sandboxes from a managed sandbox provider you already pay for, instead of a Kubernetes cluster. Each code change gets a fresh sandbox in your provider account, and the sandbox is deleted when the change ends. This uses the same dispatcher as running workflows in your environment. Only where each sandbox runs changes.

Supported providers

Choose a provider to find its configuration value and credential variables. Set those variables in the dispatcher’s environment. CostGraph tests each provider live. Contact your account team before relying on one in production.
Set provider to agentuity and supply the following variables.
  • AGENTUITY_SDK_KEY
Set provider to beam and supply the following variables.
  • BEAM_TOKEN
  • BEAM_WORKSPACE_ID
Set provider to blaxel and supply the following variables.
  • BL_API_KEY
  • BL_WORKSPACE
Set provider to brezel and supply the following variables.
  • BREZEL_API_KEY
  • BREZEL_API_URL
  • BREZEL_PROJECT_ID
Set provider to buddy and supply the following variables.
  • BUDDY_TOKEN
  • BUDDY_WORKSPACE
  • BUDDY_PROJECT
Set provider to cloudflare and supply the following variables.
  • CLOUDFLARE_SANDBOX_URL
  • CLOUDFLARE_SANDBOX_API_KEY
Deploy a sandbox gateway in your account first. Point CLOUDFLARE_SANDBOX_URL at that gateway.
Set provider to codesandbox and supply the following variables.
  • CSB_API_KEY
Set provider to collimate and supply the following variables.
  • COLLIMATE_API_KEY
Set provider to createos-sandbox and supply the following variables.
  • CREATEOS_SANDBOX_API_KEY
Give the dispatcher its own provider key, limited to creating and deleting sandboxes. Keep it separate from any key you connect to CostGraph for cost data.

Before you begin

  • A CostGraph API key with the deployment:register and sandbox:worker scopes. The first pulls the dispatcher image from registry.costgraph.ai, the second lets the dispatcher take code changes.
  • Credentials for one account listed in Supported providers.
  • Somewhere to run one container that can reach agent-relay.costgraph.ai and your provider’s API over port 443.

Connect

Store the provider credentials in a Secret whose keys are the variable names, then install the chart with your provider:
Create costgraph-sandbox-key and costgraph-registry as described in Install. With a managed sandbox provider the dispatcher needs no permissions in the cluster.
WORKER_NAME names this dispatcher in CostGraph: lowercase letters, digits and hyphens, up to 63 characters. After it connects, it is available in a goal’s Sandbox setting. See Choose where a goal runs.

Sandbox image

By default each sandbox starts from the provider’s default image, and the dispatcher installs the agent into it before the code change starts. The image must have curl, sha256sum, base64 and git, and either run as root or allow sudo. The install adds a few seconds to every code change. To skip the install and add your own tools, build a template in your provider. It must already contain the agent and our two scripts. Then name it:
Build the template from our worker image, registry.costgraph.ai/costgraph-sandbox-worker, with your provider’s own template tooling. The requirements are the same as for your own sandbox image.

Network

Each provider controls egress in its own settings. The sandbox must reach agent-relay.costgraph.ai and github.com on port 443. Everything else is your choice.

Lifetime and cost

A code change that runs longer than dispatcher.sandbox.ttlSeconds (two hours by default) is stopped, and the provider removes its sandbox. Sandbox time is billed by your provider to your account. If the dispatcher stops while a code change is running, that sandbox keeps running until the change ends or the timeout removes it.