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

# Analyze Complexity • AI Agents Framework

> analyze_complexity: Analyze task complexity based on keywords.

# analyze\_complexity

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

Analyze task complexity based on keywords.

## Signature

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

## Parameters

<ParamField query="topic" type="str" required={true}>
  The task description
</ParamField>

### Returns

<ResponseField name="Returns" type="str">
  Complexity level - 'simple', 'moderate', or 'complex'
</ResponseField>

## Used By

* [`AutoGenerator.get_user_content`](../functions/AutoGenerator-get_user_content)
* [`recommend_agent_count`](../functions/recommend_agent_count)

## Source

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