Agno

From diegosouzapw/awesome-omni-skill · View interactive version

Agno is an AI agent skill from the GitHub repository diegosouzapw/awesome-omni-skill. Agno AI agent framework. Use for building multi-agent systems, AgentOS runtime, MCP server integration, and agentic AI development.

How to use this skill

Skill file

Agno Skill

Comprehensive assistance with Agno development - a modern AI agent framework for building production-ready multi-agent systems with MCP integration, workflow orchestration, and AgentOS runtime.

When to Use This Skill

This skill should be triggered when:

Key Concepts

Core Architecture

MCP Integration

Memory & Knowledge

Quick Reference

1. Basic Agent with Tools

from agno.agent import Agent
from agno.tools.duckduckgo import DuckDuckGoTools

agent = Agent(
    tools=[DuckDuckGoTools()],
    markdown=True,
)

agent.print_response("Search for the latest AI news", stream=True)

2. Agent with Structured Output

from agno.agent import Agent
from pydantic import BaseModel, Field

class MovieScript(BaseModel):
    name: str = Field(..., description="Movie title")
    genre: str = Field(..., description="Movie genre")
    storyline: str = Field(..., description="3 sentence storyline")

agent = Agent(
    description="You help people write movie scripts.",
    output_schema=MovieScript,
)

result = agent.run("Write a sci-fi thriller")
print(result.content.name)  # Access structured output

3. MCP Server Integration (stdio)

import asyncio
from agno.agent import Agent
from agno.tools.mcp import MCPTools

async def run_agent(message: str) -> None:
    mcp_tools = MCPTools(command="uvx mcp-server-git")
    await mcp_tools.connect()

    try:
        agent = Agent(tools=[mcp_tools])
        await agent.aprint_response(message, stream=True)
    finally:
        await mcp_tools.close()

asyncio.run(run_agent("What is the license for this project?"))

4. Multiple MCP Servers

import asyncio
import os
from agno.agent import Agent
from agno.tools.mcp import MultiMCPTools

async def run_agent(message: str) -> None:
    env = {
        **os.environ,
        "GOOGLE_MAPS_API_KEY": os.getenv("GOOGLE_MAPS_API_KEY"),
    }

    mcp_tools = MultiMCPTools(
        commands=[
            "npx -y @openbnb/mcp-server-airbnb --ignore-robots-txt",
            "npx -y @modelcontextprotocol/server-google-maps",
        ],
        env=env,
    )
    await mcp_tools.connect()

    try:
        agent = Agent(tools=[mcp_tools], markdown=True)
        await agent.aprint_response(message, stream=True)
    finally:
        await mcp_tools.close()

5. Multi-Agent Team with Role Delegation

from agno.agent import Agent
from agno.team import Team
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.tools.hackernews import HackerNewsTools

research_agent = Agent(
    name="Research Specialist",
    role="Gather information on topics",
    tools=[DuckDuckGoTools()],
    instructions=["Find comprehensive information", "Cite sources"],
)

news_agent = Agent(
    name="News Analyst",
    role="Analyze tech news",
    tools=[HackerNewsTools()],
    instructions=["Focus on trending topics", "Summarize key points"],
)

team = Team(
    members=[research_agent, news_agent],
    instructions=["Delegate research tasks to appropriate agents"],
)

team.print_response("Research AI trends and latest HN discussions", stream=True)

6. Workflow with Conditional Branching

from agno.agent import Agent
from agno.workflow.workflow import Workflow
from agno.workflow.router import Router
from agno.workflow.step import Step
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.tools.hackernews import HackerNewsTools

simple_researcher = Agent(
    name="Simple Researcher",
    tools=[DuckDuckGoTools()],
)

deep_researcher = Agent(
    name="Deep Researcher",
    tools=[HackerNewsTools()],
)

workflow = Workflow(
    steps=[
        Router(
            routes={
                "simple_topics": Step(agent=simple_researcher),
                "complex_topics": Step(agent=deep_researcher),
            }
        )
    ]
)

workflow.run("Research quantum computing")

7. Agent with Database Session Storage

from agno.agent import Agent
from agno.db.postgres import PostgresDb

db = PostgresDb(
    db_url="postgresql://user:pass@localhost:5432/agno",
    schema="agno_sessions"
)

agent = Agent(
    db=db,
    session_id="user-123",  # Persistent session
    add_history_to_messages=True,
)

# Conversations are automatically saved and restored
agent.print_response("Remember my favorite color is blue")
agent.print_response("What's my favorite color?")  # Will remember

