This example demonstrates how to set different debug levels for an agent. The debug level controls the amount of debug information displayed, helping you troubleshoot and understand agent behavior at different levels of detail.
"""This example shows how to set the debug level of an agent.The debug level is a number between 1 and 2.1: Basic debug information2: Detailed debug informationThe default debug level is 1."""from agno.agent.agent import Agentfrom agno.models.anthropic.claude import Claudefrom agno.tools.duckduckgo import DuckDuckGoTools# Basic debug informationagent = Agent( model=Claude(id="claude-3-5-sonnet-20240620"), tools=[DuckDuckGoTools()], debug_mode=True, debug_level=1,)agent.print_response("What is the current price of Tesla?")# Verbose debug informationagent = Agent( model=Claude(id="claude-3-5-sonnet-20240620"), tools=[DuckDuckGoTools()], debug_mode=True, debug_level=2,)agent.print_response("What is the current price of Apple?")