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

# Recommend Pattern • AI Agents Framework

> recommend_pattern: Recommend the best workflow pattern based on task characteristics.

# recommend\_pattern

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

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

Recommend the best workflow pattern based on task characteristics.
Shared implementation for AutoGenerator and WorkflowAutoGenerator.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def recommend_pattern(topic: Optional[str]) -> str
```

## Parameters

<ParamField query="topic" type="Optional[str]" required={false}>
  The task description (uses self.topic if not provided)
</ParamField>

### Returns

<ResponseField name="Returns" type="str">
  Recommended pattern name
</ResponseField>

## Source

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