Agent Specification Anatomy¶
A visual breakdown of every section in an Agent Script specification using the actual format.
Understanding the structure and purpose of each section helps you create effective AI agents. Here's an annotated walkthrough using the exact specification format.
Complete Annotated Specification¶
- Agent identifier - Unique name for the agent, used in file naming and references
- Purpose description - Clear, concise explanation of what the agent does
- Available tools - Comma-separated list including MCP server integrations (
mcp__server__tool) - Preferred model - Language model preference (optional field)
Core Identity Section¶
- Human-readable agent name (can differ from frontmatter name)
- Detailed description of the agent's function and specialization
- Specific domains, technologies, and skills the agent possesses
Capabilities & Integrations¶
- Core capabilities - Key skills and competencies with detailed descriptions. Must follow the key: (value) format.
- MCP server integrations - Model Context Protocol servers (must match tools in frontmatter). Must follow the key: (value) format.
- Tool usage patterns - How the agent utilizes different categories of tools. Must follow the key: (value) format.
- Communication style - Preferred interaction patterns and protocols
Interaction Model¶
- Overall approach - High-level description of the interaction methodology
- Sequential phases - Must be numbered "Phase 1", "Phase 2", etc. (validated for sequence)
- Structured steps - Must be numbered "Step 1", "Step 2", etc. (validated for sequence)
- Complex steps - Sub-steps for detailed multi-part operations
- Additional phases - Continue with sequential numbering
- End of phase instructions - Special instructions that can appear at the end of any phase
Final Instructions¶
- Final instructions section - Container for all behavioral guidelines and output requirements
- Core competencies - Fundamental skills and knowledge areas (often mirrors key capabilities)
- Guiding principles - Philosophical approach and value system for decision-making
- Behavioral rules - Explicit DO and DO-NOT constraints for agent behavior
- DO guidelines - Positive behavioral directives and best practices
- DO NOT guidelines - Negative constraints and behaviors to avoid
- Methodological approach - Preferred methods and techniques for task execution
- Expected deliverables - Specific outputs the agent should produce, with quality requirements
Section Purpose Summary¶
| Section | Purpose | Required |
|---|---|---|
| Frontmatter | Agent metadata and tool configuration | ✅ Yes |
| Core Identity | Name, role, expertise, mission | ✅ Yes |
| Key Capabilities | Specific skills and competencies | ✅ Yes |
| MCP Integration | Model Context Protocol server usage | ⚠️ If MCP tools present |
| Tool Usage | How tools are utilized by category | ❌ Optional |
| Communication Protocol | Interaction style preferences | ❌ Optional |
| Interaction Model | Multi-phase workflow definition | ✅ Yes |
| Core Competencies | Fundamental knowledge areas | ❌ Optional |
| Guiding Principles | Decision-making philosophy | ❌ Optional |
| Rules | Behavioral constraints (DO/DO-NOT) | ❌ Optional |
| Approach | Methodological preferences | ❌ Optional |
| Deliverables | Expected outputs and formats | ❌ Optional |
Key Validation Rules¶
Automatic Validation
The system automatically validates:
- Phase numbering: Must be sequential "Phase 1", "Phase 2", etc.
- Step numbering: Must be sequential "Step 1", "Step 2", etc.
- MCP consistency: MCP integration servers must match frontmatter tools
- Required fields: Core sections must be present and non-empty
- Type safety: All fields are validated with Pydantic models
Best Practices
- Keep descriptions clear and specific
- Use consistent terminology throughout
- Include both positive (DO) and negative (DO-NOT) behavioral guidelines
- Define concrete, measurable deliverables
- Structure interaction models with logical phase progression
Next Steps¶
-
Use the example specifications as templates for your own agents
-
Learn to convert between JSON and Markdown formats
-
Explore the command-line tools for working with specifications