Skip to content
PluginStats

@tanstack/ai-sandbox weekly downloads statistics

By tanstack (53 listings) · npm · AI SDKs

Provider-agnostic sandbox layer for TanStack AI — run harness adapters inside isolated sandboxes (defineSandbox, defineWorkspace, withSandbox) with a uniform SandboxHandle, workspace bootstrap, policy, and resumable lifecycle.

View on npm Fresh · Dec 6, 2026

@tanstack/ai-sandbox has 135,913 recorded weekly downloads on npm, a decrease of 17.7% over the past 30 days, ranking #592 of 3,247 tracked listings.

Weekly downloads
135,913
Official API · Dec 5, 2026
7-day growth
+1.5%
+2.1K weekly downloads
30-day growth
-17.7%
-29.1K weekly downloads
90-day growth
+865%
+121.8K weekly downloads
Rank
#592
▼ 15 in 7 days

About @tanstack/ai-sandbox

<div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://tanstack.com/api/readme/ai.png?theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://tanstack.com/api/readme/ai.png" /> <img src="https://tanstack.com/api/readme/ai.png" alt="TanStack AI" width="900" /> </picture> </div> <br />

@tanstack/ai-sandbox

Provider-agnostic sandbox layer for TanStack AI. Run coding-agent harness adapters (Grok Build, Claude Code, Codex, OpenCode, Gemini CLI) inside an isolated environment with a real filesystem, shell, and cloned repo — and stream their work back through chat().

import { chat } from '@tanstack/ai'
import { grokBuildText } from '@tanstack/ai-grok-build'
import {
  createSecrets,
  defineSandbox,
  defineWorkspace,
  githubRepo,
  withSandbox,
} from '@tanstack/ai-sandbox'
import { dockerSandbox } from '@tanstack/ai-sandbox-docker'

const sandbox = defineSandbox({
  id: 'repo-agent',
  provider: dockerSandbox({ image: 'node:22' }),
  workspace: defineWorkspace({
    source: githubRepo({ repo: 'owner/repo', ref: 'main' }),
    packageManager: 'pnpm',
    setup: ['corepack enable', 'pnpm install'],
    scripts: { test: 'pnpm test', build: 'pnpm build' },
    secrets: createSecrets({
      XAI_API_KEY: process.env.XAI_API_KEY ?? '',
    }),
  }),
  lifecycle: { reuse: 'thread', snapshot: 'after-setup' },
})

const stream = chat({
  threadId: 'my-thread',
  adapter: grokBuildText('grok-build'),
  messages: [{ role: 'user', content: 'Fix the failing test.' }],
  middleware: [withSandbox(sandbox)],
})

Installation

npm install @tanstack/ai @tanstack/ai-sandbox @tanstack/ai-grok-build

Pick a provider package for where the sandbox runs:

PackageUse when
@tanstack/ai-sandbox-local-processDev loop on your host (no isolation)
@tanstack/ai-sandbox-dockerIsolated containers, snapshots, resume
@tanstack/ai-sandbox-cloudflareCloudflare Workers + Containers
@tanstack/ai-sandbox-vercelVercel Sandbox
@tanstack/ai-sandbox-daytonaDaytona cloud sandboxes, snapshots
@tanstack/ai-sandbox-upstash-boxUpstash Box cloud sandboxes, snapshots
@tanstack/ai-sandbox-spritesSprites stateful sandboxes
@tanstack/ai-sandbox-blaxelBlaxel cloud sandboxes and previews
@tanstack/ai-sandbox-boxdboxd microVMs, live fork, snapshots
@tanstack/ai-sandbox-e2bE2B microVMs, snapshots and fork
@tanstack/ai-sandbox-railwayRailway sandboxes, private networking

Install the provider you select separately. For Blaxel:

npm install @tanstack/ai-sandbox-blaxel

Harness adapters are separate packages. The default path is Grok Build (@tanstack/ai-grok-build); others include @tanstack/ai-claude-code, @tanstack/ai-codex, and @tanstack/ai-opencode. All require withSandbox(...) middleware — chat() fails fast without it.

Three moving parts

PartWhat it isHow you configure it
ProviderIsolation primitive — host, container, cloud VMdockerSandbox(), localProcessSandbox(), …
WorkspaceWhat the agent boots into — repo, setup, secrets, skillsdefineWorkspace({ … })
Harness adapterWhich agent CLI runs and how output is translatedgrokBuildText() (default), claudeCodeText(), codexText(), …

