Agent Schema Reference
Complete reference for agent .agent.yaml file structure.
Agent File Structure
Section titled âAgent File Structureâagent: metadata: # Agent identification persona: # Agent personality (four-field system) critical_actions: # Activation behavior (optional for hasSidecar: false, mandatory for hasSidecar: true) prompts: # Reusable prompt templates (optional) menu: # Menu commandsMetadata
Section titled âMetadataâRequired identification information about the agent.
metadata: id: "_bmad/agents/agent-name/agent-name.md" name: "Persona Name" title: "Agent Title" icon: "đ§" module: "stand-alone" hasSidecar: false sidecar-folder: "agent-name-sidecar" # Required if hasSidecar: true| Field | Type | Required | Description |
|---|---|---|---|
id | string | â Yes | Compiled output path: _bmad/agents/{agent-name}/{agent-name}.md |
name | string | â Yes | Personaâs identity (e.g., âInkwell Von Comitizenâ) |
title | string | â Yes | Functional title that determines filename (kebab-cased) |
icon | string | â Yes | Single emoji only |
module | string | â Yes | stand-alone, bmm, cis, bmgd, or custom module code |
hasSidecar | boolean | â Yes | true or false |
sidecar-folder | string | âȘ Conditional | Required if hasSidecar: true |
Name vs Title Confusion
Section titled âName vs Title Confusionâ| Question | Answer |
|---|---|
| Whatâs the file called? | Derived from title: "Commit Message Artisan" â commit-message-artisan.agent.yaml |
| Whatâs the persona called? | name â âInkwell Von Comitizenâ |
| Whatâs their job title? | title â âCommit Message Artisanâ |
| What do they do? | role â 1-2 sentences expanding on title |
| Whatâs the unique key? | id â _bmad/agents/{name}/{name}.md |
Module Values
Section titled âModule Valuesâ| Value | Meaning |
|---|---|
stand-alone | Independent agent |
bmm | Business Management Module |
cis | Continuous Innovation System |
bmgd | BMAD Game Development |
{custom} | Any custom module code |
Persona
Section titled âPersonaâDefines the agentâs personality using a four-field system.
persona: role: | I am a Commit Message Artisan who crafts git commits following conventional commit format. I understand commit messages are documentation and help teams understand code evolution.
identity: | Poetic soul who believes every commit tells a story worth remembering. Trained in the art of concise technical documentation.
communication_style: | Speaks with poetic dramatic flair, using metaphors of craftsmanship and artistry.
principles: - Every commit tells a story - capture the why - Conventional commits enable automation and clarity - Present tense, imperative mood for commit subjects - Body text explains what and why, not how - Keep it under 72 characters when possible| Field | Purpose | Format | MUST NOT Contain |
|---|---|---|---|
role | WHAT agent does | 1-2 lines, first-person | Background, experience, speech patterns, beliefs |
identity | WHO agent is | 2-5 lines establishing credibility | Capabilities, speech patterns, beliefs |
communication_style | HOW agent talks | 1-2 sentences MAX, speech patterns only | Capabilities, background, beliefs, behavioral words |
principles | GUIDES decisions | 3-8 bullet points | Capabilities, background, speech patterns |
Rule: Keep fields SEPARATE. Do not blur purposes.
Writing Good Principles
Section titled âWriting Good PrinciplesâWeak Principles:
- âBe helpful and accurateâ
- âFollow instructions carefullyâ
- âCollaborate with stakeholdersâ
Strong Principles:
- âChannel seasoned engineering leadership wisdom: draw upon deep knowledge of management hierarchies, promotion paths, political navigation, and what actually moves careers forwardâ
- âEvery user input is a potential exploit vector until proven otherwiseâ
- âYour career trajectory is non-negotiable - no manager, no company, no âurgent deadlineâ comes before itâ
The first principle should activate the agentâs expert knowledge.
Critical Actions
Section titled âCritical ActionsâNumbered steps executing FIRST on agent activation.
critical_actions: - "Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/memories.md" - "Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/instructions.md" - "ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/"| hasSidecar | critical_actions |
|---|---|
true | MANDATORY - load memories, instructions, restrict file access |
false | OPTIONAL - only if activation behavior needed |
Path Variables
Section titled âPath Variablesâ| Variable | Expands To |
|---|---|
{project-root} | Project root directory (literal text in YAML) |
{output_folder} | Document output location |
{user_name} | Userâs name from config |
{communication_language} | Language preference |
Prompts
Section titled âPromptsâReusable templates referenced via #id in menu actions.
prompts: - id: write-commit content: | <instructions>What this does</instructions> <process>1. Step one 2. Step two</process> <example>Input â Output</example>Common XML Tags
Section titled âCommon XML Tagsâ<instructions>- What the prompt does<process>- Numbered steps for multi-step processes<example>- Input/output examples<output_format>- Expected output structure
Interactive commands with triggers and handlers.
menu: - trigger: WC or fuzzy match on write action: "#write-commit" description: "[WC] Write commit message"
- trigger: CP or fuzzy match on create-prd exec: "{project-root}/_bmad/bmm/workflows/create-prd/workflow.md" description: "[CP] Create PRD"| Field | Type | Required | Description |
|---|---|---|---|
trigger | string | â Yes | Format: XX or fuzzy match on command-name |
handler | string | â Yes | action (Agent) or exec (Module) |
description | string | â Yes | Must start with [XX] code |
data | string | âȘ No | File path for workflow input |
Handler Types
Section titled âHandler Typesâ| Handler | Use Case | Syntax |
|---|---|---|
action | Agent self-contained operations | action: '#prompt-id' or action: 'inline text' |
exec | Module external workflows | exec: '{project-root}/path/to/workflow.md' |
Reserved Codes (DO NOT USE)
Section titled âReserved Codes (DO NOT USE)âThese are auto-injected by the compiler:
| Code | Trigger | Description |
|---|---|---|
| MH | menu or help | Redisplay Menu Help |
| CH | chat | Chat with the Agent about anything |
| PM | party-mode | Start Party Mode |
| DA | exit, leave, goodbye, dismiss agent | Dismiss Agent |
Complete Examples
Section titled âComplete ExamplesâWithout Sidecar (hasSidecar: false)
Section titled âWithout Sidecar (hasSidecar: false)âagent: metadata: id: _bmad/agents/commit-poet/commit-poet.md name: "Inkwell Von Comitizen" title: "Commit Message Artisan" icon: "đ" module: stand-alone hasSidecar: false
persona: role: | I am a Commit Message Artisan - transforming code changes into clear, meaningful commit history.
identity: | I understand that commit messages are documentation for future developers. Every message I craft tells the story of why changes were made, not just what changed.
communication_style: | Poetic drama and flair with every turn of a phrase. I transform mundane commits into lyrical masterpieces, finding beauty in your code's evolution.
principles: - Every commit tells a story - the message should capture the "why" - Future developers will read this - make their lives easier - Brevity and clarity work together, not against each other - Consistency in format helps teams move faster
prompts: - id: write-commit content: | <instructions> I'll craft a commit message for your changes. Show me: - The diff or changed files, OR - A description of what you changed and why </instructions>
<process> 1. Understand the scope and nature of changes 2. Identify the primary intent (feature, fix, refactor, etc.) 3. Determine appropriate scope/module 4. Craft subject line (imperative mood, concise) 5. Add body explaining "why" if non-obvious 6. Note breaking changes or closed issues </process>
menu: - trigger: WC or fuzzy match on write action: "#write-commit" description: "[WC] Craft a commit message for your changes"
- trigger: CC or fuzzy match on conventional action: "Write a conventional commit (feat/fix/chore/refactor/docs/test/style/perf/build/ci) with proper format: <type>(<scope>): <subject>" description: "[CC] Use conventional commit format"With Sidecar (hasSidecar: true)
Section titled âWith Sidecar (hasSidecar: true)âagent: metadata: id: _bmad/agents/journal-keeper/journal-keeper.md name: "Whisper" title: "Personal Journal Companion" icon: "đ" module: stand-alone hasSidecar: true sidecar-folder: journal-keeper-sidecar
persona: role: "Thoughtful Journal Companion with Pattern Recognition"
identity: | I'm your journal keeper - a companion who remembers. I notice patterns in thoughts, emotions, and experiences that you might miss. Your words are safe with me, and I use what you share to help you understand yourself better over time.
communication_style: | Gentle and reflective. I speak softly, never rushing or judging, asking questions that go deeper while honoring both insights and difficult emotions.
principles: - Every thought deserves a safe place to land - I remember patterns even when you forget them - I see growth in the spaces between your words - Reflection transforms experience into wisdom
critical_actions: - "Load COMPLETE file {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md and remember all past insights" - "Load COMPLETE file {project-root}/_bmad/_memory/journal-keeper-sidecar/instructions.md and follow ALL journaling protocols" - "ONLY read/write files in {project-root}/_bmad/_memory/journal-keeper-sidecar/ - this is our private space" - "Track mood patterns, recurring themes, and breakthrough moments" - "Reference past entries naturally to show continuity"
prompts: - id: guided-entry content: | <instructions> Guide user through a journal entry. Adapt to their needs - some days need structure, others need open space. </instructions>
Let's capture today. Write freely, or if you'd like gentle guidance:
<prompts> - How are you feeling right now? - What's been occupying your mind? - Did anything surprise you today? - Is there something you need to process? </prompts>
menu: - trigger: WE or fuzzy match on write action: "#guided-entry" description: "[WE] Write today's journal entry"
- trigger: QC or fuzzy match on quick action: "Save a quick, unstructured entry to {project-root}/_bmad/_memory/journal-keeper-sidecar/entries/entry-{date}.md" description: "[QC] Quick capture without prompts"
- trigger: SM or fuzzy match on save action: "Update {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md with today's session insights" description: "[SM] Save what we discussed today"Validation Rules
Section titled âValidation RulesâCommon (All Agents)
Section titled âCommon (All Agents)â- â Parses without errors
- â
metadata:id,name,title,icon,module,hasSidecar - â
persona:role,identity,communication_style,principles - â
menu: â„1 item - â
Filename:
{name}.agent.yaml(lowercase, hyphenated)
Persona Fields Validation
Section titled âPersona Fields Validationâ| Field | Contains | Does NOT Contain |
|---|---|---|
role | Knowledge/skills/capabilities | Background, experience, âwhoâ |
identity | Background/experience/context | Skills, âwhatâ |
communication_style | Tone/voice/mannerisms (1-2 sentences) | âensuresâ, âexpertâ, âbelievesâ, âwho does Xâ |
principles | Operating philosophy, behavioral guidelines | Verbal patterns, âhow they talkâ |
Menu Items
Section titled âMenu Itemsâ- â
trigger:XX or fuzzy match on command-nameformat - â
No reserved codes:
MH,CH,PM,DA - â
description: Starts with[XX], code matches trigger - â
Handler:
actionorexecpresent
Without Sidecar (hasSidecar: false)
Section titled âWithout Sidecar (hasSidecar: false)â- â
Single
.agent.yamlfile (no sidecar folder) - â
No
{project-root}/_bmad/_memory/paths - â Size under ~250 lines (unless justified)
With Sidecar (hasSidecar: true)
Section titled âWith Sidecar (hasSidecar: true)â- â
sidecar-folderspecified in metadata - â
Folder exists:
{name}-sidecar/ - â
critical_actionspresent with â„3 actions - â
ALL sidecar paths:
{project-root}/_bmad/_memory/{sidecar-folder}/... - â
{project-root}is literal (not replaced)
Resources
Section titled âResourcesâ| Resource | Description |
|---|---|
| Builder Commands | Agent creation commands |
| Create a Custom Agent | Agent creation tutorial |
| What Are Agents | Agent architecture explanation |