openai-agents-floo
Run the OpenAI Agents SDK shell and filesystem tools in a floo sandbox. This package targets openai-agents==0.26.0 and floo-sandbox==0.2.0.
Install with Python 3.11 or newer.
python -m pip install openai-agents-floo==0.1.0
Set FLOO_API_KEY in the application environment and FLOO_APP_NAME to an existing app. Set FLOO_ORG_ID to select an org when using a personal key. The floo SDK manages its shared transport. The provider captures that transport when you construct the client.
import asyncio
import os
from agents import RunConfig, Runner
from agents.sandbox import SandboxAgent, SandboxRunConfig
from openai_agents_floo import FlooSandboxClient, FlooSandboxOptions
async def main():
agent = SandboxAgent(name="Analyst", instructions="Use the sandbox to check your work.")
config = RunConfig(sandbox=SandboxRunConfig(
client=FlooSandboxClient(os.environ["FLOO_APP_NAME"]),
options=FlooSandboxOptions(lifetime_seconds=300),
))
result = await Runner.run(agent, "Write and run a Python program that sums 1 through 100.", run_config=config)
print(result.final_output)
asyncio.run(main())
This example uses the application's configured model. The live tests below use scripted turns and need only floo credentials.
Workspace and lifecycle
Commands run with /workspace as their working directory. SDK file operations accept binary files and stay within that directory. Manifests support inline File and Dir entries, including nested and ephemeral entries. Commands run as the guest's default user with outbound networking blocked. The provider supports one-shot commands. PTYs, user switching, ports, host files, mounts, extra path grants, and manifest environment variables are unsupported.
With SandboxRunConfig(client=...), the runner starts and cleans up the sandbox. With SandboxRunConfig(session=...), the application owns the session. Call await session.aclose() to persist its configured snapshot and terminate it. Use await client.delete(session) in a cleanup finally block to terminate a partially initialized session. Deletion is idempotent.
Import openai_agents_floo in each resume worker. Save the SDK run state in trusted application storage. For a standalone session, use client.serialize_session_state(session.state), then await client.resume(client.deserialize_session_state(payload)). Resuming a live sandbox transfers lifecycle ownership to the resumed handle.
Version 0.1.0 records the floo backend ID, SDK session UUID, app name, floo sandbox ID, creation options, manifest, and SDK snapshot metadata. Resume with the same app and org. After termination, recovery requires the persisted snapshot. The runner selects its local snapshot directory by default. For a custom directory, pass the same absolute path to FlooSandboxClient(snapshot_dir=...) and LocalSnapshotSpec(base_path=...). All resume workers need access to those archives. Direct client.create() uses a no-op snapshot by default and can reconnect only while the sandbox exists.
Workspace files survive consecutive commands on the same sandbox. A replacement sandbox restores the workspace archive, including file modes. System packages, files outside the workspace, and background processes are outside the archive. Long-running processes require their original guest to remain running. Use a workspace-local dependency directory for dependencies that must survive restore.
Verify
From this directory, build the wheel with python -m build --wheel, install it into a fresh environment, and run the following with that environment's Python. Set FLOO_AGENTS_TEST_APP to an existing app for the two live checks.
python -m unittest discover -s tests -v
python tests/live_session.py
python tests/live_runner.py
The live checks allocate short-lived floo sandboxes and verify their final status. They use temporary local directories for snapshots.
Metadata
Release files for openai-agents-floo 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openai_agents_floo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for openai_agents_floo-0.1.0-py3-none-any.whl |
Release files / openai_agents_floo-0.1.0-py3-none-any.whl
| Download URL | openai_agents_floo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13f8244d0cb5c5a97ca4983c8f1320cf121c80ba7b55cd66838ace5086421e70
|
|
BLAKE2b-256 checksum How to use checksums |
7fb71e3445c88822741ccb3e81b3777ed8dff0c8c619694ef5e94821845a32cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for openai-agents-floo 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.