Skip to main content

openai-agents-pilldrops

PillDrops sandboxes for the OpenAI Agents SDK. A SandboxAgent's shell and file tools run in a PillDrops cloud sandbox.

Install

pip install openai-agents-pilldrops
export PILLDROPS_API_KEY=sf_live_...   # from https://pilldrops.com/dashboard

Use

import asyncio

from agents import RunConfig, Runner
from agents.sandbox import SandboxAgent, SandboxRunConfig

from openai_agents_pilldrops import PillDropsSandboxClient, PillDropsSandboxClientOptions


async def main():
    agent = SandboxAgent(name="Analyst", instructions="Use the sandbox tools.")
    result = await Runner.run(
        agent,
        "Create primes.py that prints the primes below 50, run it, and tell me how many there are.",
        run_config=RunConfig(sandbox=SandboxRunConfig(
            client=PillDropsSandboxClient(),
            options=PillDropsSandboxClientOptions(template="code-interpreter"),
        )),
    )
    print(result.final_output)


asyncio.run(main())

The runner creates the sandbox, puts the agent's workspace in /workspace, and deletes the sandbox when the run ends.

With a model other than OpenAI's (for example Claude through LitellmModel), pass capabilities=[Shell()] from agents.sandbox.capabilities. The default set includes apply_patch, which only OpenAI's Responses API supports.

Options

Option Default Meaning
template code-interpreter Any PillDrops template, e.g. node or browser
timeout server default Sandbox lifetime in seconds
envs none Environment variables for every command
pause_on_exit False Pause instead of delete at the end, so a saved run state can resume in the same sandbox

Supported

  • Commands, file reads and writes, workspace snapshots (tar) and restore, and resume: it reconnects to the same sandbox when it still exists, or starts a new one.
  • Not supported, and rejected with an error: PTY sessions, commands as another user, manifest mounts and exposed ports.

Tests

pip install -e . pytest && pytest tests            # options and state serialization
python tests/live_check.py                          # a real sandbox; needs PILLDROPS_API_KEY

License

MIT

Metadata

Release files for openai-agents-pilldrops 0.1.0

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

Source distribution (sdist)

Source distribution for openai-agents-pilldrops 0.1.0
File Size Uploaded Provenance Actions
openai_agents_pilldrops-0.1.0.tar.gz 6.1 kB Without provenance Details for openai_agents_pilldrops-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 12.2 kB

Release files / openai_agents_pilldrops-0.1.0.tar.gz

Download URL openai_agents_pilldrops-0.1.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2c53dc068f9ae8c60746cea496cc61600390ca85218492f7db8a7624102cd89f
BLAKE2b-256 checksum
How to use checksums
b070abc13c0c60fb7188e95c074b05cfb1ee2dfab7e41b16ed0ae29d7c03c8cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release files / openai_agents_pilldrops-0.1.0-py3-none-any.whl

Download URL openai_agents_pilldrops-0.1.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d3f92d10c8a5acf8fd055531de4c66284826e8e30d21da49119afaece6345d1
BLAKE2b-256 checksum
How to use checksums
8f2e91e10d7ffa765d0d301908a5052e366be3c7fcf09cb2d5d98aada9e7dd73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Security for openai-agents-pilldrops 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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