agno
Agno AI agent framework. Use for building multi-agent systems, AgentOS runtime, MCP server integration, and agentic AI development.
What this skill does
# 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:
- **Building AI agents** with tools, memory, and structured outputs
- **Creating multi-agent teams** with role-based delegation and collaboration
- **Implementing workflows** with conditional branching, loops, and async execution
- **Integrating MCP servers** (stdio, SSE, or Streamable HTTP transports)
- **Deploying AgentOS** with custom FastAPI apps, JWT middleware, or database backends
- **Working with knowledge bases** for RAG and document processing
- **Debugging agent behavior** with debug mode and telemetry
- **Optimizing agent performance** with exponential backoff, retries, and rate limiting
## Key Concepts
### Core Architecture
- **Agent**: Single autonomous AI unit with model, tools, instructions, and optional memory/knowledge
- **Team**: Collection of agents that collaborate on tasks with role-based delegation
- **Workflow**: Multi-step orchestration with conditional branching, loops, and parallel execution
- **AgentOS**: FastAPI-based runtime for deploying agents as production APIs
### MCP Integration
- **MCPTools**: Connect to single MCP server via stdio, SSE, or Streamable HTTP
- **MultiMCPTools**: Connect to multiple MCP servers simultaneously
- **Transport Types**: stdio (local processes), SSE (server-sent events), Streamable HTTP (production)
### Memory & Knowledge
- **Session Memory**: Conversation state stored in PostgreSQL, SQLite, or cloud storage (GCS)
- **Knowledge Base**: RAG-powered document retrieval with vector embeddings
- **User Memory**: Persistent user-specific memories across sessions
## Quick Reference
### 1. Basic Agent with Tools
```python
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
```python
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)
```python
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
```python
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
```python
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
```python
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
```python
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
```python
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
```python
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
```python
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)
- MCP server integration (stdio, SSE, Streamable HTTP)
-Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.