100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
refactor: Update AI agents to use RunOutput and specify agno version
Shubhamsaboo9d4a00a1fe6e
diff --git a/advanced_ai_agents/multi_agent_apps/ai_aqi_analysis_agent/ai_aqi_analysis_agent_gradio.py b/advanced_ai_agents/multi_agent_apps/ai_aqi_analysis_agent/ai_aqi_analysis_agent_gradio.pyindex 609d027c..b7e9b346 100644--- a/advanced_ai_agents/multi_agent_apps/ai_aqi_analysis_agent/ai_aqi_analysis_agent_gradio.py+++ b/advanced_ai_agents/multi_agent_apps/ai_aqi_analysis_agent/ai_aqi_analysis_agent_gradio.py@@ -2,6 +2,7 @@ from typing import Dict, Optionalfrom dataclasses import dataclassfrom pydantic import BaseModel, Fieldfrom agno.agent import Agent+from agno.run.agent import RunOutputfrom agno.models.openai import OpenAIChatfrom firecrawl import FirecrawlAppimport gradio as gr@@ -95,7 +96,7 @@ class HealthRecommendationAgent:user_input: UserInput) -> str:prompt = self._create_prompt(aqi_data, user_input)- response = self.agent.run(prompt)+ response: RunOutput = self.agent.run(prompt)return response.contentdef _create_prompt(self, aqi_data: Dict[str, float], user_input: UserInput) -> str:diff --git a/advanced_ai_agents/multi_agent_apps/ai_aqi_analysis_agent/ai_aqi_analysis_agent_streamlit.py b/advanced_ai_agents/multi_agent_apps/ai_aqi_analysis_agent/ai_aqi_analysis_agent_streamlit.pyindex b8acaebc..e14496cd 100644--- a/advanced_ai_agents/multi_agent_apps/ai_aqi_analysis_agent/ai_aqi_analysis_agent_streamlit.py+++ b/advanced_ai_agents/multi_agent_apps/ai_aqi_analysis_agent/ai_aqi_analysis_agent_streamlit.py@@ -2,6 +2,7 @@ from typing import Dict, Optionalfrom dataclasses import dataclassfrom pydantic import BaseModel, Fieldfrom agno.agent import Agent+from agno.run.agent import RunOutputfrom agno.models.openai import OpenAIChatfrom firecrawl import FirecrawlAppimport streamlit as st@@ -111,7 +112,7 @@ class HealthRecommendationAgent:user_input: UserInput) -> str:prompt = self._create_prompt(aqi_data, user_input)- response = self.agent.run(prompt)+ response: RunOutput = self.agent.run(prompt)return response.contentdef _create_prompt(self, aqi_data: Dict[str, float], user_input: UserInput) -> str:diff --git a/advanced_ai_agents/multi_agent_apps/ai_aqi_analysis_agent/requirements.txt b/advanced_ai_agents/multi_agent_apps/ai_aqi_analysis_agent/requirements.txtindex 034b3093..f78b1a55 100644--- a/advanced_ai_agents/multi_agent_apps/ai_aqi_analysis_agent/requirements.txt+++ b/advanced_ai_agents/multi_agent_apps/ai_aqi_analysis_agent/requirements.txt@@ -1,4 +1,4 @@-agno+agno>=2.2.10openaifirecrawl-py==1.9.0gradio==5.9.1diff --git a/advanced_ai_agents/multi_agent_apps/ai_domain_deep_research_agent/ai_domain_deep_research_agent.py b/advanced_ai_agents/multi_agent_apps/ai_domain_deep_research_agent/ai_domain_deep_research_agent.pyindex 9b83c883..57f8736f 100644--- a/advanced_ai_agents/multi_agent_apps/ai_domain_deep_research_agent/ai_domain_deep_research_agent.py+++ b/advanced_ai_agents/multi_agent_apps/ai_domain_deep_research_agent/ai_domain_deep_research_agent.py@@ -3,6 +3,7 @@ import asyncioimport streamlit as stfrom dotenv import load_dotenvfrom agno.agent import Agent+from agno.run.agent import RunOutputfrom composio_agno import ComposioToolSet, Actionfrom agno.models.together import Together@@ -102,7 +103,7 @@ def generate_questions(llm, composio_tools, topic, domain):question_generator = create_agents(llm, composio_tools)with st.spinner("π€ Generating research questions..."):- questions_task = question_generator.run(+ questions_task: RunOutput = question_generator.run(f"Generate exactly 5 specific yes/no research questions about the topic '{topic}' in the domain '{domain}'.")questions_text = questions_task.content@@ -121,7 +122,7 @@ def research_question(llm, composio_tools, topic, domain, question):instructions=f"You are a sophisticated research assistant. Answer the following research question about the topic '{topic}' in the domain '{domain}':\n\n{question}\n\nUse the PERPLEXITYAI_PERPLEXITY_AI_SEARCH and COMPOSIO_SEARCH_TAVILY_SEARCH tools to provide a concise, well-sourced answer.")- research_result = research_task.run()+ research_result: RunOutput = research_task.run()return research_result.content# Function to compile final report@@ -155,7 +156,7 @@ def compile_report(llm, composio_tools, topic, domain, question_answers):""")- compile_result = compile_report_task.run()+ compile_result: RunOutput = compile_report_task.run()st.session_state.report_content = compile_result.contentst.session_state.research_complete = Truereturn compile_result.contentdiff --git a/advanced_ai_agents/multi_agent_apps/ai_domain_deep_research_agent/requirements.txt b/advanced_ai_agents/multi_agent_apps/ai_domain_deep_research_agent/requirements.txtindex 6a480ea2..e748cbe0 100644--- a/advanced_ai_agents/multi_agent_apps/ai_domain_deep_research_agent/requirements.txt+++ b/advanced_ai_agents/multi_agent_apps/ai_domain_deep_research_agent/requirements.txt@@ -1,5 +1,5 @@composio-agno+agno>=2.2.10streamlitcomposio-agnotogether\ No newline at end of filediff --git a/advanced_ai_agents/multi_agent_apps/ai_email_gtm_outreach_agent/ai_email_gtm_outreach_agent.py b/advanced_ai_agents/multi_agent_apps/ai_email_gtm_outreach_agent/ai_email_gtm_outreach_agent.pyindex 31450fc8..fb178309 100644--- a/advanced_ai_agents/multi_agent_apps/ai_email_gtm_outreach_agent/ai_email_gtm_outreach_agent.py+++ b/advanced_ai_agents/multi_agent_apps/ai_email_gtm_outreach_agent/ai_email_gtm_outreach_agent.py@@ -5,7 +5,8 @@ from typing import Any, Dict, List, Optionalimport streamlit as stfrom agno.agent import Agent-from agno.memory.v2 import Memory+from agno.run.agent import RunOutput+from agno.db.sqlite import SqliteDbfrom agno.models.openai import OpenAIChatfrom agno.tools.exa import ExaTools@@ -18,15 +19,16 @@ def require_env(var_name: str) -> None:def create_company_finder_agent() -> Agent:exa_tools = ExaTools(category="company")- memory = Memory()+ db = SqliteDb(db_file="tmp/gtm_outreach.db")return Agent(model=OpenAIChat(id="gpt-5"),tools=[exa_tools],- memory=memory,- add_history_to_messages=True,- num_history_responses=6,+ db=db,+ enable_user_memories=True,+ add_history_to_context=True,+ num_history_runs=6,session_id="gtm_outreach_company_finder",- show_tool_calls=True,+ debug_mode=True,instructions=["You are CompanyFinderAgent. Use ExaTools to search the web for companies that match the targeting criteria.","Return ONLY valid JSON with key 'companies' as a list; respect the requested limit provided in the user prompt.",@@ -37,15 +39,16 @@ def create_company_finder_agent() -> Agent:def create_contact_finder_agent() -> Agent:exa_tools = ExaTools()- memory = Memory()+ db = SqliteDb(db_file="tmp/gtm_outreach.db")return Agent(model=OpenAIChat(id="gpt-4o"),tools=[exa_tools],- memory=memory,- add_history_to_messages=True,- num_history_responses=6,+ db=db,+ enable_user_memories=True,+ add_history_to_context=True,+ num_history_runs=6,session_id="gtm_outreach_contact_finder",- show_tool_calls=True,+ debug_mode=True,instructions=["You are ContactFinderAgent. Use ExaTools to find 1-2 relevant decision makers per company and their emails if available.","Prioritize roles from Founder's Office, GTM (Marketing/Growth), Sales leadership, Partnerships/Business Development, and Product Marketing.",@@ -67,16 +70,17 @@ def get_email_style_instruction(style_key: str) -> str:def create_email_writer_agent(style_key: str = "Professional") -> Agent:- memory = Memory()+ db = SqliteDb(db_file="tmp/gtm_outreach.db")style_instruction = get_email_style_instruction(style_key)return Agent(model=OpenAIChat(id="gpt-5"),tools=[],- memory=memory,- add_history_to_messages=True,- num_history_responses=6,+ db=db,+ enable_user_memories=True,+ add_history_to_context=True,+ num_history_runs=6,session_id="gtm_outreach_email_writer",- show_tool_calls=False,+ debug_mode=False,instructions=["You are EmailWriterAgent. Write concise, personalized B2B outreach emails.",style_instruction,@@ -90,15 +94,16 @@ def create_email_writer_agent(style_key: str = "Professional") -> Agent:def create_research_agent() -> Agent:"""Agent to gather interesting insights from company websites and Reddit."""exa_tools = ExaTools()- memory = Memory()+ db = SqliteDb(db_file="tmp/gtm_outreach.db")return Agent(model=OpenAIChat(id="gpt-5"),tools=[exa_tools],- memory=memory,- add_history_to_messages=True,- num_history_responses=6,+ db=db,+ enable_user_memories=True,+ add_history_to_context=True,+ num_history_runs=6,session_id="gtm_outreach_researcher",- show_tool_calls=True,+ debug_mode=True,instructions=["You are ResearchAgent. For each company, collect concise, valuable insights from:","1) Their official website (about, blog, product pages)",@@ -130,7 +135,7 @@ def run_company_finder(agent: Agent, target_desc: str, offering_desc: str, max_cf"Offering: {offering_desc}\n""For each, provide: name, website, why_fit (1-2 lines).")- resp = agent.run(prompt)+ resp: RunOutput = agent.run(prompt)data = extract_json_or_raise(str(resp.content))companies = data.get("companies", [])return companies[: max(1, min(max_companies, 10))]@@ -144,7 +149,7 @@ def run_contact_finder(agent: Agent, companies: List[Dict[str, str]], target_desf"Companies JSON: {json.dumps(companies, ensure_ascii=False)}\n""Return JSON: {companies: [{name, contacts: [{full_name, title, email, inferred}]}]}")- resp = agent.run(prompt)+ resp: RunOutput = agent.run(prompt)data = extract_json_or_raise(str(resp.content))return data.get("companies", [])@@ -155,7 +160,7 @@ def run_research(agent: Agent, companies: List[Dict[str, str]]) -> List[Dict[strf"Companies JSON: {json.dumps(companies, ensure_ascii=False)}\n""Return JSON: {companies: [{name, insights: [string, ...]}]}")- resp = agent.run(prompt)+ resp: RunOutput = agent.run(prompt)data = extract_json_or_raise(str(resp.content))return data.get("companies", [])@@ -170,7 +175,7 @@ def run_email_writer(agent: Agent, contacts_data: List[Dict[str, Any]], researchf"Research JSON: {json.dumps(research_data, ensure_ascii=False)}\n""Return JSON with key 'emails' as a list of {company, contact, subject, body}.")- resp = agent.run(prompt)+ resp: RunOutput = agent.run(prompt)data = extract_json_or_raise(str(resp.content))return data.get("emails", [])diff --git a/advanced_ai_agents/multi_agent_apps/ai_email_gtm_outreach_agent/requirements.txt b/advanced_ai_agents/multi_agent_apps/ai_email_gtm_outreach_agent/requirements.txtindex 08fd7e21..28d12862 100644--- a/advanced_ai_agents/multi_agent_apps/ai_email_gtm_outreach_agent/requirements.txt+++ b/advanced_ai_agents/multi_agent_apps/ai_email_gtm_outreach_agent/requirements.txt@@ -1,4 +1,4 @@-agno>=0.4.2+agno>=2.2.10streamlit>=1.33.0pydantic>=2.7.0openai>=1.30.0diff --git a/advanced_ai_agents/multi_agent_apps/multi_agent_researcher/requirements.txt b/advanced_ai_agents/multi_agent_apps/multi_agent_researcher/requirements.txtindex c54384de..1f54c412 100644--- a/advanced_ai_agents/multi_agent_apps/multi_agent_researcher/requirements.txt+++ b/advanced_ai_agents/multi_agent_apps/multi_agent_researcher/requirements.txt@@ -1,3 +1,3 @@streamlit-agno+agno>=2.2.10openai\ No newline at end of filediff --git a/advanced_ai_agents/multi_agent_apps/multi_agent_researcher/research_agent.py b/advanced_ai_agents/multi_agent_apps/multi_agent_researcher/research_agent.pyindex 762bbe98..a0ae20c2 100644--- a/advanced_ai_agents/multi_agent_apps/multi_agent_researcher/research_agent.py+++ b/advanced_ai_agents/multi_agent_apps/multi_agent_researcher/research_agent.py@@ -1,13 +1,12 @@# Import the required librariesimport streamlit as stfrom agno.agent import Agent+from agno.run.agent import RunOutputfrom agno.models.openai import OpenAIChatfrom agno.team import Teamfrom agno.tools.duckduckgo import DuckDuckGoToolsfrom agno.tools.hackernews import HackerNewsToolsfrom agno.tools.newspaper4k import Newspaper4kTools-from pydantic import BaseModel-from typing import Listimport os# Set up the Streamlit app@@ -31,7 +30,7 @@ if openai_api_key:model=OpenAIChat(id="gpt-4o-mini"),role="Searches the web for information on a topic",tools=[DuckDuckGoTools()],- add_datetime_to_instructions=True,+ add_datetime_to_context=True,)article_reader = Agent(@@ -43,7 +42,6 @@ if openai_api_key:hackernews_team = Team(name="HackerNews Team",- mode="coordinate",model=OpenAIChat(id="gpt-4o-mini"),members=[hn_researcher, web_searcher, article_reader],instructions=[@@ -53,7 +51,6 @@ if openai_api_key:"Then, ask the web searcher to search for each story to get more information.","Finally, provide a thoughtful and engaging summary.",],- show_tool_calls=True,markdown=True,debug_mode=True,show_members_responses=True,@@ -64,5 +61,5 @@ if openai_api_key:if query:# Get the response from the assistant- response = hackernews_team.run(query, stream=False)+ response: RunOutput = hackernews_team.run(query, stream=False)st.write(response.content)\ No newline at end of filediff --git a/advanced_ai_agents/multi_agent_apps/multi_agent_researcher/research_agent_llama3.py b/advanced_ai_agents/multi_agent_apps/multi_agent_researcher/research_agent_llama3.pyindex 9f930d69..8bfe1f53 100644--- a/advanced_ai_agents/multi_agent_apps/multi_agent_researcher/research_agent_llama3.py+++ b/advanced_ai_agents/multi_agent_apps/multi_agent_researcher/research_agent_llama3.py@@ -1,6 +1,7 @@# Import the required librariesimport streamlit as stfrom agno.agent import Agent+from agno.run.agent import RunOutputfrom agno.team import Teamfrom agno.tools.duckduckgo import DuckDuckGoToolsfrom agno.tools.hackernews import HackerNewsTools@@ -24,7 +25,7 @@ web_searcher = Agent(model=Ollama(id="llama3.2", max_tokens=1024),role="Searches the web for information on a topic",tools=[DuckDuckGoTools()],- add_datetime_to_instructions=True,+ add_datetime_to_context=True,)article_reader = Agent(@@ -36,7 +37,6 @@ article_reader = Agent(hackernews_team = Team(name="HackerNews Team",- mode="coordinate",model=Ollama(id="llama3.2", max_tokens=1024),members=[hn_researcher, web_searcher, article_reader],instructions=[@@ -46,7 +46,6 @@ hackernews_team = Team("Then, ask the web searcher to search for each story to get more information.","Finally, provide a thoughtful and engaging summary.",],- show_tool_calls=True,markdown=True,debug_mode=True,show_members_responses=True,@@ -57,5 +56,5 @@ query = st.text_input("Enter your report query")if query:# Get the response from the assistant- response = hackernews_team.run(query, stream=False)+ response: RunOutput = hackernews_team.run(query, stream=False)st.write(response.content)\ No newline at end of filediff --git a/advanced_ai_agents/multi_agent_apps/product_launch_intelligence_agent/product_launch_intelligence_agent.py b/advanced_ai_agents/multi_agent_apps/product_launch_intelligence_agent/product_launch_intelligence_agent.pyindex 930d515e..550abf94 100644--- a/advanced_ai_agents/multi_agent_apps/product_launch_intelligence_agent/product_launch_intelligence_agent.py+++ b/advanced_ai_agents/multi_agent_apps/product_launch_intelligence_agent/product_launch_intelligence_agent.py@@ -1,10 +1,10 @@import streamlit as stfrom agno.agent import Agent+from agno.run.agent import RunOutputfrom agno.team import Teamfrom agno.models.openai import OpenAIChatfrom agno.tools.firecrawl import FirecrawlToolsfrom dotenv import load_dotenv-from datetime import datetimefrom textwrap import dedentimport os@@ -58,7 +58,7 @@ if openai_key and firecrawl_key:"""),model=OpenAIChat(id="gpt-4o"),tools=[FirecrawlTools(search=True, crawl=True, poll_interval=10)],- show_tool_calls=True,+ debug_mode=True,markdown=True,exponential_backoff=True,delay_between_retries=2,@@ -80,7 +80,7 @@ if openai_key and firecrawl_key:"""),model=OpenAIChat(id="gpt-4o"),tools=[FirecrawlTools(search=True, crawl=True, poll_interval=10)],- show_tool_calls=True,+ debug_mode=True,markdown=True,exponential_backoff=True,delay_between_retries=2,@@ -103,7 +103,7 @@ if openai_key and firecrawl_key:"""),model=OpenAIChat(id="gpt-4o"),tools=[FirecrawlTools(search=True, crawl=True, poll_interval=10)],- show_tool_calls=True,+ debug_mode=True,markdown=True,exponential_backoff=True,delay_between_retries=2,@@ -112,7 +112,6 @@ if openai_key and firecrawl_key:# Create the coordinated teamproduct_intelligence_team = Team(name="Product Intelligence Team",- mode="coordinate",model=OpenAIChat(id="gpt-4o"),members=[launch_analyst, sentiment_analyst, metrics_analyst],instructions=[@@ -124,7 +123,6 @@ if openai_key and firecrawl_key:"Structure responses with clear sections and actionable recommendations","Include sources section with all URLs crawled or searched"],- show_tool_calls=True,markdown=True,debug_mode=True,show_members_responses=True,@@ -133,38 +131,6 @@ else:product_intelligence_team = Nonest.warning("β οΈ Please enter both API keys in the sidebar to use the application.")-# ---------------- Helper to display response -----------------def display_agent_response(resp):- """Render different response structures nicely."""- if hasattr(resp, "content") and resp.content:- st.markdown(resp.content)- elif hasattr(resp, "messages"):- for m in resp.messages:- if m.role == "assistant" and m.content:- st.markdown(m.content)- else:- st.markdown(str(resp))--# Helper to expand bullet summary into 1200-word general report-def expand_insight(bullet_text: str, topic: str) -> str:- if not product_intelligence_team:- st.error("β οΈ Please enter both API keys in the sidebar first.")- return ""-- prompt = (- f"Using ONLY the bullet points below, craft an in-depth (~1200-word) launch analysis report on {topic}.\n"- f"Structure:\n"- f"1. Executive Summary (<120 words)\n"- f"2. Strengths & Opportunities (what worked well)\n"- f"3. Weaknesses & Gaps (what didn't work or could be improved)\n"- f"4. Actionable Recommendations (bullet list)\n"- f"5. Key Risks / Watch-outs\n\n"- f"Bullet Points:\n{bullet_text}\n\n"- f"Ensure analysis is objective, evidence-based and references the bullet insights. Keep paragraphs short (β€120 words)."- )- long_resp = product_intelligence_team.run(prompt)- return long_resp.content if hasattr(long_resp, "content") else str(long_resp)-# Helper to craft competitor-focused launch report for product managersdef expand_competitor_report(bullet_text: str, competitor: str) -> str:if not product_intelligence_team:@@ -189,7 +155,7 @@ def expand_competitor_report(bullet_text: str, competitor: str) -> str:f"β’ Populate the tables with specific points derived from the bullets.\n"f"β’ Only include rows that contain meaningful data; omit any blank entries.")- resp = product_intelligence_team.run(prompt)+ resp: RunOutput = product_intelligence_team.run(prompt)return resp.content if hasattr(resp, "content") else str(resp)# Helper to craft market sentiment report@@ -208,7 +174,7 @@ def expand_sentiment_report(bullet_text: str, product: str) -> str:f"Provide a short paragraph (β€120 words) summarising the overall sentiment balance and key drivers.\n\n"f"Tagged Bullets:\n{bullet_text}")- resp = product_intelligence_team.run(prompt)+ resp: RunOutput = product_intelligence_team.run(prompt)return resp.content if hasattr(resp, "content") else str(resp)# Helper to craft launch metrics report@@ -229,7 +195,7 @@ def expand_metrics_report(bullet_text: str, launch: str) -> str:f"Brief paragraph (β€120 words) highlighting what the metrics imply about launch success and next steps.\n\n"f"KPI Bullets:\n{bullet_text}")- resp = product_intelligence_team.run(prompt)+ resp: RunOutput = product_intelligence_team.run(prompt)return resp.content if hasattr(resp, "content") else str(resp)# ---------------- UI ----------------@@ -262,11 +228,6 @@ analysis_tabs = st.tabs(["π Launch Metrics"])-# Persistent storage for latest response-if "analysis_response" not in st.session_state:- st.session_state.analysis_response = None- st.session_state.analysis_meta = {}-# Store separate responses for each agentif "competitor_response" not in st.session_state:st.session_state.competitor_response = None@@ -314,7 +275,7 @@ with analysis_tabs[0]:else:with st.spinner("π Product Intelligence Team analyzing competitive strategy..."):try:- bullets = product_intelligence_team.run(+ bullets: RunOutput = product_intelligence_team.run(f"Generate up to 16 evidence-based insight bullets about {company_name}'s most recent product launches.\n"f"Format requirements:\n"f"β’ Start every bullet with exactly one tag: Positioning | Strength | Weakness | Learning\n"@@ -378,7 +339,7 @@ with analysis_tabs[1]:else:with st.spinner("π¬ Product Intelligence Team analyzing market sentiment..."):try:- bullets = product_intelligence_team.run(+ bullets: RunOutput = product_intelligence_team.run(f"Summarize market sentiment for {company_name} in <=10 bullets. "f"Cover top positive & negative themes with source mentions (G2, Reddit, Twitter, customer reviews).")@@ -440,7 +401,7 @@ with analysis_tabs[2]:else:with st.spinner("π Product Intelligence Team analyzing launch metrics..."):try:- bullets = product_intelligence_team.run(+ bullets: RunOutput = product_intelligence_team.run(f"List (max 10 bullets) the most important publicly available KPIs & qualitative signals for {company_name}'s recent product launches. "f"Include engagement stats, press coverage, adoption metrics, and market traction data if available.")diff --git a/advanced_ai_agents/multi_agent_apps/product_launch_intelligence_agent/requirements.txt b/advanced_ai_agents/multi_agent_apps/product_launch_intelligence_agent/requirements.txtindex 6dbed9a8..3b2e7b82 100644--- a/advanced_ai_agents/multi_agent_apps/product_launch_intelligence_agent/requirements.txt+++ b/advanced_ai_agents/multi_agent_apps/product_launch_intelligence_agent/requirements.txt@@ -1,4 +1,4 @@streamlit-agno+agno>=2.2.10firecrawl