Reasoning options in agent

what are the difference between reasoning_model and reasoning_agent in agent.py?

    # Enable reasoning by working through the problem step by step.
    reasoning: bool = False
    reasoning_model: Optional[Model] = None
    reasoning_agent: Optional[Agent] = None

Hi, Thank you for your question

These two fields — reasoning_model and reasoning_agent — are both used when you enable reasoning=True in an Agent, but they serve different purposes:

reasoning_model

  • This is the LLM (like GPT-4, Claude, etc.) that the agent uses when reasoning step-by-step
  • You’d use this if you want your main agent to pause, switch to a more powerful or cheaper model, and think through a task before continuing

reasoning_agent

  • This is a separate agent (not just a model) that handles all the reasoning
  • It can have its own tools, memory, logic, etc.
  • Think of it as outsourcing thinking to a specialist agent before continuing

Is there an option to specifiy which tools the reasoning agent should be used with?

For example, let’s say a agent 1 has tools 1, 2 and 3. But I want agent 2 to be used for reasoning only when agent 1 uses tool 1, otherwise, no reasoning.

Thank you,