feat(examples): codex_runtime_on_agentkit — deploy a runtime=codex agent to AgentKit by yaozheng-fang · Pull Request #608 · volcengine/veadk-python · GitHub
Skip to content

feat(examples): codex_runtime_on_agentkit — deploy a runtime=codex agent to AgentKit#608

Merged
yaozheng-fang merged 2 commits into
mainfrom
example/codex-on-agentkit
Jun 15, 2026
Merged

feat(examples): codex_runtime_on_agentkit — deploy a runtime=codex agent to AgentKit#608
yaozheng-fang merged 2 commits into
mainfrom
example/codex-on-agentkit

Conversation

@yaozheng-fang

Copy link
Copy Markdown
Collaborator

A minimal, deployable example: a VeADK agent running on the OpenAI Codex runtime (Agent(runtime="codex")), deployed to Volcengine AgentKit with veadk agentkit launch.

What's inside

examples/codex_runtime_on_agentkit/
├── app.py                # deploy entry (ADK agent API server + /ping)
├── agents/codex_agent/   # Agent(runtime="codex")
├── requirements.txt      # veadk-python>=0.5.39 + openai-codex (pinned betas)
├── .env.example
└── .dockerignore

How it works

  • Agent(runtime="codex") — the Runner owns session/memory/tracing; Codex drives the turn. The MODEL_AGENT_* chat model (Ark) is bridged onto Codex's Responses API by the in-process shim, so a normal Ark chat model works unchanged.
  • Install is pure PyPI via the default uv pip install -r requirements.txtveadk-python>=0.5.39 ships the codex runtime; openai-codex (+ openai-codex-cli-bin, the Codex binary as a manylinux wheel) is listed explicitly and pinned to exact pre-release versions so uv installs the betas without a global --prerelease flag. No build script / git clone.

Verified (real deploy)

Deployed to AgentKit and exercised end-to-end:

  1. agentkit invoke "你好,你叫什么" → agent replied (reasoning + final text both forwarded — the full codex trajectory).
  2. agentkit invoke "用 ls 列出当前目录…再 cat requirements.txt" → the agent ran the tools inside the runtime container and returned the real file listing + the verbatim requirements.txt contents.

So the codex tool sandbox (multi-step tool loop) works inside the AgentKit container.

Notes documented in the README: model is bridged (need not be an OpenAI model); first-request latency from the Codex binary spawn; the build install can take a few minutes (re-run reuses cached layers); tool-heavy agents may need runtime permissions.

A minimal deployable app whose agent runs on the OpenAI Codex runtime
(`Agent(runtime="codex")`), deployed to Volcengine AgentKit via
`veadk agentkit launch`.

- agents/codex_agent: Agent(runtime="codex")
- app.py: ADK agent API server (deploy entry, + /ping)
- scripts/install_veadk.sh: installs veadk from main + openai-codex (not a veadk
  dep; pulls openai-codex-cli-bin, the Codex binary as a manylinux wheel, so no
  separate binary install in the Linux build)
- README.md / README.zh.md: codex-on-AgentKit specifics, deploy steps, caveats

The model in MODEL_AGENT_* is bridged onto Codex's Responses API by the
in-process shim, so a normal Ark chat model works unchanged.
…cript

veadk-python>=0.5.39 (with the codex runtime) is on PyPI, so the example no
longer needs the shallow github clone build script — it installs everything via
the default `uv pip install -r requirements.txt`. This is simpler and avoids the
flaky build-network → github connectivity that the clone depended on.

- requirements.txt: veadk-python>=0.5.39 + openai-codex (+ openai-codex-cli-bin),
  the latter two pinned to exact pre-release versions so uv installs them
  without a global --prerelease flag
- remove scripts/install_veadk.sh (no longer needed)
- README zh/en: document the PyPI install + pre-release pin
@yaozheng-fang yaozheng-fang merged commit e6c8205 into main Jun 15, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants