Skip to content

Agents

Agents are task-driven, not capability-driven. Unlike a general-purpose assistant, each agent activates at a specific point in the workflow — after code changes, before a commit, or when a slash command triggers it. They operate with their own instructions, optional model override, and constrained tool access.

interface Agent {
name: string;
description: string;
model?: string;
readonly?: boolean;
instructions: string;
tools?: string[];
}

Agents are defined in .ai/agents/*.md. Each file is a Markdown document with a YAML frontmatter block. The filename becomes the agent’s name. The Markdown body becomes the agent’s instruction set.

.ai/agents/
docs-reviewer.md
plan-checker.md
cleanup-analyzer.md
FieldTypeDefaultDescription
modelstringTool defaultModel to use for this agent (e.g. claude-sonnet-4-20250514)
readonlybooleanfalseIf true, the agent can only read files — no writes or edits
toolsstring[]All toolsAllowlist of tool names the agent may use
---
model: claude-sonnet-4-20250514
readonly: true
tools:
- Read
- Glob
- Grep
---
# Docs Reviewer
Review documentation for accuracy against the current codebase.
## Process
1. Read the changed files
2. Find related documentation
3. Verify accuracy
4. Report discrepancies

Well-structured agents follow a consistent layout. This is Pattern 2 from the Configuration Patterns guide — task-specialized sub-agents with a standard internal structure.

# Agent Name
## Purpose
One sentence describing what this agent does.
## When to Use
Specific triggers — what condition or event should cause the primary agent to delegate to this one.
## Process
Numbered steps the agent follows.
## Guidelines
### DO:
- Specific positive behaviors
### DO NOT:
- Specific anti-patterns
## Output Format
Exact structure the agent should return.

This structure serves both human readers and the agents that will be reading it. The When to Use section is especially important — it tells the primary agent when to delegate, which is what makes agents task-driven rather than capability-driven.

AspectClaude CodeCursorCodexOpenCodeCopilotAntigravity
Location.claude/agents/*.md.cursor/agents/*.md.codex/config.toml.opencode/agents/*.md.github/agents/*.agent.mdNot supported
FormatMD + frontmatterMD + frontmatterTOML configMD + YAML frontmatterMD + YAML frontmatterN/A
Model overridemodel frontmattermodel frontmattermodel TOML keymodel frontmatterNot supported (warning)N/A
Read-onlyreadonly frontmatterreadonly frontmatterNot supportedtools.write/bash: falsetools: [read, search]N/A
Tool restrictionstools arraytools arrayLimitedLimited (write/bash toggles)tools array (mapped aliases)N/A

Notes:

  • Copilot maps tool names to its own alias scheme. Read becomes read, Write and Edit both become edit, and so on. dotai performs this translation automatically.
  • Antigravity agents are session-based, not file-based. There is no persistent agent definition — each conversation session is its own ephemeral agent context. dotai cannot emit agents for Antigravity.
  • Antigravity: Agent definitions are silently skipped. There is no file-based agent system to target.
  • Codex: No readonly equivalent. Read-only agents are emitted without the restriction; the agent will have write access.
  • Copilot: No model override support. If a model field is set, dotai emits a warning and drops the field from the Copilot output.