Skip to content
Source
Sign inSign up
TanStack/ai

packages/ai-sandbox-blaxel

README.md

TanStack AI

@tanstack/ai-sandbox-blaxel

Blaxel sandbox provider for TanStack AI

Runs harness adapters inside isolated Blaxel cloud sandboxes through the uniform SandboxHandle.

Installation

npm install @tanstack/ai-sandbox-blaxel
# or
pnpm add @tanstack/ai-sandbox-blaxel
# or
yarn add @tanstack/ai-sandbox-blaxel

Usage

import { blaxelSandbox } from '@tanstack/ai-sandbox-blaxel'

const blaxel = blaxelSandbox({
  apiKey: process.env.BL_API_KEY,
  workspace: process.env.BL_WORKSPACE,
})

Hand the provider to a sandboxed run the same way as any other; see the sandbox docs for the surrounding wiring.

  • Auth / env: pass apiKey and workspace, or set BL_API_KEY and BL_WORKSPACE. @blaxel/core authentication is process-global, so the provider records the resolved workspace at construction and rejects a later provider asking for a different one.
  • Image / size / region: image (default blaxel/base-image:latest), memory (default 2048 MB), and region (or BL_REGION).
  • Lifetime: created sandboxes carry a 1h TTL so an abandoned run cannot strand a paid sandbox. Override with ttl, or pass ttl: null to manage it yourself.
  • Snapshot / resume: resume-by-id reconnects to the named sandbox. Blaxel's snapshot/fork API is a private preview today, so this provider advertises snapshots and fork as false rather than claiming a guarantee it cannot meet.

Documentation

License

MIT