A one-shot coding agent: send it a prompt, and the OpenAI Agents API runs the
Codex agent loop while codex exec-server in an ephemeral Render Sandbox runs
its commands and file edits. Files the agent writes to /workspace/output are
copied back to your machine.
Render Sandboxes is in public beta. The OpenAI Agents API is in beta, and
codex exec-serveris experimental.
Follow the tutorial: OpenAI Agents API with Render Sandboxes.
You need Node.js 22+, a Render workspace with Sandboxes enabled, OpenAI Agents API access, an application API key, and an environment key for the executor. Create the environment key on the Agents tab, in the same project and user as the application key. A regular API key can't connect environments, even with all permissions.
npm ci
cp .env.example .env # fill in your credentials
npm run agent -- "Create a hello world HTTP server in /workspace/output. Test it before you finish."Options:
--timeout <seconds> Override the 600-second deadline
--output <path> Copy /workspace/output files to this local directory
Each run writes run.json, events.jsonl, executor.log, and result.txt
under runs/<run_id>/. run.json ends with phase set to completed or
failed, and a failed run records the reason in error. The runner deletes
its session and terminates its sandbox.
openai7.39.0@renderinc/sdk1.3.0@openai/codex0.163.0 for Linux x64 and arm64, checked against pinned npm integrity values
npm run check # typecheck and tests