---
title: Reasoning
description: "Agent reasoning has been renamed to planning_config. See the Planning page for the current API."
icon: brain
mode: "wide"
---

## Overview

<Warning>
The `reasoning=True` and `max_reasoning_attempts=N` arguments on `Agent` are **deprecated**. They still work for now — passing them emits a `DeprecationWarning` and CrewAI auto-migrates the values into a `PlanningConfig` — but they will be removed in a future release.

The replacement is **`planning_config`**, documented in full on the [Planning](/en/concepts/planning) page.
</Warning>

## Migration

The new API lives on `Agent.planning_config` and uses the `PlanningConfig` model. The presence of a `PlanningConfig` enables planning — there is no separate boolean flag.

<CodeGroup>
```python Before (deprecated)
from crewai import Agent

agent = Agent(
    role="Data Analyst",
    goal="Analyze data and provide insights",
    backstory="Expert data analyst.",
    reasoning=True,
    max_reasoning_attempts=3,
)
```

```python After
from crewai import Agent, PlanningConfig

agent = Agent(
    role="Data Analyst",
    goal="Analyze data and provide insights",
    backstory="Expert data analyst.",
    planning_config=PlanningConfig(max_attempts=3),
)
```
</CodeGroup>

Field mapping:

- `reasoning=True` → presence of `planning_config` enables planning.
- `max_reasoning_attempts=N` → `PlanningConfig(max_attempts=N)`.

## What's New

`PlanningConfig` exposes capabilities that the old `reasoning` flag did not, including:

- `reasoning_effort` (`"low"` / `"medium"` / `"high"`) to control post-step observation, replanning, and refinement.
- `max_steps`, `max_replans`, `max_step_iterations`, and `step_timeout` to bound plan size and execution.
- A dedicated planning `llm` separate from the agent's execution LLM.
- Custom `system_prompt`, `plan_prompt`, and `refine_prompt` overrides.

For the full field reference, the Plan-and-Act loop, and guidance on when to use agent-level planning vs. crew-level planning, see [Planning](/en/concepts/planning).