defineSandbox() binds provider + workspace (+ optional policy, lifecycle, hooks). withSandbox(definition) is the chat() middleware that creates or resumes the sandbox for each run.

Core APIs

Workspace

Describe the working tree once, portably:

import {
  bearer,
  createSecrets,
  defineWorkspace,
  fileSkill,
  gitSkill,
  githubRepo,
  mcpSkill,
} from '@tanstack/ai-sandbox'

const secrets = createSecrets({
  GH: process.env.GH_TOKEN ?? '',
  TOKEN: process.env.API_TOKEN ?? '',
})

defineWorkspace({
  source: githubRepo({ repo: 'owner/app' }), // shallow clone by default
  setup: ({ serial, parallel }) => {
    serial('pnpm install')
    parallel(['pnpm build', 'pnpm typecheck'])
  },
  scripts: { test: 'pnpm test' }, // surfaced in AGENTS.md; policy aliases
  instructions: 'Run tests before proposing changes.',
  skills: [
    gitSkill({ repo: 'owner/skills', secret: secrets.GH }),
    mcpSkill('api', {
      url: 'https://mcp.example.com',
      headers: { Authorization: bearer(secrets.TOKEN) },
    }),
    fileSkill({ path: '.hints.md', content: '# Hints\nPrefer pnpm.' }),
  ],
  plugins: ['@anthropic/plugin-foo'], // Claude Code only; other harnesses warn+skip
  secrets,
})

Skills and plugins are projected into each harness's native format at run time (.grok/config.toml, .mcp.json, .codex/config.toml, opencode.json, …). Bootstrap writes AGENTS.md and clones gitSkill repos; harness adapters handle the rest.

Policy

Guard what the agent may run:

import { defineSandbox, defineSandboxPolicy } from '@tanstack/ai-sandbox'
import type { SandboxProvider, WorkspaceDefinition } from '@tanstack/ai-sandbox'

declare const provider: SandboxProvider
declare const workspace: WorkspaceDefinition

const policy = defineSandboxPolicy({
  default: 'allow',
})…

Description from the npm listing.

  • ai
  • ai-sdk
  • typescript
  • tanstack
  • sandbox
  • harness
  • agent
  • coding-agent
  • isolation
  • workspace
  • tanstack-intent

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@tanstack/ai-sandbox weekly downloads on npm, last 90 days: 135,913 weekly downloads as of Dec 5, 2026, +865% over 90 days.@tanstack/ai-sandboxWeekly downloads on npm · Last 90 days135,913downloads / week+865% over 90 days050K100K150K200KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@tanstack/ai-sandbox weekly downloads on npm, last 90 days: 135,913 weekly downloads as of Dec 5, 2026, +865% over 90 days.

7/30/90-day growth

@tanstack/ai-sandbox weekly downloads growth on npm: +1.5% over 7 days, -17.7% over 30 days, +865% over 90 days.@tanstack/ai-sandboxWeekly downloads growth on npm135,913downloads / week now7-day growth+2,063 weekly downloads+1.5%30-day growth-29,145 weekly downloads-17.7%90-day growth+121,825 weekly downloads+865%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@tanstack/ai-sandbox weekly downloads growth on npm: +1.5% over 7 days, -17.7% over 30 days, +865% over 90 days.

Ranking history

@tanstack/ai-sandbox npm ranking history: currently #592 (by weekly downloads).@tanstack/ai-sandboxnpm ranking · by weekly downloads · Last 90 days#592current rank#200#300#400#500#600#700Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
@tanstack/ai-sandbox npm ranking history: currently #592 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 30, #12 (overall #592)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs378 listings · 19 pages · page 2, #16 (overall #36)
AI SDKs: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (592)
Recent weekly downloads observations for @tanstack/ai-sandbox
Date (UTC)Weekly downloadsChange vs. previous
135,913-3.3K
139,186+479
138,707-1.7K
140,423+8.2K
132,268+2.8K
129,467-6.4K
135,823+2K
133,850+3.2K
130,652-12.2K
142,820-2.6K
145,383-8K
153,373+12K
141,332-2.9K
144,223—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@tanstack/ai-sandbox. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.