VM0VM0
Experimental

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:

vm0.yaml
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-xxx

Then 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:

FrameworkInstructions 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 setup with Codex. Use vm0 secret set OPENAI_API_KEY instead.
  • Experimental status - The feature may have breaking changes in future releases.

Getting an API Key

To use Codex, you need an OpenAI API key:

  1. Go to OpenAI Platform
  2. Create a new API key
  3. Store it with vm0 secret set OPENAI_API_KEY sk-xxx