Skip to main content

Overview

This guide walks you through creating a custom squad from scratch, from initial planning to validation and deployment.

Prerequisites

  • AIOX project initialized
  • Basic understanding of AIOX agents and tasks
  • Domain knowledge for your squad’s purpose

Step 1: Planning Your Squad

Define the Domain

Before creating a squad, answer these questions:
  1. What problem does this squad solve?
    • Example: “Automate casting workflow for film production”
  2. Who are the users?
    • Example: “Casting directors, production managers”
  3. What are the key workflows?
    • Example: “Process submissions, schedule auditions, manage callbacks”
  4. What agents are needed?
    • Example: “Casting coordinator, audition scheduler, talent evaluator”

Research Existing Squads

Don’t reinvent the wheel - extend existing squads if possible.

Step 2: Design with Squad Designer

Gather Documentation

Collect all relevant documentation:
  • Product requirements documents (PRDs)
  • Technical specifications
  • User stories
  • Process diagrams
  • Domain glossaries

Run the Designer

The designer will:
  1. Analyze your documentation
  2. Extract domain concepts and workflows
  3. Recommend agents with roles and responsibilities
  4. Suggest tasks for each agent
  5. Generate a blueprint file (.squad-design.yaml)

Review the Blueprint

Open .squad-design.yaml:

Refine Recommendations

Edit the blueprint to:
  • Add missing agents
  • Remove unnecessary agents
  • Adjust agent responsibilities
  • Add custom tasks
  • Modify task inputs/outputs

Step 3: Create the Squad

Option A: From Blueprint

This creates:

Option B: From Template

Option C: Interactive Creation

You’ll be asked:
  1. Squad name (validates kebab-case)
  2. Description (what the squad does)
  3. Author (your name and email)
  4. License (MIT, Apache, etc.)
  5. Template (basic, etl, agent-only, or none)
  6. Agent names (comma-separated)
  7. Config inheritance (extend, override, none)

Step 4: Define Agents

Agent File Structure

Each agent is a markdown file in agents/:

schedule-audition

Usage: *schedule-audition --actor-id ID --slot DATETIME Description: Schedule an audition for an actor

Knowledge Base

Submission Format

Standard submission includes:
  • Headshot (JPG/PNG, max 5MB)
  • Resume (PDF)
  • Demo reel link (optional)
  • Contact information

Audition Process

  1. Review submission
  2. Initial screening
  3. Schedule audition
  4. Conduct audition
  5. Callback decision
  6. Final selection

Task Best Practices

  1. Clear inputs/outputs - Document all parameters
  2. Error handling - List all possible error states
  3. Step-by-step - Break down the process
  4. Checklist - Validation points
  5. Dependencies - What this task needs

Step 6: Configure the Squad

Edit squad.yaml

Config Files

Customize configuration in config/: coding-standards.md:
tech-stack.md:

Step 7: Add Workflows (Optional)

Create workflows/casting-workflow.yaml:

Step 8: Validate the Squad

Common Validation Errors

Error: “Invalid squad name”
  • Solution: Use kebab-case (lowercase with hyphens)
  • Example: casting-squad not CastingSquad
Error: “Missing required fields in manifest”
  • Solution: Add missing fields to squad.yaml
  • Required: name, version, description, aiox.type, aiox.minVersion
Error: “Task file does not follow TASK-FORMAT-SPEC-V1”
  • Solution: Review task format specification
  • Ensure all required sections present
Error: “Agent file not found”
  • Solution: Check components.agents in squad.yaml
  • Verify file exists in agents/ directory

Step 9: Test the Squad

Local Testing

Integration Testing

Validation Testing

Step 10: Document the Squad

README.md

Create comprehensive documentation:

Usage

Process a submission

Schedule an audition

Agents

  • Casting Coordinator - Manages submissions and scheduling
  • Talent Evaluator - Evaluates actor fit for roles

Requirements

  • Node.js 18+
  • PostgreSQL 14+
  • SendGrid API key

License

MIT

Publish Options

Option A: GitHub (Public)
This creates a PR to SynkraAI/aiox-squads. Option B: Synkra Marketplace
Option C: Keep Private Add to .gitignore:

Best Practices

Design

  1. Start with documentation - Use Squad Designer
  2. Keep agents focused - One clear responsibility per agent
  3. Create comprehensive tasks - Cover all workflows
  4. Test early and often - Validate as you build

Development

  1. Follow task format - Adhere to TASK-FORMAT-SPEC-V1
  2. Document thoroughly - Clear README and examples
  3. Version semantically - Use semver (x.y.z)
  4. Handle errors gracefully - Clear error messages

Publishing

  1. Validate strictly - Use --strict flag
  2. Write good README - Usage examples and requirements
  3. Choose appropriate license - MIT recommended
  4. Tag appropriately - Help users find your squad

Troubleshooting

See the Squads Guide for common issues and solutions.

Next Steps

  • Custom Workflows - Create multi-step workflows
  • Advanced Tasks - Build complex task orchestrations
  • Squad Testing - Write tests for your squad
  • Community - Share your squad with others