Skip to main content

Sprites for OpenAI Agents

sprites-openai-agents connects Sprites to the OpenAI Agents SDK sandbox interface. It is maintained by the Sprites team and shipped separately so both sprites-py and openai-agents remain provider-agnostic.

Installation

pip install sprites-openai-agents

Set the credentials used by the SDKs:

export OPENAI_API_KEY=...
export SPRITES_API_TOKEN=...

Usage

from agents.run import RunConfig
from agents.sandbox import SandboxAgent, SandboxRunConfig
from sprites_openai_agents import SpritesSandboxClient

client = SpritesSandboxClient()
sandbox = await client.create()

agent = SandboxAgent(
    name="Sprite assistant",
    instructions="Inspect the workspace and complete the requested task.",
)
run_config = RunConfig(sandbox=SandboxRunConfig(session=sandbox))

async with sandbox:
    # Pass agent and run_config to Runner.run(...) or Runner.run_streamed(...).
    ...

By default, the client creates an ephemeral sprite and deletes it when the session is cleaned up. To attach to an existing sprite:

from sprites_openai_agents import SpritesSandboxClientOptions

sandbox = await client.create(
    options=SpritesSandboxClientOptions(sprite_name="my-sprite"),
)

Development

From the repository root:

python -m pip install -e '.[dev]'
python -m pytest
python -m ruff check .
python -m mypy src
python -m build
python -m twine check dist/*

The adapter uses the public agents.sandbox provider contract and must not import its old in-tree location under agents.extensions.sandbox.sprites.

Compatibility policy

The adapter imports OpenAI Agents symbols from their shortest documented public path. A few provider primitives—PTY helpers, runtime helper scripts, workspace path utilities, materialization types, and provider-facing errors—are documented as modules but are not re-exported from agents.sandbox; those imports therefore remain module-qualified. Upper dependency bounds prevent an untested SDK or Sprites minor release from silently changing the provider contract.

The CI matrix tests both the minimum supported dependency pair and the newest versions inside the declared ranges. A scheduled compatibility run also checks the newest published dependencies so upcoming range updates are visible before users encounter resolver downgrades.

Development moved from the superfly/sprites-py monorepo after version 0.1.0. The PyPI package name and Python import path did not change.

Metadata

Release files for sprites-openai-agents 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sprites-openai-agents 0.2.1
File Size Uploaded Provenance Actions
sprites_openai_agents-0.2.1.tar.gz 43.8 kB With provenance Details for sprites_openai_agents-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sprites-openai-agents 0.2.1
File Interpreter ABI Platform Actions
sprites_openai_agents-0.2.1-py3-none-any.whl Python 3 none any Details for sprites_openai_agents-0.2.1-py3-none-any.whl

Total release size: 71.5 kB

Release files / sprites_openai_agents-0.2.1.tar.gz

Download URL sprites_openai_agents-0.2.1.tar.gz
Size 43.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e0d044894e3931b3618f70099a3030020b9c9abe857f8dcd7b950e6d1a238d37
BLAKE2b-256 checksum
How to use checksums
2530e682532ba413f8e75d2398e25b802ed03955d7e05c850dad399996ea2abc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / sprites_openai_agents-0.2.1-py3-none-any.whl

Download URL sprites_openai_agents-0.2.1-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41a4f2a1c734be05ea0ec53ead736b3a1eb77aa117f7a522391ed0cdd89417e6
BLAKE2b-256 checksum
How to use checksums
1c2316b78477042c436dd4ddc0fb97ac0f5bba7c7c7cfdc2f876f74ea63c0012
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for sprites-openai-agents 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sprites_openai_agents-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page