Codex
Use OpenAI's Codex as your agent framework
This is an experimental feature. The configuration and behavior may change in future releases.
Codex is an experimental agent framework that uses OpenAI's models. Unlike Claude Code, Codex requires manual API key configuration and does not support the model provider system.
Configuration
To use Codex, set the framework field to codex and provide your OpenAI API key:
version: "1.0"
agents:
my-agent:
framework: codex
instructions: AGENTS.md
environment:
OPENAI_API_KEY: "${{ secrets.OPENAI_API_KEY }}"Running Your Agent
First, store your API key on the platform (one-time setup):
vm0 secret set OPENAI_API_KEY sk-xxxThen run your agent - the secret is automatically loaded:
vm0 run my-agent "your prompt"For CI/CD or temporary overrides, you can pass the secret at runtime: --secrets OPENAI_API_KEY=sk-xxx
Instructions
Codex loads instructions from a different location than Claude Code:
| Framework | Instructions Path |
|---|---|
| Claude Code | ~/.claude/CLAUDE.md |
| Codex | ~/.codex/AGENTS.md |
When you specify an instructions file in your vm0.yaml, VM0 automatically mounts it to the correct location based on your framework.
Limitations
Codex has some limitations compared to Claude Code:
- No model provider support - You cannot use
vm0 model-provider setupwith Codex. Usevm0 secret set OPENAI_API_KEYinstead. - Experimental status - The feature may have breaking changes in future releases.
Getting an API Key
To use Codex, you need an OpenAI API key:
- Go to OpenAI Platform
- Create a new API key
- Store it with
vm0 secret set OPENAI_API_KEY sk-xxx