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.

[!NOTE] The Agents SDK sandbox provider APIs evolve quickly. Each adapter release supports an explicitly tested SDK version range.

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sprites_openai_agents-0.2.0.tar.gz (43.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sprites_openai_agents-0.2.0-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file sprites_openai_agents-0.2.0.tar.gz.

File metadata

  • Download URL: sprites_openai_agents-0.2.0.tar.gz
  • Upload date:
  • Size: 43.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sprites_openai_agents-0.2.0.tar.gz
Algorithm Hash digest
SHA256 034a212134ed8fc726048a05a9c15c26bfeee8d9ecb194106d4d1d64d543da40
MD5 5c4904a8b7bbbbb04ce491e099d66c51
BLAKE2b-256 9fe92940a8dff21c844eba6df197f030a11e81549dcfaf54324118f803187952

See more details on using hashes here.

Provenance

The following attestation bundles were made for sprites_openai_agents-0.2.0.tar.gz:

Publisher: publish.yml on superfly/sprites-openai-agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sprites_openai_agents-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sprites_openai_agents-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac130fc8ae071bf5775a04a5fb4c4392a1ad26db504f858c0e93a3bab8e4efdb
MD5 8a3955b5da43de7253208d4db9ca5066
BLAKE2b-256 c545ecb2fd50860ef10c0cff062f87ba15ffc09e2a2fc6527a644cc46caaa178

See more details on using hashes here.

Provenance

The following attestation bundles were made for sprites_openai_agents-0.2.0-py3-none-any.whl:

Publisher: publish.yml on superfly/sprites-openai-agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

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