"How do I build an AI coding agent?" is usually a product-choice question, not a framework-from-scratch question. Start with a first-party coding agent if you want repository edits, tests, and reviewable diffs. Build on CrewAI or AutoGen only when you are writing your own orchestration loop.
This guide compares three catalog products using official jobs. It does not invent a fourth agent.
1. Name the job
Pick one:
- A developer drives the agent in a terminal or IDE.
- Your application must create durable cloud sessions and attach tools.
- You want a hosted website from a ChatGPT prompt, not a repo.
Those are different SKUs: coding agents, OpenAI Agents API, and ChatGPT Sites.
2. Match the vendor you already pay
| If you already buy | Start here | Why |
|---|---|---|
| ChatGPT / OpenAI coding | OpenAI Codex | First-party CLI, IDE, and ChatGPT coding surfaces |
| Claude plans | Claude Code | Anthropic terminal and IDE coding agent |
| Gemini / Google | Google Antigravity | Agent-first manager, CLI, SDK, and IDE |
Rematch on one repository and one test suite. Do not subtract vendor demos.
3. Do not confuse sibling OpenAI products
- Codex is the coding product a person uses.
- Agents API is the Codex harness as a managed API (public beta, US residency, no ZDR).
- ChatGPT Sites hosts a website. Official docs say Sites has no standalone Codex CLI manager.
See OpenAI Agents API vs OpenAI Codex and ChatGPT Sites vs OpenAI Codex.
4. Compare peers, not mashups
- Google vs Anthropic agents: Google Antigravity vs Claude Code
- OpenAI vs Anthropic coding products: OpenAI Codex vs Claude Code
- Editor-first vs terminal: Cursor vs Claude Code
- Moonshot terminal agent: Kimi Code vs Claude Code
5. Keep the same controls on every agent
Whatever you pick:
- Least-privilege shell and network.
- Secrets out of the prompt.
- Branch protection and CI on every agent diff.
- A human review for production writes.
Official product pages do not replace those controls.
Official sources
- Agents API overview: https://developers.openai.com/api/docs/guides/agents-api/overview
- Google Antigravity product: https://antigravity.google/product/
- Claude Code: https://www.anthropic.com/claude-code