Agno is a lightweight framework for building multi-modal Agents. Its easy to use, extremely fast and supports multi-modal inputs and outputs.
With Groq & Agno, you can build:
Agents are autonomous programs that use language models to achieve tasks. They solve problems by running tools, accessing knowledge and memory to improve responses.
Let's build a simple web search agent, with a tool to search DuckDuckGo to get better results.
web_search_agent.py
and add the following code:from agno.agent import Agent
from agno.models.groq import Groq
from agno.tools.duckduckgo import DuckDuckGoTools
# Initialize the agent with an LLM via Groq and DuckDuckGoTools
agent = Agent(
model=Groq(id="llama-3.3-70b-versatile"),
description="You are an enthusiastic news reporter with a flair for storytelling!",
tools=[DuckDuckGoTools()], # Add DuckDuckGo tool to search the web
show_tool_calls=True, # Shows tool calls in the response, set to False to hide
markdown=True # Format responses in markdown
)
# Prompt the agent to fetch a breaking news story from New York
agent.print_response("Tell me about a breaking news story from New York.", stream=True)
python3 -m venv .venv
source .venv/bin/activate
pip install -U groq agno duckduckgo-search
GROQ_API_KEY="your-api-key"
python web_search_agent.py
Agents work best when they have a singular purpose, a narrow scope, and a small number of tools. When the number of tools grows beyond what the language model can handle or the tools belong to different categories, use a team of agents to spread the load.
The following code expands upon our quick start and creates a team of two agents to provide analysis on financial markets:
from agno.agent import Agent
from agno.models.groq import Groq
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.tools.yfinance import YFinanceTools
web_agent = Agent(
name="Web Agent",
role="Search the web for information",
model=Groq(id="llama-3.3-70b-versatile"),
tools=[DuckDuckGoTools()],
instructions="Always include sources",
markdown=True,
)
finance_agent = Agent(
name="Finance Agent",
role="Get financial data",
model=Groq(id="llama-3.3-70b-versatile"),
tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True)],
instructions="Use tables to display data",
markdown=True,
)
agent_team = Agent(
team=[web_agent, finance_agent],
model=Groq(id="llama-3.3-70b-versatile"), # You can use a different model for the team leader agent
instructions=["Always include sources", "Use tables to display data"],
# show_tool_calls=True, # Uncomment to see tool calls in the response
markdown=True,
)
# Give the team a task
agent_team.print_response("What's the market outlook and financial performance of AI semiconductor companies?", stream=True)
For additional documentation and support, see the following: