> ## Documentation Index
> Fetch the complete documentation index at: https://phidatainc-agui.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Reasoning

> ReasoningTools provides step-by-step reasoning capabilities for agents to think through complex problems systematically.

## Example

The following agent can use structured reasoning to solve complex problems:

```python theme={null}
from agno.agent import Agent
from agno.tools.reasoning import ReasoningTools

agent = Agent(
    instructions=[
        "You are a logical reasoning assistant that breaks down complex problems",
        "Use step-by-step thinking to analyze situations thoroughly",
        "Apply structured reasoning to reach well-founded conclusions",
        "Show your reasoning process clearly to help users understand your logic",
    ],
    tools=[ReasoningTools()],
)

agent.print_response("Analyze the pros and cons of remote work for software developers", stream=True)
```

## Toolkit Params

| Parameter           | Type            | Default | Description                                 |
| ------------------- | --------------- | ------- | ------------------------------------------- |
| `enable_think`      | `bool`          | `True`  | Enable the think reasoning function.        |
| `enable_analyze`    | `bool`          | `True`  | Enable the analyze reasoning function.      |
| `instructions`      | `Optional[str]` | `None`  | Custom instructions for reasoning behavior. |
| `add_instructions`  | `bool`          | `False` | Whether to add instructions to the agent.   |
| `add_few_shot`      | `bool`          | `False` | Whether to include few-shot examples.       |
| `few_shot_examples` | `Optional[str]` | `None`  | Custom few-shot examples for reasoning.     |

## Toolkit Functions

| Function  | Description                                                  |
| --------- | ------------------------------------------------------------ |
| `think`   | Perform step-by-step reasoning about a problem or situation. |
| `analyze` | Conduct detailed analysis with structured reasoning steps.   |

## Developer Resources

* View [Tools Source](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/reasoning.py)
* [Agno Reasoning Framework](https://docs.agno.com/reasoning)
