Agno
About
Agno is a lightweight library for building Agents (AI programs that operate autonomously). The core of an Agent is a model, tools and instructions. Agents also have memory, knowledge, storage and the ability to reason.
Developers use Agno to build Reasoning Agents, Multimodal Agents, Teams of Agents and Agentic Workflows. Agno also provides a beautiful UI to chat with your Agents, pre-built FastAPI routes to serve your Agents and tools to monitor and evaluate their performance.
No data is sent to agno.com, all agent data is stored locally in your sqlite database! The playground app is available to run locally if you prefer working offline!
Installation
pip install -U agno
How to Use AIML API with Agno
A user of the Agno can
from agno.models.aimlapi import AIMLApi
agent = Agent(
model=AIMLApi(
id="google/gemini-1.5-flash",
api_key="<YOUR_AIMLAPI_KEY>"
),
markdown=True,
telemetry=False,
monitoring=False
)
agent.print_response("Tell me, why is the sky blue in 2 sentences")
Our Supported models
All OpenAI-compatible models (gpt-4o, gpt-4o-mini, gpt-4-turbo, gpt-3.5-turbo, o3-mini, o1, etc),
Anthropic models is only partially supported and only via
api.aimlapi.com/v2
base URL,and some other models (the list is constantly being updated).
Supported features
Synchronous and asynchronous requests
Chain-of-thought reasoning
Built-in RAG and multimodal support
Collaborative agent workflows (Teams)
Access to built-in tools (DuckDuckGo, Docker, and many more)
Code Examples
Stream mode
from agno.agent import Agent, RunResponse # noqa
from agno.models.aimlapi import AIMLApi
agent = Agent(model=AIMLApi(id="gpt-4o-mini"), markdown=True)
# Get the response in a variable
# run_response: Iterator[RunResponse] = agent.run("Share a 2 sentence horror story", stream=True)
# for chunk in run_response:
# print(chunk.content)
# Print the response in the terminal
agent.print_response("Share a 2 sentence horror story", stream=True)
Image agent
from agno.agent import Agent
from agno.media import Image
from agno.models.aimlapi import AIMLApi
agent = Agent(
model=AIMLApi(id="meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo"),
markdown=True,
)
agent.print_response(
"Tell me about this image",
images=[
Image(
url="https://upload.wikimedia.org/wikipedia/commons/0/0c/GoldenGateBridge-001.jpg"
)
],
stream=True,
)
Tool use
"""Run `pip install duckduckgo-search` to install dependencies."""
from agno.agent import Agent
from agno.models.aimlapi import AIMLApi
from agno.tools.duckduckgo import DuckDuckGoTools
agent = Agent(
model=AIMLApi(id="gpt-4o-mini"), markdown=True),
tools=[DuckDuckGoTools()],
show_tool_calls=True,
markdown=True,
debug_mode=True,
)
agent.print_response("Whats happening in France?")
More
For further information about the framework, please check the official Agno documentation.
For additional examples, check out our repo.
Last updated
Was this helpful?