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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
034a212134ed8fc726048a05a9c15c26bfeee8d9ecb194106d4d1d64d543da40
|
|
| MD5 |
5c4904a8b7bbbbb04ce491e099d66c51
|
|
| BLAKE2b-256 |
9fe92940a8dff21c844eba6df197f030a11e81549dcfaf54324118f803187952
|
Provenance
The following attestation bundles were made for sprites_openai_agents-0.2.0.tar.gz:
Publisher:
publish.yml on superfly/sprites-openai-agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sprites_openai_agents-0.2.0.tar.gz -
Subject digest:
034a212134ed8fc726048a05a9c15c26bfeee8d9ecb194106d4d1d64d543da40 - Sigstore transparency entry: 2617662943
- Sigstore integration time:
-
Permalink:
superfly/sprites-openai-agents@457ff4cca1c72f3ceeb14473790799f710e711ff -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/superfly
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@457ff4cca1c72f3ceeb14473790799f710e711ff -
Trigger Event:
push
-
Statement type:
File details
Details for the file sprites_openai_agents-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sprites_openai_agents-0.2.0-py3-none-any.whl
- Upload date:
- Size: 27.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac130fc8ae071bf5775a04a5fb4c4392a1ad26db504f858c0e93a3bab8e4efdb
|
|
| MD5 |
8a3955b5da43de7253208d4db9ca5066
|
|
| BLAKE2b-256 |
c545ecb2fd50860ef10c0cff062f87ba15ffc09e2a2fc6527a644cc46caaa178
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sprites_openai_agents-0.2.0-py3-none-any.whl -
Subject digest:
ac130fc8ae071bf5775a04a5fb4c4392a1ad26db504f858c0e93a3bab8e4efdb - Sigstore transparency entry: 2617662951
- Sigstore integration time:
-
Permalink:
superfly/sprites-openai-agents@457ff4cca1c72f3ceeb14473790799f710e711ff -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/superfly
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@457ff4cca1c72f3ceeb14473790799f710e711ff -
Trigger Event:
push
-
Statement type: