Skip to main content
Create an AI sandbox with TypeScript, run a command on its Linux machine and delete it with @beadrun/sdk. Use Node.js 18 or later, Bun, or Deno with npm imports.

Install and authenticate

Set BEAD_API_KEY through your secret manager or private environment. Get an account through agent signup. The default API origin is https://api.bead.run; override it with BEAD_API_URL.

Run a command

A nonzero command exit is a result with exitCode, stdout and stderr. Inspect it before starting dependent work. All SDK timeouts use seconds; the default machine lifetime is 300 seconds.

Automatic disposal

With TypeScript 5.2 or later and ESNext.Disposable enabled:
Disposal deletes the machine. A disconnected process does not stop remote compute. Breaking a stream stops reading and may leave the process running. See TypeScript SDK reference for streaming, files, snapshots and parallel work.