Best Agents for OpenAI Codex in 2026
OpenAI Codex supports agent skills for task-specific workflows. Learn how to find, install, and use AI agents with Codex CLI, IDE extensions, and the Codex app.
How Codex uses agents
OpenAI Codex supports the Agent Skills specification, making it compatible with the same agent ecosystem used by Claude Code, Cursor, Windsurf, and GitHub Copilot. Skills and agents work across the Codex CLI, IDE extensions, and the Codex app.
Codex discovers agents and skills from the .agents/skills/ directory, scanning from your current working directory up to the repository root. You can also install skills in your user-level directory for global availability.
How skills load in Codex
Codex uses progressive loading. At startup, it scans skill directories and reads only the name and description from each SKILL.md frontmatter. When you submit a prompt, Codex matches it against available skills and loads the relevant ones into context.
You can also invoke a skill explicitly by typing $skill-name in Codex, or let Codex select the right skill automatically based on your prompt. This dual approach — automatic matching plus explicit invocation — gives you flexibility depending on how specific your task is.
AGENTS.md
Codex also reads AGENTS.md files for project-level context. This is where you put static information about your project: tech stack, conventions, architecture decisions. Agent definitions handle the dynamic expertise: code review processes, testing workflows, security audit checklists.
Agent categories that work well with Codex
Coding agents
Coding agents are the core use case. Code review agents, test writers, refactoring agents, and debugging agents all align with Codex's strengths as a coding-focused tool. Codex's ability to work across multiple files in a single task makes it particularly effective for agents that define multi-step workflows.
What to look for:
- Agents that define structured processes (not just "you are an expert")
- Framework-specific agents that know patterns and anti-patterns for your stack
- Agents with explicit output formats — Codex produces more consistent results with clear structure
DevOps agents
DevOps agents help with CI/CD pipelines, Dockerfiles, Kubernetes configs, and infrastructure-as-code. Since Codex can read your existing configurations and generate new ones that follow the same patterns, DevOps agents that encode best practices are especially valuable.
Writing agents
Writing agents generate documentation, READMs, changelogs, and API reference docs. Codex has strong multi-file awareness, so writing agents that need to read source code and produce documentation can trace implementations across the entire codebase.
Automation agents
Automation agents define workflows for repetitive tasks: scaffolding components, setting up new endpoints, creating boilerplate configurations. Codex's agent mode can execute these multi-step workflows end to end, creating files, running commands, and verifying results.
How to install agents for Codex
Option 1: Manual download and copy
- Find an agent on Agent Shelf
- Click Download to get the Markdown file
- Create
.agents/skills/or.agents/agents/in your project - Place the file in the directory
Codex discovers skills automatically on the next interaction. No restart needed.
Option 2: Use the AgentShelf skill
The AgentShelf skill automates discovery and installation. Once installed, ask Codex:
- "Install the code-review agent from AgentShelf"
- "Search AgentShelf for testing agents"
- "What agents are available for Python?"
The skill handles downloading, placement, and dependency configuration. If the agent references MCP servers or other tools, it detects and sets them up. See the installation guide.
Option 3: Use the AgentShelf MCP server
The AgentShelf MCP server provides tools for searching, browsing, and downloading agents from within Codex. The remote server requires no installation — add the endpoint URL to your MCP configuration and Codex gains direct access to the full registry.
Tips for getting the best results
Use explicit invocation for focused tasks
When you know which agent you want, invoke it explicitly with $skill-name. This ensures Codex loads the full instructions without relying on automatic matching. For broad tasks where multiple agents might apply, let Codex's automatic skill selection choose the right one.
Combine agents with AGENTS.md
Keep project-specific context in AGENTS.md (tech stack, conventions, architecture) and use agents for reusable expertise (code review methodology, testing workflow, security checklist). This separation means your agents stay portable across projects while your project context stays specific.
Keep agents focused
A single agent that tries to handle code review, testing, documentation, and security will be mediocre at each. Install multiple specialized agents and use each for its purpose. Codex's skill matching works better with focused agents — a specific description makes matching more accurate.
Read the agent before installing
Every agent on Agent Shelf is a plain Markdown file. Read it to understand the persona, workflow, and rules. You can customize any agent after downloading — adjust rules, change output format, or add your team's conventions.
Stay updated
Agent authors publish new versions with improved instructions. Check Agent Shelf periodically for updates, or use the AgentShelf skill to check for newer versions automatically.
Finding agents for Codex
The Agent Shelf registry has agents across every category:
- Code review and quality: Browse coding agents
- Infrastructure and deployment: Browse DevOps agents
- Documentation: Browse writing agents
- Getting started: Read the beginner's guide
Every agent on Agent Shelf works with Codex, Claude Code, Cursor, Windsurf, and every other tool that supports the Agent Skills specification. Write once, use everywhere.
Written by Agent Shelf Team
The Agent Shelf team builds open infrastructure for AI agent discovery and distribution. We maintain the Agent Shelf registry, MCP server, and publish skill.
Best Agents for GitHub Copilot in 2026
Nextarrow_forwardAI Agents for Technical Writing and Documentation