Agentic Data Plane

rpk ai run codex

Launch the OpenAI Codex CLI with its model traffic routed through the Redpanda AI gateway for the current rpk ai environment.

rpk ai generates a throwaway Codex config in a temporary CODEX_HOME, points it at the gateway’s OpenAI-compatible Responses endpoint for the chosen provider, and authenticates Codex with an Agentic Data Plane API key. A stored key is read through rpk ai auth api-key; an explicitly provided key stays in the child process environment. Your own ~/.codex config is never read or modified, and no key is written to config.toml. Account sign-in credentials serve only provider reads and API-key management, never model invocation. If key acquisition fails, rpk ai refuses to launch. --api-key=no requires an already provided Agentic Data Plane API key.

The launch directory is auto-trusted under a workspace-write sandbox (approval_policy=on-request) so the fresh CODEX_HOME doesn’t prompt for trust on every run; pass --no-auto-trust to keep Codex’s normal first-run trust prompt.

OpenAI, OpenAI-compatible and Fireworks providers are supported. A requested model must belong to any configured provider model allowlist. Fireworks requires a nonempty allowlist. Without -m, Fireworks selects the first qualifying configured model. Other providers use Codex’s default, which must still belong to any configured allowlist.

Fireworks requires Codex 0.162.0 or newer, provider read access, and an exact configured model with direct Responses support for streaming, tools, multi-turn conversations and system prompts. Fireworks uses managed gateway authentication and a fresh CODEX_HOME; --codex-home, native provider/config/session overrides and applicable project .codex/config.toml files are refused. Launch from an isolated directory without project Codex configuration. Hosted web search and multi-agent delegation are disabled.

Pass Codex’s own flags after a literal --:

rpk ai run codex -L openai -m gpt-5.3-codex -e high -- --ask-for-approval never

Usage

rpk ai run codex [-- CODEX_ARGS...] [flags]

Flags

Value Type Description

--api-key

string

authenticate the session with an Agentic Data Plane API key: ask (ask before creating one), yes (create one without asking, also without a terminal), no (do not create a key; require an already provided Agentic Data Plane API key). Default: ask.

--codex-home

string

persistent CODEX_HOME dir (default: a throwaway temp dir); its config.toml is regenerated each run and the dir is tightened to 0700; your real ~/.codex is refused.

-e, --effort

effort

Model reasoning effort (for example, minimal, low, medium or high). Fireworks accepts only efforts listed for the model and defaults to its first listed effort, if any. Other providers use Codex’s default when omitted.

-L, --llmprovider

name

AI gateway LLM provider name to route through (an openai, openai_compatible or fireworks provider).

-m, --model

string

Request this model ID through the gateway. It must be in any configured allowlist, and Fireworks requires a nonempty allowlist.

--no-auto-trust

bool

do not pre-trust the launch directory; let Codex show its normal first-run trust prompt instead (default: the launch dir is auto-trusted under a workspace-write sandbox).

--print-config

bool

Print the validated Codex configuration, then exit without launching Codex or creating an API key. Provider read access is required.

Global flags

Value Type Description

--config

string

Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml.

-X, --config-opt

stringArray

Override rpk configuration settings; -X help for detail or -X list for terser detail.

--ignore-profile

bool

Ignore rpk.yaml and redpanda.yaml; use default settings.

--profile

string

rpk profile to use.

-v, --verbose

bool

Enable verbose logging.