Technical Writer

In this modern AI era, working with single agents is no longer effective. Applications are becoming increasingly complex day by day, and often, there is a need for a multi-agent framework that can handle multiple tasks simultaneously without requiring human intervention. This multi-agent development framework is proving to increase efficiency and is becoming essential for our day-to-day life.
These systems consist of multiple AI agents that collaborate, communicate, and coordinate to complete tasks that would be too slow, unreliable, or inefficient for a single model to handle alone. Often taking extra time and slowing down the process, but with this multi-agent system, one can definitely focus on a lot of stuff and can even multitask.
Multi-agent architectures often work by dividing large problems into manageable subtasks, helping them handle fast-changing environments much more easily.
One agent identifies the latest topics, another researches the topic, a third summarizes the findings, a fourth writes an SEO-optimized draft, and a fifth performs quality checks before publishing. Each agent has its own responsibility; together, they produce polished content far faster and more accurately than a single system, and ultimately, you can simply review the content. This is the power of coordinated, well-designed multi-agent systems.
With this growing demand comes a need for faster, more reliable agent coordination. Developers expect agents to share context intelligently, avoid redundant work, recover from failures, and operate in real time, especially in production settings. Poor coordination often leads to inconsistent outputs, increased latency, and brittle automation workflows. As AI-driven products expand, a strong agentic foundation is becoming a necessity, not an optional optimization.
Agno is a super-fast platform for building and running AI agents. In today’s time, most people think adding AI means calling a chatbot API. However, real AI products require significantly more, often involving multiple agents working together, remembering information, utilizing tools, retrieving data, interacting with APIs, and operating reliably in production. And all of these are made simple with Agno. It is beginner-friendly and a lightweight framework that also comes with great documentation, so if you get stuck somewhere, you can quickly find clear explanations, examples, and guides to help you move forward without frustration. Agno is designed to make the entire experience, from learning to building to deploying, simple enough for beginners yet powerful enough to build advanced AI systems.
Agno gives developers everything they need to create smart agents and multi-agent workflows, including:
Agno provides developers with a comprehensive stack for creating agents that can reason, utilize tools, store knowledge, maintain memory, and perform multi-step tasks with reliability. At its core, Agno lets a language model control the flow of execution, deciding when to think, when to act, and when to respond; while instructions guide its behavior and tools connect it to external systems.
Agno extends agents with powerful capabilities, including memory for recalling past interactions, storage for maintaining conversation state, knowledge via vector-based retrieval (Agentic RAG), and reasoning to analyze intermediate results before responding.
Beyond single agents, Agno also provides higher-level abstractions for building complex systems: Teams, where multiple specialized agents collaborate, and Workflows, which orchestrate agents and functions through structured, repeatable steps. Whether you’re building your first agent or designing full multi-agent automation pipelines, Agno gives you the tools to build, run, and debug them efficiently.
An agent is an autonomous software entity that takes in information from its environment, makes decisions, and takes actions to complete a specific goal. You can think of an agent like a single employee in a company: it understands its task, works independently, and takes actions without constant supervision. In practical AI workflows, an agent could be a chatbot answering questions, a data-cleaning script fixing messy rows, or a writer agent drafting text from bullet points. Each agent excels at one well-defined responsibility, which keeps its behavior simple, predictable, and easy to upgrade.
A multi-agent system (MAS) expands this idea by bringing together multiple agents that collaborate, coordinate, or communicate to solve complex tasks more efficiently than a single agent could. Imagine it like a team, where each team member has a designated task and works in collaboration with the other to complete a specific task.
For example, in a content creation workflow, one agent may research, another summarizes, a third writes, and a fourth edits, creating a smooth, scalable pipeline. Multi-agent systems shine when tasks naturally break into subtasks, require collaboration, or must run reliably at scale.

