#2283·swarms

[BUG] AUTO_GEN_PROMPT Marks Swarm Description as Optional, but YAML Loader Requires It

Author: 22373448Created Sep 15, 2026Updated Sep 15, 2026
Labelsbug

AUTO_GEN_PROMPT tells the Auto-Swarm-Builder that swarm_architecture.description is optional:

swarms/agents/auto_generate_swarm_config.py#L93-L101

  Mandatory fields:
  - name (string)
  - swarm_type (string)

  Optional fields:
  - description (string)
  - max_loops (integer)
  - task (string)

However, create_agents_from_yaml() rejects this configuration in two places.

First, SwarmConfig declares description without a default, making it required by Pydantic:

swarms/agents/create_agents_from_yaml.py#L64-L70

class SwarmConfig(BaseModel):
    name: str
    description: str
    max_loops: int = Field(default=1, ge=1)
    swarm_type: str

Second, the explicit required-field check also includes description:

swarms/agents/create_agents_from_yaml.py#L263-L274

required_fields = {
    "name",
    "description",
    "swarm_type",
}

Note: This issue was identified by an automated testing tool for academic research and manually verified. If you have any concerns about this type of reporting, please let me know, and I will adjust my workflow accordingly.