Both are open source harness options with comparable terms, so the choice comes down to which model of the problem you prefer — compare the descriptions below rather than the licence.
Lightweight loop with handoffs, guardrails and sessions.
OpenAI's terminal coding agent.
| OpenAI Agents SDK | Codex CLI | |
|---|---|---|
| Licence | Open source | Open source |
| Pricing | usage based | paid |
| Self-hostable | No | No |
| Languages | Python, TypeScript | Any language |
| Install | pip install openai-agents | npm install -g @openai/codex |
| Keys required | OPENAI_API_KEY | OPENAI_API_KEY |
Both are open source harness options with comparable terms, so the choice comes down to which model of the problem you prefer — compare the descriptions below rather than the licence. OpenAI Agents SDK: Lightweight loop with handoffs, guardrails and sessions. Codex CLI: OpenAI's terminal coding agent.
OpenAI Agents SDK is a hosted service only. Codex CLI is a hosted service only.
OpenAI Agents SDK is open source (usage based). Codex CLI is open source (paid).
Every page here answers to Accept: text/markdown and returns the same content at roughly a tenth the tokens. No separate site, no toggle — same URL.
curl -s -H "Accept: text/markdown" https://newagent.build/compare/openai-agents-sdk-vs-codex-cli