To build effective agents, it’s best to start small. Begin with just a model, a few essential tools, and clear instructions. Once you have a simple agent working reliably, you can gradually layer in memory, knowledge retrieval, workflows, and multi-agent coordination. The goal is to validate the core behavior first before scaling complexity.
Start by giving your agent well-defined, high-signal tasks such as report generation, data extraction, summarization, classification, knowledge search, or document processing. These early building blocks help you understand how your agent behaves in the real world and what your users actually need. From there, you can confidently evolve the system into something more advanced.
# Import the core components from Agno
from agno.agent import Agent
from agno.models.anthropic import Claude
# 1. Create the Agent
agent = Agent(
model=Claude(id="claude-sonnet-4-5"), # Language model controlling execution
instructions="You are a helpful assistant. Respond clearly and concisely."
)
# 2. Run the Agent and print response
agent.print_response("Explain what an AI agent is in simple words.")
Development vs. Production Agent Execution
For developing your agent, use the Agent.print_response() method. This conveniently prints the agent’s response to your terminal in an easily readable format.
Note: This method is only for development. For production environments, utilize the Agent.run() or Agent.arun() methods instead.
Running an agent in Agno is straightforward: you call Agent.run() (or Agent.arun() for async execution), and the framework handles everything behind the scenes. Each run begins with Agno assembling the full context, including system messages, user input, chat history, memory, and session state, before sending it to the model.
The model may reply with an answer or a tool call, and if a tool is called, Agno executes it and loops back until the model produces a final response. The result is returned as a RunOutput object containing the content, metadata, messages, reasoning traces, and metrics.
You can pass inputs of any type (strings, lists, dicts, Pydantic models), and Agno supports both synchronous and streaming execution. Setting stream=True lets you receive chunks of responses as they’re generated, while stream_events=True exposes the internal reasoning steps, tool calls, and memory updates for full observability.
This makes it easy to debug, monitor, or build interactive UIs around your agents. Whether you’re generating a simple report or orchestrating complex tool-based operations, Agno’s run loop gives you a predictable, flexible execution model.
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.duckduckgo import DuckDuckGoTools
# You can set the debug mode on the agent for all runs to have more verbose output
agent = Agent(
model=OpenAIChat(id="gpt-5-mini"),
tools=[DuckDuckGoTools()],
instructions="Search the web and give a short, factual answer.",
markdown=True,
debug_mode=True,
)
agent.print_response("Latest breakthroughs in quantum computing?")
In this example, we give our agent access to the DuckDuckGoTools toolkit, allowing it to search the web and retrieve real-time information.
You can always create an agent with debug mode, with instructions, or with tools as per the requirement. Feel free to check out Agno documentation for more details, which we have also linked below in our resources section.
A few core features also include creating Agno with:
Here is an example of a Health & Fitness Agent with persistent storage,
With Agno, you can build capable agents that blend:
In this example, we create a Health & Fitness Agent that helps users understand nutrition, exercise planning, and healthy habits. With persistent storage, the agent can recall your previous fitness goals, track your questions, and provide more personalized guidance over time. Example prompts to try:
from textwrap import dedent
from typing import Optional, List
import typer
from rich import print
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.db.base import SessionType
from agno.session import AgentSession
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.embedder.openai import OpenAIEmbedder
from agno.vectordb.lancedb import LanceDb, SearchType
from agno.models.openai import OpenAIChat
from agno.tools.duckduckgo import DuckDuckGoTools
# --------- Setup Health & Fitness Knowledge Base ---------
fitness_knowledge = Knowledge(
vector_db=LanceDb(
uri="tmp/fitness_lancedb",
table_name="fitness_knowledge",
search_type=SearchType.hybrid,
embedder=OpenAIEmbedder(id="text-embedding-3-small")
)
)
# Add a well-structured PDF containing fitness fundamentals
fitness_knowledge.add_content(
url="https://health/FitnessBasics.pdf"
)
# --------- Setup Database for persistent sessions ---------
db = SqliteDb(db_file="tmp/fitness_agent.db")
def fitness_agent(user: str = "user"):
session_id: Optional[str] = None
# Ask the user whether they want a new or existing session
start_new = typer.confirm("Start a new fitness session?")
if not start_new:
previous_sessions: List[AgentSession] = db.get_sessions(
user_id=user,
session_type=SessionType.AGENT
)
if len(previous_sessions) > 0:
session_id = previous_sessions[0].session_id
# --------- Create Fitness Agent ---------
agent = Agent(
user_id=user,
session_id=session_id,
model=OpenAIChat(id="gpt-5-mini"),
instructions=dedent("""\
You are a friendly Health & Fitness Assistant dedicated to helping users
understand nutrition, exercise, and healthy living.
How you respond:
1. Always check the fitness knowledge base first.
2. If information is missing or needs updates, perform a web search.
3. Provide clear, actionable guidance with structured steps.
4. Avoid overly technical terms—use simple explanations.
5. Keep your tone motivating, encouraging, and non-judgmental.
You can:
- Explain workouts (strength, cardio, flexibility, mobility)
- Provide short actionable routines
- Clarify nutrition basics (macros, calories, protein needs)
- Offer general wellness advice (sleep habits, hydration)
- Summarize/chat history when asked
- Retrieve past discussions using stored session memory
Safety rules:
- Do NOT give medical diagnoses.
- Avoid personalized medical or therapeutic advice.
- Offer general wellness guidance only.
"""),
db=db,
knowledge=fitness_knowledge,
tools=[DuckDuckGoTools()],
read_chat_history=True,
markdown=True,
)
# --------- Run Agent in CLI ---------
print("[bold cyan]Your Health & Fitness Assistant is ready![/bold cyan]")
if session_id is None:
print("Started a new session.\n")
else:
print(f"Continuing previous session: {session_id}\n")
agent.cli_app(markdown=True)
if __name__ == "__main__":
typer.run(fitness_agent)
Agno Teams lets you build autonomous multi-agent systems where multiple Agents, or even nested sub-teams, work together to complete complex tasks. A Team functions like a tree: the team leader delegates work to sub-teams or individual agents.
Below is a simple example of a language-routing team with two agents and one sub-team.

