Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ integrations/gemini-cli/skills/
integrations/gemini-cli/gemini-extension.json
integrations/opencode/agents/
integrations/cursor/rules/
integrations/codex/AGENTS.md
integrations/aider/CONVENTIONS.md
integrations/windsurf/.windsurfrules
integrations/openclaw/*
Expand Down
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Each agent file contains:

Browse the agents below and copy/adapt the ones you need!

### Option 3: Use with Other Tools (Cursor, Aider, Windsurf, Gemini CLI, OpenCode)
### Option 3: Use with Other Tools (Cursor, Codex, Aider, Windsurf, Gemini CLI, OpenCode)

```bash
# Step 1 -- generate integration files for all supported tools
Expand Down Expand Up @@ -486,6 +486,7 @@ The Agency works natively with Claude Code, and ships conversion + install scrip
- **[Gemini CLI](https://github.com/google-gemini/gemini-cli)** — extension + `SKILL.md` files → `~/.gemini/extensions/agency-agents/`
- **[OpenCode](https://opencode.ai)** — `.md` agent files → `.opencode/agents/`
- **[Cursor](https://cursor.sh)** — `.mdc` rule files → `.cursor/rules/`
- **Codex** — single `AGENTS.md` → `./AGENTS.md`
- **[Aider](https://aider.chat)** — single `CONVENTIONS.md` → `./CONVENTIONS.md`
- **[Windsurf](https://codeium.com/windsurf)** — single `.windsurfrules` → `./.windsurfrules`
- **[OpenClaw](https://github.com/openclaw/openclaw)** — `SOUL.md` + `AGENTS.md` + `IDENTITY.md` per agent
Expand Down Expand Up @@ -521,11 +522,12 @@ The installer scans your system for installed tools, shows a checkbox UI, and le
[ ] 5) [ ] OpenCode (opencode.ai)
[ ] 6) [ ] OpenClaw (~/.openclaw)
[x] 7) [*] Cursor (.cursor/rules)
[ ] 8) [ ] Aider (CONVENTIONS.md)
[ ] 9) [ ] Windsurf (.windsurfrules)
[ ] 10) [ ] Qwen Code (~/.qwen/agents)
[ ] 8) [ ] Codex (AGENTS.md)
[ ] 9) [ ] Aider (CONVENTIONS.md)
[ ] 10) [ ] Windsurf (.windsurfrules)
[ ] 11) [ ] Qwen Code (~/.qwen/agents)

[1-10] toggle [a] all [n] none [d] detected
[1-11] toggle [a] all [n] none [d] detected
[Enter] install [q] quit
```

Expand Down Expand Up @@ -653,6 +655,24 @@ Use the @security-engineer rules to review this code.
See [integrations/cursor/README.md](integrations/cursor/README.md) for details.
</details>

<details>
<summary><strong>Codex</strong></summary>

All agents are compiled into a single `AGENTS.md` file that Codex can read from your project root.

```bash
cd /your/project
/path/to/agency-agents/scripts/install.sh --tool codex
```

Then reference agents in your Codex session:
```
Use the Frontend Developer agent to refactor this component.
```

See [integrations/codex/README.md](integrations/codex/README.md) for details.
</details>

<details>
<summary><strong>Aider</strong></summary>

Expand Down Expand Up @@ -742,7 +762,7 @@ When you add new agents or edit existing ones, regenerate all integration files:

- [ ] Interactive agent selector web tool
- [x] Multi-agent workflow examples -- see [examples/](examples/)
- [x] Multi-tool integration scripts (Claude Code, GitHub Copilot, Antigravity, Gemini CLI, OpenCode, OpenClaw, Cursor, Aider, Windsurf, Qwen Code)
- [x] Multi-tool integration scripts (Claude Code, GitHub Copilot, Antigravity, Gemini CLI, OpenCode, OpenClaw, Cursor, Codex, Aider, Windsurf, Qwen Code)
- [ ] Video tutorials on agent design
- [ ] Community agent marketplace
- [ ] Agent "personality quiz" for project matching
Expand Down
18 changes: 16 additions & 2 deletions integrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ supported agentic coding tools.
- **[OpenCode](#opencode)** — `.md` agent files in `opencode/`
- **[OpenClaw](#openclaw)** — `SOUL.md` + `AGENTS.md` + `IDENTITY.md` workspaces
- **[Cursor](#cursor)** — `.mdc` rule files in `cursor/`
- **[Codex](#codex)** — `AGENTS.md` in `codex/`
- **[Aider](#aider)** — `CONVENTIONS.md` in `aider/`
- **[Windsurf](#windsurf)** — `.windsurfrules` in `windsurf/`

Expand All @@ -32,8 +33,8 @@ supported agentic coding tools.
./scripts/install.sh --tool gemini-cli
```

For project-scoped tools such as OpenCode, Cursor, Aider, and Windsurf, run
the installer from your target project root as shown in the tool-specific
For project-scoped tools such as OpenCode, Cursor, Codex, Aider, and Windsurf,
run the installer from your target project root as shown in the tool-specific
sections below.

## Regenerating Integration Files
Expand Down Expand Up @@ -149,6 +150,19 @@ See [cursor/README.md](cursor/README.md) for details.

---

## Codex

All agents are consolidated into a single `AGENTS.md` file for your project
root.

```bash
cd /your/project && /path/to/agency-agents/scripts/install.sh --tool codex
```

See [codex/README.md](codex/README.md) for details.

---

## Aider

All agents are consolidated into a single `CONVENTIONS.md` file that Aider
Expand Down
30 changes: 30 additions & 0 deletions integrations/codex/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Codex Integration

All Agency agents are consolidated into a single `AGENTS.md` file.
Codex can read this file when it is present in your project root.

## Install

```bash
# Run from your project root
cd /your/project
/path/to/agency-agents/scripts/install.sh --tool codex
```

## Activate an Agent

In your Codex session, reference the agent by name:

```
Use the Frontend Developer agent to refactor this component.
```

```
Apply the Reality Checker agent to verify this is production-ready.
```

## Regenerate

```bash
./scripts/convert.sh --tool codex
```
55 changes: 48 additions & 7 deletions scripts/convert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# gemini-cli — Gemini CLI extension (skills/ + gemini-extension.json)
# opencode — OpenCode agent files (.opencode/agent/*.md)
# cursor — Cursor rule files (.cursor/rules/*.mdc)
# codex — Single AGENTS.md for Codex
# aider — Single CONVENTIONS.md for Aider
# windsurf — Single .windsurfrules for Windsurf
# openclaw — OpenClaw SOUL.md files (openclaw_workspace/<agent>/SOUL.md)
Expand Down Expand Up @@ -348,13 +349,27 @@ HEREDOC
fi
}

# Aider and Windsurf are single-file formats — accumulate into temp files
# then write at the end.
# Codex, Aider, and Windsurf are single-file formats — accumulate into temp
# files then write at the end.
CODEX_TMP="$(mktemp)"
AIDER_TMP="$(mktemp)"
WINDSURF_TMP="$(mktemp)"
trap 'rm -f "$AIDER_TMP" "$WINDSURF_TMP"' EXIT
trap 'rm -f "$CODEX_TMP" "$AIDER_TMP" "$WINDSURF_TMP"' EXIT

# Write Codex/Aider/Windsurf headers once
cat > "$CODEX_TMP" <<'HEREDOC'
# The Agency — AI Agents for Codex
#
# This file provides Codex with the full roster of specialized AI agents from
# The Agency (https://github.com/msitarzewski/agency-agents).
#
# To activate an agent, reference it by name in your Codex prompt, e.g.:
# "Use the Frontend Developer agent to review this component."
#
# Generated by scripts/convert.sh — do not edit manually.

HEREDOC

# Write Aider/Windsurf headers once
cat > "$AIDER_TMP" <<'HEREDOC'
# The Agency — AI Agent Conventions
#
Expand All @@ -378,6 +393,26 @@ cat > "$WINDSURF_TMP" <<'HEREDOC'

HEREDOC

accumulate_codex() {
local file="$1"
local name description body

name="$(get_field "name" "$file")"
description="$(get_field "description" "$file")"
body="$(get_body "$file")"

cat >> "$CODEX_TMP" <<HEREDOC

---

## ${name}

> ${description}

${body}
HEREDOC
}

accumulate_aider() {
local file="$1"
local name description body
Expand Down Expand Up @@ -444,6 +479,7 @@ run_conversions() {
opencode) convert_opencode "$file" ;;
cursor) convert_cursor "$file" ;;
openclaw) convert_openclaw "$file" ;;
codex) accumulate_codex "$file" ;;
qwen) convert_qwen "$file" ;;
aider) accumulate_aider "$file" ;;
windsurf) accumulate_windsurf "$file" ;;
Expand All @@ -457,6 +493,10 @@ run_conversions() {
}

write_single_file_outputs() {
# Codex
mkdir -p "$OUT_DIR/codex"
cp "$CODEX_TMP" "$OUT_DIR/codex/AGENTS.md"

# Aider
mkdir -p "$OUT_DIR/aider"
cp "$AIDER_TMP" "$OUT_DIR/aider/CONVENTIONS.md"
Expand All @@ -480,7 +520,7 @@ main() {
esac
done

local valid_tools=("antigravity" "gemini-cli" "opencode" "cursor" "aider" "windsurf" "openclaw" "qwen" "all")
local valid_tools=("antigravity" "gemini-cli" "opencode" "cursor" "codex" "aider" "windsurf" "openclaw" "qwen" "all")
local valid=false
for t in "${valid_tools[@]}"; do [[ "$t" == "$tool" ]] && valid=true && break; done
if ! $valid; then
Expand All @@ -496,7 +536,7 @@ main() {

local tools_to_run=()
if [[ "$tool" == "all" ]]; then
tools_to_run=("antigravity" "gemini-cli" "opencode" "cursor" "aider" "windsurf" "openclaw" "qwen")
tools_to_run=("antigravity" "gemini-cli" "opencode" "cursor" "codex" "aider" "windsurf" "openclaw" "qwen")
else
tools_to_run=("$tool")
fi
Expand Down Expand Up @@ -524,8 +564,9 @@ HEREDOC
done

# Write single-file outputs after accumulation
if [[ "$tool" == "all" || "$tool" == "aider" || "$tool" == "windsurf" ]]; then
if [[ "$tool" == "all" || "$tool" == "codex" || "$tool" == "aider" || "$tool" == "windsurf" ]]; then
write_single_file_outputs
info "Wrote integrations/codex/AGENTS.md"
info "Wrote integrations/aider/CONVENTIONS.md"
info "Wrote integrations/windsurf/.windsurfrules"
fi
Expand Down
20 changes: 19 additions & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# gemini-cli -- Install extension to ~/.gemini/extensions/agency-agents/
# opencode -- Copy agents to .opencode/agent/ in current directory
# cursor -- Copy rules to .cursor/rules/ in current directory
# codex -- Copy AGENTS.md to current directory
# aider -- Copy CONVENTIONS.md to current directory
# windsurf -- Copy .windsurfrules to current directory
# openclaw -- Copy workspaces to ~/.openclaw/agency-agents/
Expand Down Expand Up @@ -85,7 +86,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
INTEGRATIONS="$REPO_ROOT/integrations"

ALL_TOOLS=(claude-code copilot antigravity gemini-cli opencode openclaw cursor aider windsurf qwen)
ALL_TOOLS=(claude-code copilot antigravity gemini-cli opencode openclaw cursor codex aider windsurf qwen)

# ---------------------------------------------------------------------------
# Usage
Expand Down Expand Up @@ -114,6 +115,7 @@ detect_antigravity() { [[ -d "${HOME}/.gemini/antigravity/skills" ]]; }
detect_gemini_cli() { command -v gemini >/dev/null 2>&1 || [[ -d "${HOME}/.gemini" ]]; }
detect_cursor() { command -v cursor >/dev/null 2>&1 || [[ -d "${HOME}/.cursor" ]]; }
detect_opencode() { command -v opencode >/dev/null 2>&1 || [[ -d "${HOME}/.config/opencode" ]]; }
detect_codex() { command -v codex >/dev/null 2>&1; }
detect_aider() { command -v aider >/dev/null 2>&1; }
detect_openclaw() { command -v openclaw >/dev/null 2>&1 || [[ -d "${HOME}/.openclaw" ]]; }
detect_windsurf() { command -v windsurf >/dev/null 2>&1 || [[ -d "${HOME}/.codeium" ]]; }
Expand All @@ -128,6 +130,7 @@ is_detected() {
opencode) detect_opencode ;;
openclaw) detect_openclaw ;;
cursor) detect_cursor ;;
codex) detect_codex ;;
aider) detect_aider ;;
windsurf) detect_windsurf ;;
qwen) detect_qwen ;;
Expand All @@ -145,6 +148,7 @@ tool_label() {
opencode) printf "%-14s %s" "OpenCode" "(opencode.ai)" ;;
openclaw) printf "%-14s %s" "OpenClaw" "(~/.openclaw)" ;;
cursor) printf "%-14s %s" "Cursor" "(.cursor/rules)" ;;
codex) printf "%-14s %s" "Codex" "(AGENTS.md)" ;;
aider) printf "%-14s %s" "Aider" "(CONVENTIONS.md)" ;;
windsurf) printf "%-14s %s" "Windsurf" "(.windsurfrules)" ;;
qwen) printf "%-14s %s" "Qwen Code" "(~/.qwen/agents)" ;;
Expand Down Expand Up @@ -395,6 +399,19 @@ install_cursor() {
warn "Cursor: project-scoped. Run from your project root to install there."
}

install_codex() {
local src="$INTEGRATIONS/codex/AGENTS.md"
local dest="${PWD}/AGENTS.md"
[[ -f "$src" ]] || { err "integrations/codex/AGENTS.md missing. Run convert.sh first."; return 1; }
if [[ -f "$dest" ]]; then
warn "Codex: AGENTS.md already exists at $dest (remove to reinstall)."
return 0
fi
cp "$src" "$dest"
ok "Codex: installed -> $dest"
warn "Codex: project-scoped. Run from your project root to install there."
}

install_aider() {
local src="$INTEGRATIONS/aider/CONVENTIONS.md"
local dest="${PWD}/CONVENTIONS.md"
Expand Down Expand Up @@ -450,6 +467,7 @@ install_tool() {
opencode) install_opencode ;;
openclaw) install_openclaw ;;
cursor) install_cursor ;;
codex) install_codex ;;
aider) install_aider ;;
windsurf) install_windsurf ;;
qwen) install_qwen ;;
Expand Down