> ## 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() - Generate a workflow YAML file.

# 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 [**WorkflowAutoGenerator**](../classes/WorkflowAutoGenerator) class in the [**auto**](../modules/auto) module.

Async version of generate() - Generate a workflow YAML file.

## Signature

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

## Parameters

<ParamField query="pattern" type="str" required={false} default="'sequential'">
  Workflow pattern - "sequential", "routing", "parallel", "loop", "orchestrator-workers", "evaluator-optimizer"
</ParamField>

<ParamField query="merge" type="bool" required={false} default="False">
  If True, merge with existing workflow file instead of overwriting
</ParamField>

### Returns

<ResponseField name="Returns" type="str">
  Path to the generated workflow file
</ResponseField>

## Source

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