Overview
Agent reasoning is a feature that allows agents to reflect on a task and create a plan before execution. This helps agents approach tasks more methodically and ensures they’re ready to perform the assigned work.Usage
To enable reasoning for an agent, simply setreasoning=True when creating the agent:
How It Works
When reasoning is enabled, before executing a task, the agent will:- Reflect on the task and create a detailed plan
- Evaluate whether it’s ready to execute the task
- Refine the plan as necessary until it’s ready or max_reasoning_attempts is reached
- Inject the reasoning plan into the task description before execution
Configuration Options
Enable or disable reasoning
Maximum number of attempts to refine the plan before proceeding with execution. If None (default), the agent will continue refining until it’s ready.
