reasoning=True to use the default Chain-of-Thought reasoning.
Code
cookbook/reasoning/agents/default_chain_of_thought.py
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
You are viewing v1 docs. For the latest documentation, visit docs.agno.com
reasoning=True to use the default Chain-of-Thought reasoning.
from agno.agent import Agent
from agno.models.openai import OpenAIChat
reasoning_agent = Agent(
model=OpenAIChat(id="gpt-4o"),
reasoning_model=OpenAIChat(
id="gpt-4o", max_tokens=1200
), # Should default to manual COT because it is not a native reasoning model
markdown=True,
)
reasoning_agent.print_response(
"Give me steps to write a python script for fibonacci series",
stream=True,
show_full_reasoning=True,
)
# It uses the default model of the Agent
reasoning_agent = Agent(
model=OpenAIChat(id="gpt-4o", max_tokens=1200),
reasoning=True,
markdown=True,
)
reasoning_agent.print_response(
"Give me steps to write a python script for fibonacci series",
stream=True,
show_full_reasoning=True,
)
Was this page helpful?