A team’s leader delegates tasks based on each member’s role and the task requirements. Teams inherit the same key features as agents, including model configuration, instructions, database-backed session history, reasoning, knowledge access, memory, and tool use.
Use Teams when tasks are complex, require multiple tools, or involve many steps. They are especially helpful when a single agent’s context window would be overloaded. Breaking workloads into focused, single-purpose agents keeps each agent’s context small and efficient.
from agno.team import Team
from agno.agent import Agent
team = Team(
members=[
Agent(
name="Research Agent",
role="You gather factual information and provide structured research summaries."
),
Agent(
name="Editing Agent",
role="You refine writing, fix grammar, and improve clarity and tone."
),
Team(
name="Creative Team",
role="You coordinate creative tasks such as brainstorming and drafting content.",
members=[
Agent(
name="Idea Agent",
role="You generate ideas, outlines, and creative directions."
),
Agent(
name="Drafting Agent",
role="You write initial drafts based on ideas and research."
),
]
),
]
)
Agno Workflows let you build predictable, step-by-step automations for multi-agent systems.
Instead of letting agents interact freely, workflows organize agents, teams, and functions in a fixed sequence. Each step handles one part of the task, passes its output to the next, and together they create a reliable, repeatable pipeline like an assembly line for complex work.

from agno.agent import Agent
from agno.workflow import Workflow
# Define agents with specific roles
designer = Agent(
name="System Designer",
instructions="Plan the structure of a simple Python program and describe its components clearly."
)
coder = Agent(
name="Coder",
instructions="Write clean, well-documented Python code based on the system design."
)
tester = Agent(
name="Tester",
instructions="Review the code, identify bugs or edge cases, and suggest improvements."
)
# Build the workflow
dev_workflow = Workflow(
name="Software Development Workflow",
steps=[designer, coder, tester]
)
# Run the workflow
dev_workflow.print_response(
"Create a small Python script that fetches weather data from an API and prints it neatly.",
stream=True
)
Here’s an example of how you can use Agno Workflows to automate a multi-step coding task. In this workflow, each agent focuses on a specific part of the software development process, designing the solution, writing the code, and testing it. The workflow coordinates these steps in order, ensuring a clean, reliable output.
Agno Workflows let you orchestrate agents and teams through a controlled series of steps. The Workflow class manages the full execution flow, while each Step represents a single unit of work powered by an agent, team, or function. You can enhance workflows using constructs like Loop for repetition, Parallel for concurrent execution, Condition for conditional logic, and Router for branching paths, thus making it easy to design flexible, maintainable, and production-ready automation pipelines.
Context engineering is the practice of designing, structuring, and controlling the information sent to language models so they behave exactly as you want. At its core, it answers a simple question:
“What information will most effectively produce the output I need?” In Agno, this primarily involves crafting the system message, the foundational context that defines an agent or team’s role, personality, constraints, and capabilities. By engineering this context thoughtfully, you can:
Context engineering is an iterative process: refining instructions, experimenting with agent descriptions, adjusting schemas, and leveraging delegation or tools until the behavior matches your goals.
Agno agents build their full context from several components:
Together, these pieces provide the model with everything it needs to produce accurate and aligned results.
Many model providers offer prompt caching, which lets you store and reuse static parts of your system or user messages. This reduces cost and speeds up responses, especially when the same instructions or role descriptions are used repeatedly.
Agno allows you to structure context so that likely reusable/static content appears at the top of the system message, making it easier for providers to cache it. If you want more control, you can manually define the system message to optimize caching further.
Examples of prompt caching use cases include:
At its core, the agent’s context is constructed from:
run() or print_response(), optionally enriched with knowledge-base refs or dependency injections.Agno allows you to customize each layer through simple parameters, making your agents predictable, controllable, and highly task-aligned.
Agno automatically assembles a system message based on parameters you provide (e.g., role, instructions, additional_context, metadata such as time or location, and memory/state).
from agno.agent import Agent
planner = Agent(
name="Trip Planner",
role="Planning Assistant",
description="You help users plan efficient and budget-friendly travel itineraries.",
instructions=[
"Always ask 2 clarifying questions before suggesting an itinerary.",
"Keep responses concise unless the user asks for detail."
],
expected_output="Provide output in a sectioned format with headers.",
additional_context="""
Example format:
- Destination
- Budget
- Suggested Itinerary
""",
add_datetime_to_context=True,
add_location_to_context=True,
add_name_to_context=True,
)
planner.print_response("Plan me a 3-day trip to Singapore.")
Context engineering in Agno gives you full control over:
By combining system messages, memories, tool instructions, few-shot examples, and user-enriched messages, you can create agents that are reliable, contextual, and domain-specialized.
Agno’s Knowledge system is built on Retrieval-Augmented Generation (RAG), but instead of overloading prompts, you store information in a searchable knowledge base. Agents automatically retrieve only what they need, making responses more accurate, scalable, and efficient.
Agno also allows for converting text into numerical representations where similar meanings sit close together. Example: “refund policy” ≈ “return guidelines,” even without shared keywords.
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
from agno.knowledge.reader.pdf_reader import PDFReader
from agno.knowledge.chunking.semantic import SemanticChunking
from agno.agent import Agent
# 1. Vector DB + embeddings
vector_db = PgVector(
table_name="company_knowledge",
db_url="postgresql://user:pass@localhost:5432/db"
)
# 2. Create a knowledge base
knowledge = Knowledge(
name="Company Docs",
vector_db=vector_db,
max_results=5,
)
# 3. Add content with semantic chunking
knowledge.add_content(
path="employee_handbook.pdf",
reader=PDFReader(
chunking_strategy=SemanticChunking(chunk_size=1000)
),
metadata={"type": "policy", "department": "hr"}
)
# 4. Agent with automatic knowledge search
agent = Agent(
knowledge=knowledge,
search_knowledge=True # agent decides when to search
)
print(agent.run("How many vacation days do I get?"))
Guardrails are basically built-in safety checks that run before your agent processes any user input. Think of them as security checkpoints that filter or block unsafe, harmful, or unwanted content before it reaches the LLM.
They work by:
They help you avoid common risks when using LLM-powered apps:
Agno ships several guardrails you can use instantly:
Using one is simple; just pass it via pre_hooks when creating an Agent.
from agno.guardrails import PIIDetectionGuardrail
from agno.agent import Agent
from agno.models.openai import OpenAIChat
agent = Agent(
name="Privacy-Protected Agent",
model=OpenAIChat(id="gpt-5-mini"),
pre_hooks=[PIIDetectionGuardrail()], # Add guardrail here
)
# If input contains PII, an error will be raised
result = agent.run("My number is 9876543210")
If the built-in guardrails don’t cover your needs, you can create your own by extending BaseGuardrail and implementing:
check() – synchronous logicasync_check() – async logicIf your check fails, you must raise an InputCheckError.
This guardrail checks the user’s input for any offensive or inappropriate words and blocks the message before it reaches the LLM.
This is useful for:
from agno.guardrails import BaseGuardrail
from agno.exceptions import InputCheckError, CheckTrigger
from agno.run.agent import RunInput
class BadWordsGuardrail(BaseGuardrail):
"""Guardrail to block offensive or forbidden words."""
# A simple list of offensive or banned words
forbidden_words = {"stupid", "idiot", "dumb", "nonsense"}
def check(self, run_input: RunInput) -> None:
"""Sync check for forbidden words."""
if isinstance(run_input.input_content, str):
words = run_input.input_content.lower().split()
if any(word in self.forbidden_words for word in words):
raise InputCheckError(
"Your message contains forbidden or offensive language.",
check_trigger=CheckTrigger.INPUT_NOT_ALLOWED,
)
async def async_check(self, run_input: RunInput) -> None:
"""Async version of the same check."""
if isinstance(run_input.input_content, str):
words = run_input.input_content.lower().split()
if any(word in self.forbidden_words for word in words):
raise InputCheckError(
"Your message contains forbidden or offensive language.",
check_trigger=CheckTrigger.INPUT_NOT_ALLOWED,
)
from agno.agent import Agent
from agno.models.openai import OpenAIChat
agent = Agent(
name="Polite Chatbot",
model=OpenAIChat(id="gpt-5-mini"),
pre_hooks=[BadWordsGuardrail()], # Add the custom guardrail
)
# This will raise an InputCheckError
agent.run("You are so stupid!")
# This will be allowed
response = agent.run("Can you help me with Python?")
print(response)
Multimodal Agents are AI agents that can understand and generate multiple types of media and are not just limited to text. They can support:
This means that your agent can:
Multimodal agents unlock powerful use cases:
Agno makes multimodal workflows very simple by letting you pass media objects (Image, Audio, Video, File) directly into an Agent’s .run() or .print_response() methods.
Agno agents support multimodal inputs and outputs only if the underlying model supports them.
Please feel free to check their documentation for complete details.
You simply:
Use-case: Ask questions about an image.
from agno.agent import Agent
from agno.media import Image
from agno.models.openai import OpenAIChat
agent = Agent(
model=OpenAIChat(id="gpt-5-mini"),
markdown=True,
)
image = Image(
url="https://upload.wikimedia.org/wikipedia/commons/5/5f/Great_Pyramid_of_Giza.jpg"
)
agent.print_response(
"Describe this landmark and tell me its historical importance.",
images=[image]
)
Agno lets you develop intelligent Agents and is getting popular among the developer community pretty rapidly. In this article, we have just touched upon a few of its features, and there are a lot more to explore. Here are a few of the steps that can help build better Agents using this framework.
Different models support different capabilities, and sometimes some models perform better than others. Therefore, there is always a need to experiment with different models for various use cases. Additionally, choosing the right model often reduces latency and improves accuracy.
Different models support different capabilities:
Best practices for chossing the right model:
Ambiguous or poorly constructed instructions can cause unpredictable behaviour, and structured instructions improve consistency and reliability.
Best practices for Agent Instructions:
Define a clear role, such as “You are a financial analysis assistant”.
Add instructions that specify:
output format
tone
limitations
tool usage guidelines
Avoid long or complex system prompts.
Tools extend an agent’s capabilities (browsing, image generation, code execution, search, etc.). However, too many tools can cause the agent to misfire or choose suboptimal actions.
Best practices for tools:
Instead of building one large agent:
Modular design improves maintainability and produces higher-quality outputs.
Agno’s integrated knowledge system improves context retrieval. This process helps to improve retrieval accuracy and response relevance.
Best practices for knowledge base:
Guardrails help prevent unsafe or undesired inputs from reaching your agent. Guardrails also protect the agent from prompt injection, sensitive data leakage, and harmful content.
Recommended actions:
Always add built-in guardrails like:
PIIDetectionGuardrail
PromptInjectionGuardrail
OpenAIModerationGuardrail
Create custom guardrails for domain-specific checks (e.g., URL blocking, profanity filtering, metadata validation).
Attach guardrails using the pre_hooks parameter.
Agents are probabilistic; errors can occur.
Best practices for error handling:
.run() calls.InputCheckError when using guardrails.Before deploying:
Together, these checks will help you to build better, multimodal, multi-agent AI systems that are production-ready and easy to maintain.
Agno is a fast, lightweight multi-agent framework that helps developers build, run, and manage intelligent agentic systems with ease. It provides tools for coordination, workflows, memory, knowledge retrieval, and multimodal capabilities.
Yes. Agno is designed to be beginner-friendly with clean abstractions, straightforward APIs, and excellent documentation. It allows newcomers to quickly build and experiment with agentic applications.
Agno offers an all-in-one stack framework, runtime, and control plane combined with high performance and multimodal support. It simplifies both development and production deployment without sacrificing flexibility.
Absolutely. Agno is built to integrate with external APIs, databases, vector stores, and model providers, making it suitable for real-world production workflows and automation tasks.
Yes. Agno has built-in multimodal capabilities, allowing agents to process text, images, audio, videos, and documents. This enables complex use cases like AI assistants, analysis tools, and media workflows.
Agno makes it easier than ever to build powerful, reliable, and production-ready AI agents. Its modular design, guardrails, multimodal capabilities, and seamless support for tools and teams allow developers to go beyond simple chat interfaces and create full-fledged intelligent systems.
At first, it might feel complicated, but the Agno documentation is great to start with, and every small detail is included, which allows developers to develop, build, and scale agentic applications. Agno is a lightweight, beginner-friendly, and future-proof foundation for the next generation of AI applications. In this article, we’ve only scratched the surface of what Agno can do, but there is so much more to explore. In the upcoming articles, we’ll dive deeper into advanced workflows, build hands-on multi-agent systems, and experiment with real-world integrations to demonstrate Agno’s full potential.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
With a strong background in data science and over six years of experience, I am passionate about creating in-depth content on technologies. Currently focused on AI, machine learning, and GPU computing, working on topics ranging from deep learning frameworks to optimizing GPU-based workloads.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.