8. AgentOS with Custom FastAPI App

from fastapi import FastAPI
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.os import AgentOS

# Custom FastAPI app
app = FastAPI(title="Custom App")

@app.get("/health")
def health_check():
    return {"status": "healthy"}

# Add AgentOS routes
agent_os = AgentOS(
    agents=[Agent(id="assistant", model=OpenAIChat(id="gpt-5-mini"))],
    base_app=app  # Merge with custom app
)

if __name__ == "__main__":
    agent_os.serve(app="custom_app:app", reload=True)

9. Agent with Debug Mode

from agno.agent import Agent
from agno.tools.hackernews import HackerNewsTools

agent = Agent(
    tools=[HackerNewsTools()],
    debug_mode=True,  # Enable detailed logging
    # debug_level=2,  # More verbose output
)

# See detailed logs of:
# - Messages sent to model
# - Tool calls and results
# - Token usage and timing
agent.print_response("Get top HN stories")

10. Workflow with Input Schema Validation

from typing import List
from agno.agent import Agent
from agno.workflow.workflow import Workflow
from agno.workflow.step import Step
from pydantic import BaseModel, Field

class ResearchTopic(BaseModel):
    """Structured research topic with specific requirements"""
    topic: str
    focus_areas: List[str] = Field(description="Specific areas to focus on")
    target_audience: str = Field(description="Who this research is for")
    sources_required: int = Field(description="Number of sources needed", default=5)

workflow = Workflow(
    input_schema=ResearchTopic,  # Validate inputs
    steps=[
        Step(agent=Agent(instructions=["Research based on focus areas"]))
    ]
)

# This will validate the input structure
workflow.run({
    "topic": "AI Safety",
    "focus_areas": ["alignment", "interpretability"],
    "target_audience": "researchers",
    "sources_required": 10
})

Reference Files

This skill includes comprehensive documentation in references/:

**agentos.md** (22 pages)

**agents.md** (834 pages)

**examples.md** (188 pages)

**getting_started.md**

**integration.md**

**migration.md**

**other.md**

Working with This Skill

For Beginners

Start with getting_started.md to understand:

Quick Start Pattern:

from agno.agent import Agent
from agno.tools.duckduckgo import DuckDuckGoTools

agent = Agent(tools=[DuckDuckGoTools()])
agent.print_response("Your question here")

For Intermediate Users

Explore agents.md and examples.md for:

Team Pattern:

from agno.team import Team

team = Team(
    members=[researcher, analyst, writer],
    instructions=["Delegate tasks based on agent roles"]
)

For Advanced Users

Deep dive into agentos.md for:

AgentOS Pattern:

from agno.os import AgentOS

agent_os = AgentOS(
    agents=[agent1, agent2],
    db=PostgresDb(...),
    base_app=custom_fastapi_app
)
agent_os.serve()

Navigation Tips

  1. Looking for examples? → Check examples.md first for real-world patterns
  2. Need API details? → Search agents.md for class references and parameters
  3. Deploying to production? → Read agentos.md for AgentOS setup
  4. Integrating external tools? → See integration.md for MCP and custom tools
  5. Debugging issues? → Enable debug_mode=True and check logs

Common Patterns

Pattern: MCP Server Connection Lifecycle

async def run_with_mcp():
    mcp_tools = MCPTools(command="uvx mcp-server-git")
    await mcp_tools.connect()  # Always connect before use

    try:
        agent = Agent(tools=[mcp_tools])
        await agent.aprint_response("Your query")
    finally:
        await mcp_tools.close()  # Always close when done

Pattern: Persistent Sessions with Database

from agno.agent import Agent
from agno.db.postgres import PostgresDb

db = PostgresDb(db_url="postgresql://...")

agent = Agent(
    db=db,
    session_id="unique-user-id",
    add_history_to_messages=True,  # Include conversation history
)

Pattern: Conditional Workflow Routing

from agno.workflow.router import Router

workflow = Workflow(
    steps=[
        Router(
            routes={
                "route_a": Step(agent=agent_a),
                "route_b": Step(agent=b),
            }
        )
    ]
)

Resources

Official Links

Key Concepts to Remember

scripts/

Add helper scripts here for common automation tasks.

assets/

Add templates, boilerplate, or example projects here.

Notes

Updating

To refresh this skill with updated documentation:

  1. Re-run the scraper with the same configuration
  2. The skill will be rebuilt with the latest information from docs.agno.com
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.