> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mrassistant.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Squad

> Create a new squad with intelligent routing.

Supports:
- Multiple agents with specialized roles
- Intelligent transfer rules (context-aware, sentiment-based)
- Warm transfers with conversation context
- Load balancing and skill-based routing



## OpenAPI

````yaml https://api.mrassistant.ai/openapi.json post /squads
openapi: 3.1.0
info:
  title: Backend - Multilingual Voice Agent System
  description: FastAPI backend for multilingual voice agents with tool use
  version: 1.0.0
servers: []
security: []
paths:
  /squads:
    post:
      tags:
        - squads
        - squads
      summary: Create Squad
      description: |-
        Create a new squad with intelligent routing.

        Supports:
        - Multiple agents with specialized roles
        - Intelligent transfer rules (context-aware, sentiment-based)
        - Warm transfers with conversation context
        - Load balancing and skill-based routing
      operationId: create_squad_squads_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SquadCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Squad'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SquadCreate:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        members:
          items:
            $ref: '#/components/schemas/SquadMember'
          type: array
          minItems: 1
          title: Members
          description: Squad members with configurations
        transfer_rules:
          anyOf:
            - items:
                $ref: '#/components/schemas/TransferRule'
              type: array
            - type: 'null'
          title: Transfer Rules
          description: Intelligent transfer rules
        routing_strategy:
          type: string
          pattern: >-
            ^(round_robin|load_balanced|skill_based|sentiment_based|context_aware)$
          title: Routing Strategy
          default: round_robin
        default_member:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Member
          description: Default member role for initial routing
        agents:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Agents
          description: 'Legacy: Simple agent ID list'
      type: object
      required:
        - name
        - members
      title: SquadCreate
      description: Squad creation model with intelligent routing support.
    Squad:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        agents:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Agents
        transfer_rules:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Transfer Rules
        routing_strategy:
          type: string
          title: Routing Strategy
        status:
          type: string
          title: Status
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - tenant_id
        - name
        - agents
        - routing_strategy
        - status
        - created_at
        - updated_at
      title: Squad
      description: Squad response model.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SquadMember:
      properties:
        agent_id:
          type: string
          format: uuid
          title: Agent Id
          description: Agent ID
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Member display name
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
          description: Member role (e.g., 'Orders', 'Returns', 'VIP')
        specialization:
          anyOf:
            - type: string
            - type: 'null'
          title: Specialization
          description: What this member specializes in
        skills:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Skills
          description: Skills/capabilities
        priority:
          type: integer
          maximum: 10
          minimum: 1
          title: Priority
          description: Priority level (1=highest)
          default: 1
        max_concurrent:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Concurrent
          description: Max concurrent calls
        working_hours:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Working Hours
          description: Working hours schedule
      type: object
      required:
        - agent_id
      title: SquadMember
      description: Squad member configuration with role and skills.
    TransferRule:
      properties:
        from_member:
          anyOf:
            - type: string
            - type: 'null'
          title: From Member
          description: Source member role
        to_member:
          type: string
          title: To Member
          description: Target member role
        conditions:
          items:
            type: string
          type: array
          minItems: 1
          title: Conditions
          description: Conditions that trigger transfer
        priority:
          type: integer
          maximum: 10
          minimum: 1
          title: Priority
          description: Rule priority
          default: 1
        transfer_type:
          type: string
          pattern: ^(warm|cold|attended)$
          title: Transfer Type
          default: warm
        context_fields:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Context Fields
          description: Context fields to preserve
      type: object
      required:
        - to_member
        - conditions
      title: TransferRule
      description: Transfer rule configuration for intelligent routing.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````