Sprites sandbox provider for the OpenAI Agents SDK
Project description
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 OpenAI Agents SDK sandbox APIs are currently beta. Until they stabilize, each adapter release supports a deliberately narrow 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 .
python -m pip install -e 'integrations/openai-agents[dev]'
python -m pytest integrations/openai-agents/tests
python -m ruff check --config integrations/openai-agents/pyproject.toml integrations/openai-agents
python -m mypy --config-file integrations/openai-agents/pyproject.toml integrations/openai-agents/src
python -m build integrations/openai-agents
The adapter may use public agents.sandbox modules but 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. The upper bound on openai-agents prevents an untested
SDK minor release from silently changing those beta sandbox interfaces.
Project details
Release history Release notifications | RSS feed
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.1.0.tar.gz.
File metadata
- Download URL: sprites_openai_agents-0.1.0.tar.gz
- Upload date:
- Size: 41.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80d80b9e90ce55ab40ea564ba1161db0726a0feed88e8d1d4c9685b28ef35b1f
|
|
| MD5 |
024fa50a2f53ff8ddacc45af90cbc8f3
|
|
| BLAKE2b-256 |
ccf4da41cec0a7c46e5fcb8e66f5d7f44a886217dff5a6e40cdab12dd9b590b2
|
Provenance
The following attestation bundles were made for sprites_openai_agents-0.1.0.tar.gz:
Publisher:
publish-openai-agents.yml on superfly/sprites-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sprites_openai_agents-0.1.0.tar.gz -
Subject digest:
80d80b9e90ce55ab40ea564ba1161db0726a0feed88e8d1d4c9685b28ef35b1f - Sigstore transparency entry: 2206799821
- Sigstore integration time:
-
Permalink:
superfly/sprites-py@5977d95cb29814a5587eb778f235647cf50636bd -
Branch / Tag:
refs/tags/sprites-openai-agents-v0.1.0 - Owner: https://github.com/superfly
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-openai-agents.yml@5977d95cb29814a5587eb778f235647cf50636bd -
Trigger Event:
push
-
Statement type:
File details
Details for the file sprites_openai_agents-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sprites_openai_agents-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16524e08b765305018be9f624e8c59f7f013f2f42c89522442deb2989433a7ec
|
|
| MD5 |
e2f6f417c7eaca14ab174673110db6e2
|
|
| BLAKE2b-256 |
d4d0731152a35fdbb46ad1d2bb77f72ff6db6f22e06fcc8216b30ab8f3acee99
|
Provenance
The following attestation bundles were made for sprites_openai_agents-0.1.0-py3-none-any.whl:
Publisher:
publish-openai-agents.yml on superfly/sprites-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sprites_openai_agents-0.1.0-py3-none-any.whl -
Subject digest:
16524e08b765305018be9f624e8c59f7f013f2f42c89522442deb2989433a7ec - Sigstore transparency entry: 2206799835
- Sigstore integration time:
-
Permalink:
superfly/sprites-py@5977d95cb29814a5587eb778f235647cf50636bd -
Branch / Tag:
refs/tags/sprites-openai-agents-v0.1.0 - Owner: https://github.com/superfly
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-openai-agents.yml@5977d95cb29814a5587eb778f235647cf50636bd -
Trigger Event:
push
-
Statement type: