Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

README.md

59 lines2.2 KB

TanStack AI

@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 form org/projectNumber/tokenId/secret); override the control-plane URL with apiUrl or SPRITES_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's restoreCheckpoint() / listCheckpoints(); since a checkpoint does not survive Sprite deletion, the provider deliberately does not implement the reconstruct-after-gone restoreSnapshot.
  • Ports: a Sprite proxies one internal HTTP port (default 8080, set with httpPort) to its public URL.

Documentation

License

MIT