Skip to content

About

Build a coding agent with OpenAI Agents API and Render Sandboxes

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

OpenAI coding agent on Render Sandboxes

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-server is experimental.

Follow the tutorial: OpenAI Agents API with Render Sandboxes.

Quickstart

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.

Verified versions

  • openai 7.39.0
  • @renderinc/sdk 1.3.0
  • @openai/codex 0.163.0 for Linux x64 and arm64, checked against pinned npm integrity values

Development

npm run check   # typecheck and tests

About

Build a coding agent with OpenAI Agents API and Render Sandboxes

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages