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

# Auto Generator • AI Agents Framework

> AutoGenerator: Auto-generates agents.yaml files from a topic description.

# AutoGenerator

> Defined in the [**auto**](../modules/auto) module.

<Badge color="purple">AI Agents Framework</Badge>

Auto-generates agents.yaml files from a topic description.

Inherits from BaseAutoGenerator for shared LLM client functionality.

## Constructor

<ParamField query="topic" type="Any" required={false} default="'Movie Story writing about AI'">
  No description available.
</ParamField>

<ParamField query="agent_file" type="Any" required={false} default="'test.yaml'">
  No description available.
</ParamField>

<ParamField query="framework" type="Any" required={false} default="'crewai'">
  No description available.
</ParamField>

<ParamField query="config_list" type="Optional" required={false}>
  No description available.
</ParamField>

<ParamField query="pattern" type="str" required={false} default="'sequential'">
  No description available.
</ParamField>

<ParamField query="single_agent" type="bool" required={false} default="False">
  No description available.
</ParamField>

## Methods

<CardGroup cols={2}>
  <Card title="recommend_pattern()" icon="function" href="../functions/AutoGenerator-recommend_pattern">
    Recommend the best workflow pattern based on task characteristics.
  </Card>

  <Card title="generate()" icon="function" href="../functions/AutoGenerator-generate">
    Generates a team structure for the specified topic.
  </Card>

  <Card title="convert_and_save()" icon="function" href="../functions/AutoGenerator-convert_and_save">
    Converts the provided JSON data into the desired YAML format and saves it to a file.
  </Card>

  <Card title="merge_with_existing_agents()" icon="function" href="../functions/AutoGenerator-merge_with_existing_agents">
    Merge existing agents.yaml with new auto-generated agents.
  </Card>

  <Card title="discover_tools_for_topic()" icon="function" href="../functions/AutoGenerator-discover_tools_for_topic">
    Discover appropriate tools for the topic using intelligent matching.
  </Card>

  <Card title="get_user_content()" icon="function" href="../functions/AutoGenerator-get_user_content">
    Generates a prompt for the OpenAI API to generate a team structure.
  </Card>
</CardGroup>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
generator = AutoGenerator(framework="crewai", topic="Create a movie script")
    path = generator.generate()
```

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai/praisonai/auto.py#L614">
  `praisonai/auto.py` at line 614
</Card>
