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

README.md

40 lines1.2 KB

TanStack AI

@tanstack/ai-sandbox-docker

Sandbox providers that run a TanStack AI harness on Docker.

  • dockerSandbox({ image }) starts a container through the Docker daemon.
  • sbxSandbox() starts a Docker Sandboxes microVM through the sbx CLI.
import { dockerSandbox, sbxSandbox } from '@tanstack/ai-sandbox-docker'

const container = dockerSandbox({ image: 'node:22' })
const microvm = sbxSandbox({
  allowNetwork: ['*.npmjs.org', 'registry.npmjs.org'],
})

sbxSandbox() needs sbx on PATH, sbx login, a hypervisor, and a Git repo to pass to sbx create --clone. Pass allowNetwork when you use a deny or ask policy, or when you need extra hosts besides the model API host and localhost. See the providers guide.