A step-by-step walkthrough of building a custom AI agent harness using the OpenAI Agents SDK integrated with Modal sandboxes. Starting from a basic local agent loop, the guide progressively adds security via isolated sandboxes with GPU support, multi-turn memory via Sessions, orchestrator/subagent architecture for long-horizon tasks, async parallel execution with a SubAgentPool, GPU spend quotas, filesystem snapshots for checkpoint-based branching, and a pluggable skills subsystem. The end result is a parallel auto-research harness capable of running OpenAI's Parameter Golf experiments across multiple GPU-backed subagents simultaneously.

14m read timeFrom modal.com
Post cover image
Table of contents
Moving the agent into a SandboxWe've now built parallel auto-research on GPUs!

Sort: