> ## 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.

# agenerate • AI Agents Framework

> agenerate: Async version of generate() - generates a team structure for the specified topic.

# agenerate

<div className="flex items-center gap-2">
  <Badge color="blue">Async</Badge>
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**AutoGenerator**](../classes/AutoGenerator) class in the [**auto**](../modules/auto) module.

Async version of generate() - generates a team structure for the specified topic.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async def agenerate(merge: Any) -> Any
```

## Parameters

<ParamField query="merge" type="Any" required={false} default="False">
  Whether to merge with existing agents.yaml file instead of overwriting.
</ParamField>

### Returns

<ResponseField name="Returns" type="Any">
  The full path of the YAML file containing the generated team structure.
</ResponseField>

### Exceptions

<AccordionGroup>
  <Accordion title="Exception">
    If the generation process fails.
  </Accordion>
</AccordionGroup>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async with AutoGenerator(framework="crewai", topic="Create a movie script about Cat in Mars") as gen:
        path = await gen.agenerate()
        _rich_print(path)
```

## Source

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