Documentation Index
Fetch the complete documentation index at: https://spacesail.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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.
Code
"""
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 information
2: Detailed debug information
The default debug level is 1.
"""
from agno.agent.agent import Agent
from agno.models.anthropic.claude import Claude
from agno.tools.duckduckgo import DuckDuckGoTools
# Basic debug information
agent = 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 information
agent = 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?")
Usage
Create a virtual environment
Open the Terminal and create a python virtual environment.python3 -m venv .venv
source .venv/bin/activate
Install libraries
pip install -U agno anthropic ddgs
Export your ANTHROPIC API key
export ANTHROPIC_API_KEY="your-anthropic-api-key"
Create a Python file
Create a Python file and add the above code. Find All Cookbooks
Explore all the available cookbooks in the Agno repository. Click the link below to view the code on GitHub:Agno Cookbooks on GitHub