Building with Modal and the OpenAI Agents SDK | Modal Blog
Apr 15, 2026

Summary
This post details the integration of the OpenAI Agents SDK with Modal Sandboxes to build custom agent harnesses. It introduces concepts like `SandboxAgent`, `WorkspaceShellCapability`, `ModalSandboxClientOptions` for GPU attachment, and `SQLiteSession` for stateful interactions. The post also describes advanced patterns like using subagents for higher-order planning and parallelization via a `SubAgentPool` with `asyncio.Future` for non-blocking execution.
More from the Sandboxed Code Execution trail
- Runtime Roundup: VM Sandboxes, Multi-node clusters, and more | Modal Blog
- VM Sandboxes: Full computers for agents | Modal Blog
- Sidecars: A low-latency trust boundary for Sandboxes | Modal Blog
- Product updates: Sandbox Sidecars, new models, a refreshed dashboard, and more | Modal Blog
- Devin Outposts on Modal | Modal Blog