Open History to see the last commit
@tanstack/ai-sandbox-sprites#
Sprites sandbox provider for TanStack AI
Runs harness adapters inside isolated Sprites stateful sandboxes (Fly.io) through the uniform SandboxHandle.
Installation#
npm install @tanstack/ai-sandbox-sprites
# or
pnpm add @tanstack/ai-sandbox-sprites
# or
yarn add @tanstack/ai-sandbox-sprites
Usage#
import { spritesSandbox } from '@tanstack/ai-sandbox-sprites'
const sprites = spritesSandbox({ apiKey: process.env.SPRITES_API_KEY })
Hand the provider to a sandboxed run the same way as any other; see the sandbox docs for the surrounding wiring.
- Auth / env: needs
SPRITES_API_KEY(token formorg/projectNumber/tokenId/secret); override the control-plane URL withapiUrlorSPRITES_API_URL. - Snapshot / resume: resume-by-id reconnects to the named Sprite, whose filesystem is durable across idle suspend/resume.
snapshot()creates a Sprite checkpoint restored in place through the handle'srestoreCheckpoint()/listCheckpoints(); since a checkpoint does not survive Sprite deletion, the provider deliberately does not implement the reconstruct-after-gonerestoreSnapshot. - Ports: a Sprite proxies one internal HTTP port (default
8080, set withhttpPort) to its public URL.
Documentation#
- Sandbox overview: what a sandbox run is and how the pieces fit
- Providers: every provider side by side, with the capability matrix
- Harnesses and Harness auth: what runs inside, and how it signs in
License#
MIT