Skip to main content
Pass a FlooSandboxClient to the OpenAI Agents SDK to run shell commands and edit files under /workspace. The SDK manages model calls and approvals. floo runs the commands.

Install the provider

Version 0.1.0 requires Python 3.11 or newer and installs openai-agents==0.26.0 and floo-sandbox==0.2.0. Install the provider from PyPI:

Run a command

Set FLOO_API_KEY to a floo API key with sandbox access and FLOO_APP_NAME to an existing app in that org. If your key can access multiple orgs, set FLOO_ORG_ID to the target org ID. See sandbox availability by plan. This example uses a scripted model so you can test the SDK and floo with only your floo credentials. It checks the actual shell output before printing it.
To let a model choose the commands, pass your configured model to SandboxAgent and supply its credentials to the application.

Resume a workspace

The runner closes a session it creates. To continue a paused run, save the SDK run state and keep the local snapshot directory available to the worker that resumes it. Import openai_agents_floo in that worker. A live sandbox can reconnect by its saved identity. After termination, the provider restores workspace files and their modes into a new sandbox. When your application calls client.create() directly, it owns the session. Pass a LocalSnapshotSpec to preserve files after termination, call await session.aclose() to save and close, and call await client.delete(session) in a cleanup block. The provider README and runnable tests cover both lifecycles.

Execution limits

Commands run as the guest’s default user with outbound networking blocked. The provider supports one-shot commands and inline file and directory entries. Interactive terminals, exposed ports and host mounts are unsupported in 0.1.0. The snapshot covers workspace files. System packages and background processes belong to the original sandbox.