openai-agents-withruntime
Run an OpenAI Agents SDK
SandboxAgent in a Runtime Cloud sandbox, a
Firecracker microVM with its own Linux kernel. Change the sandbox client in
the run configuration; the agent stays the same.
pip install openai-agents-withruntime
Set RUNTIME_API_KEY to a key from
withruntime.com/account/keys, or run
npx withruntime login once on the machine.
from agents import Runner
from agents.run import RunConfig
from agents.sandbox import Manifest, SandboxAgent, SandboxRunConfig
from agents.sandbox.entries import File
from openai_agents_withruntime import RuntimeCloudSandboxClient, RuntimeCloudSandboxClientOptions
agent = SandboxAgent(
name="Analyst",
instructions="Answer from the files in the workspace.",
default_manifest=Manifest(entries={"sales.csv": File(content=b"month,total\nJuly,120\nAugust,180\n")}),
)
run_config = RunConfig(
sandbox=SandboxRunConfig(
client=RuntimeCloudSandboxClient(),
options=RuntimeCloudSandboxClientOptions(),
)
)
result = await Runner.run(agent, "What was the total for both months?", run_config=run_config)
print(result.final_output)
What it supports
- Commands with timeouts, and terminal sessions for
exec_commandandwrite_stdin. - File reads and writes of any size, inside and outside the workspace, and commands as other users.
- Manifests: files, directories, git repositories, users and environment.
exposed_portsas Runtime previews, private by default.- Workspace persistence as a tar archive, or with
workspace_persistence="snapshot"as a Runtime snapshot of the whole machine, files, memory and running processes, which a resumed run starts from. pause_on_exit=True: the sandbox pauses instead of stopping, and a resumedRunStatewakes the same machine.
Options include image, snapshot_id, vcpu, memory_mib, region,
timeout_seconds, labels and env. The full guide is
withruntime.com/docs/openai-agents-sdk.
The client is the one in the withruntime SDK (withruntime.openai_agents);
this package gives it the name Agents SDK users search for and pins
compatible versions of both.
Tests
pip install -e . pytest
python -m pytest tests # no account needed
RUNTIME_API_KEY=... python scripts/e2e.py # a real sandbox, no model calls
scripts/e2e.py runs a SandboxAgent through the SDK's own Runner with its
ScriptedModel, so it calls no model; it starts one sandbox and checks that
the run's cleanup stopped it.
Metadata
Release files for openai-agents-withruntime 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openai_agents_withruntime-0.1.0.tar.gz | 7.8 kB | With provenance | Details for openai_agents_withruntime-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openai_agents_withruntime-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for openai_agents_withruntime-0.1.0-py3-none-any.whl |
Total release size: 14.7 kB
Release files / openai_agents_withruntime-0.1.0.tar.gz
| Download URL | openai_agents_withruntime-0.1.0.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
237f6c3d9959a4f81fb303377171c84c97d4091fb730ba29b04f28b0d1232638
|
|
BLAKE2b-256 checksum How to use checksums |
62a4402b326161f30446eef8d551128e9f21234705b5d7b9bd6b5a6771a05399
|
| 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 22, 2026.
Transparency logRelease files / openai_agents_withruntime-0.1.0-py3-none-any.whl
| Download URL | openai_agents_withruntime-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca8e90678bdf9569f72ab45e6a9c0af199ed80e7a5756d4512db7e1bf466d946
|
|
BLAKE2b-256 checksum How to use checksums |
6214777d43340503c330fbc6627d8cb5547e26d296d48aeb51f5032863cef7ff
|
| 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 22, 2026.
Transparency logSecurity for openai-agents-withruntime 0.1.0
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.
Attestation for openai_agents_withruntime-0.1.0.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 22, 2026.
Transparency logA 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.