Before you begin
- Use an account with Sprites access and create a token. Replace the
'...'placeholders below with your credentials. - Install the Python or Node.js version required by your chosen integration below.
- Set the exact Sprites token variable shown for that integration; the variable names are not interchangeable.
- For examples that call a model, configure the model provider’s credentials separately from the Sprites token.
Hugging Face OpenEnv
openenv-sprites is an experimental Python provider that starts an OpenEnv environment in a fresh Sprite. It requires Python 3.10 or newer. Run the following commands in a Python project managed by uv.
SPRITE_TOKEN is accepted as a legacy fallback. Save this Hugging Face Space example as openenv_echo.py:
uv run python openenv_echo.py; it should print the environment’s reset result and exit without an error.
The provider accepts hf://, https://, and git+https:// source identifiers, not arbitrary OCI images. It deletes the Sprite when the provider closes by default.
Google ADK
Thesprites-adk package gives Google Agent Development Kit agents command, code, file, checkpoint, and restore tools backed by Sprites.
pwd and confirm the agent reports the sandbox’s working directory. That example retains its named Sprite.
SpritesPlugin() creates an ephemeral Sprite. Pass sprite_name="my-project" to reuse a named Sprite across sessions. Model credentials, such as GOOGLE_API_KEY, remain separate from the Sprites token.
See the official ADK integration page for the current tool list and examples.
OpenAI Agents SDK
sprites-openai-agents implements the OpenAI Agents SDK sandbox provider interface. It requires Python 3.10 or newer.
sprite_agent.py. It creates a sandbox session and asks the agent to report its working directory:
sprite_name through SpritesSandboxClientOptions to attach to an existing persistent Sprite.
The Agents SDK sandbox provider API evolves quickly. The adapter declares a tested dependency range, so let your package manager resolve a compatible OpenAI Agents SDK version instead of overriding that range.
OpenRouter Agent SDK
The Sprites adapter for OpenRouter Agent SDK is experimental and source-only. It requires Node.js 24 or newer and ESM.sprite-agent.mjs in the cloned repository’s root. It connects a persistent workspace’s tools to an OpenRouter model call:
workspace.close() releases adapter-local resources but preserves the Sprite. workspace.destroy() is the explicit infrastructure deletion operation.
TanStack AI
TanStack AI provides a published Sprites sandbox provider with a durable filesystem, resume-by-ID, in-place checkpoints, and one proxied HTTP port. It requires Node.js 22.4 or newer.provider in a sandbox definition from @tanstack/ai-sandbox. A Sprite exposes one public HTTP port through the provider, defaulting to port 8080. Checkpoints belong to the existing Sprite and do not survive Sprite deletion.
Because the Sprite is remote, tools bridged from an application running on your laptop cannot call laptop localhost directly; use the bridge tunnel described in the TanStack AI provider documentation.