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

Recommend the best workflow pattern based on task characteristics.

## Signature

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

## Parameters

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

### Returns

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

  Pattern recommendations based on Anthropic's best practices:

  * sequential: Clear step-by-step dependencies
  * parallel: Independent subtasks that can run concurrently
  * routing: Different input types need different handling
  * orchestrator-workers: Complex tasks needing dynamic decomposition
  * evaluator-optimizer: Tasks requiring iterative refinement
</ResponseField>

## Source

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