Skip to main content
These adapters let an application use Sprites as the execution environment for an agent.

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:
Run 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.
This adapter is alpha software. Environment source and dependencies execute inside the Sprite, so only run sources you trust and do not put credentials in source URLs.

Google ADK

The sprites-adk package gives Google Agent Development Kit agents command, code, file, checkpoint, and restore tools backed by Sprites.
This setup-only snippet adds the plugin’s tools to an agent and registers its lifecycle callbacks on the runner. It does not send a prompt:
To send a prompt, follow the runnable persistent-environment example. For a first check, ask it to run 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.
Save this as sprite_agent.py. It creates a sandbox session and asks the agent to report its working directory:
Run it with:
A successful run prints the agent’s report of the sandbox’s working directory. By default, cleanup deletes the ephemeral Sprite. Pass a 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.
@fly/sprites-openrouter is only a proposed package name and is not published to npm. Clone and build the repository instead.
Save this as sprite-agent.mjs in the cloned repository’s root. It connects a persistent workspace’s tools to an OpenRouter model call:
Run it from that repository root with Node.js 24 or newer:
A successful run prints the agent’s report of the sandbox’s working directory. 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.
This setup-only snippet creates the provider; it does not start a sandbox or run an agent:
For a complete app, follow TanStack’s runnable sandbox-web example. It starts with Docker; use its “Swapping the stack” instructions and the Sprites port and bridge notes below when adapting it. On a successful first run, agent output streams and the generated app’s preview opens. Use it as the 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.