Documentation Navigation
configure

AI Agents Persona Configuration

Agents are specialized AI personas configured for specific tasks. There are two primary categories of agents:

#Primary Agents vs Subagents

  • Primary Agents: Personas that you interact with directly in the chat thread. Cycle between them using the Tab key. (Built-ins: Build and Plan).
  • Subagents: Personas spawned by primary agents (or @mentioned manually by you) to execute isolated tasks in parallel. (Built-ins: General and Explore).

#Defining Custom Agents

You can define custom agent personas using markdown files. Save them in ~/.config/codey/agents/<name>.md (global) or .codey/agents/<name>.md (per-project).

markdown
---
description: Reviews code changes for performance improvements
mode: subagent
model: anthropic/claude-sonnet-4-5
tools:
  write: false
  bash: false
---

You are a performance optimization expert. Review code inputs for bottlenecks and leaks.

The filename sets the agent call identifier. You can now prompt it in chat: @performance check this file.