100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
refactor: Update AI agents to use RunOutput and specify agno version
Shubhamsaboof3029701cbe1
diff --git a/advanced_ai_agents/single_agent_apps/ai_health_fitness_agent/health_agent.py b/advanced_ai_agents/single_agent_apps/ai_health_fitness_agent/health_agent.pyindex 7d2ad018..821f8d9d 100644--- a/advanced_ai_agents/single_agent_apps/ai_health_fitness_agent/health_agent.py+++ b/advanced_ai_agents/single_agent_apps/ai_health_fitness_agent/health_agent.py@@ -1,5 +1,6 @@import streamlit as stfrom agno.agent import Agent+from agno.run.agent import RunOutputfrom agno.models.google import Geminist.set_page_config(@@ -173,7 +174,7 @@ def main():Fitness Goals: {fitness_goals}"""- dietary_plan_response = dietary_agent.run(user_profile)+ dietary_plan_response: RunOutput = dietary_agent.run(user_profile)dietary_plan = {"why_this_plan_works": "High Protein, Healthy Fats, Moderate Carbohydrates, and Caloric Balance","meal_plan": dietary_plan_response.content,@@ -185,7 +186,7 @@ def main():"""}- fitness_plan_response = fitness_agent.run(user_profile)+ fitness_plan_response: RunOutput = fitness_agent.run(user_profile)fitness_plan = {"goals": "Build strength, improve endurance, and maintain overall fitness","routine": fitness_plan_response.content,@@ -222,8 +223,8 @@ def main():full_context = f"{context}\nUser Question: {question_input}"try:- agent = Agent(model=gemini_model, show_tool_calls=True, markdown=True)- run_response = agent.run(full_context)+ agent = Agent(model=gemini_model, debug_mode=True, markdown=True)+ run_response: RunOutput = agent.run(full_context)if hasattr(run_response, 'content'):answer = run_response.contentdiff --git a/advanced_ai_agents/single_agent_apps/ai_health_fitness_agent/requirements.txt b/advanced_ai_agents/single_agent_apps/ai_health_fitness_agent/requirements.txtindex 0762e218..7bcb78e6 100644--- a/advanced_ai_agents/single_agent_apps/ai_health_fitness_agent/requirements.txt+++ b/advanced_ai_agents/single_agent_apps/ai_health_fitness_agent/requirements.txt@@ -1,3 +1,3 @@google-generativeai==0.8.3streamlit==1.40.2-agno\ No newline at end of file+agno>=2.2.10\ No newline at end of filediff --git a/advanced_ai_agents/single_agent_apps/ai_investment_agent/investment_agent.py b/advanced_ai_agents/single_agent_apps/ai_investment_agent/investment_agent.pyindex 699c2cc5..5e11ef90 100644--- a/advanced_ai_agents/single_agent_apps/ai_investment_agent/investment_agent.py+++ b/advanced_ai_agents/single_agent_apps/ai_investment_agent/investment_agent.py@@ -1,5 +1,6 @@import streamlit as stfrom agno.agent import Agent+from agno.run.agent import RunOutputfrom agno.models.openai import OpenAIChatfrom agno.tools.yfinance import YFinanceTools@@ -14,7 +15,7 @@ if openai_api_key:tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, stock_fundamentals=True)],- show_tool_calls=True,+ debug_mode=True,description="You are an investment analyst that researches stock prices, analyst recommendations, and stock fundamentals.",instructions=["Format your response using markdown and use tables to display data where possible."@@ -30,5 +31,5 @@ if openai_api_key:if stock1 and stock2:with st.spinner(f"Analyzing {stock1} and {stock2}..."):query = f"Compare both the stocks - {stock1} and {stock2} and make a detailed report for an investment trying to invest and compare these stocks"- response = assistant.run(query, stream=False)+ response: RunOutput = assistant.run(query, stream=False)st.markdown(response.content)diff --git a/advanced_ai_agents/single_agent_apps/ai_investment_agent/requirements.txt b/advanced_ai_agents/single_agent_apps/ai_investment_agent/requirements.txtindex b25ad275..67cd7298 100644--- a/advanced_ai_agents/single_agent_apps/ai_investment_agent/requirements.txt+++ b/advanced_ai_agents/single_agent_apps/ai_investment_agent/requirements.txt@@ -1,4 +1,4 @@streamlit-agno+agno>=2.2.10openaiyfinancediff --git a/advanced_ai_agents/single_agent_apps/ai_journalist_agent/journalist_agent.py b/advanced_ai_agents/single_agent_apps/ai_journalist_agent/journalist_agent.pyindex af7390bd..cbb4df89 100644--- a/advanced_ai_agents/single_agent_apps/ai_journalist_agent/journalist_agent.py+++ b/advanced_ai_agents/single_agent_apps/ai_journalist_agent/journalist_agent.py@@ -1,6 +1,7 @@# Import the required librariesfrom textwrap import dedentfrom agno.agent import Agent+from agno.run.agent import RunOutputfrom agno.tools.serpapi import SerpApiToolsfrom agno.tools.newspaper4k import Newspaper4kToolsimport streamlit as st@@ -35,7 +36,7 @@ if openai_api_key and serp_api_key:"Remember: you are writing for the New York Times, so the quality of the sources is important.",],tools=[SerpApiTools(api_key=serp_api_key)],- add_datetime_to_instructions=True,+ add_datetime_to_context=True,)writer = Agent(name="Writer",@@ -58,7 +59,7 @@ if openai_api_key and serp_api_key:"Never make up facts or plagiarize. Always provide proper attribution.",],tools=[Newspaper4kTools()],- add_datetime_to_instructions=True,+ add_datetime_to_context=True,markdown=True,)@@ -76,7 +77,7 @@ if openai_api_key and serp_api_key:"Ensure the article is engaging and informative.","Remember: you are the final gatekeeper before the article is published.",],- add_datetime_to_instructions=True,+ add_datetime_to_context=True,markdown=True,)@@ -86,5 +87,5 @@ if openai_api_key and serp_api_key:if query:with st.spinner("Processing..."):# Get the response from the assistant- response = editor.run(query, stream=False)+ response: RunOutput = editor.run(query, stream=False)st.write(response.content)\ No newline at end of filediff --git a/advanced_ai_agents/single_agent_apps/ai_journalist_agent/requirements.txt b/advanced_ai_agents/single_agent_apps/ai_journalist_agent/requirements.txtindex c97808af..493b942d 100644--- a/advanced_ai_agents/single_agent_apps/ai_journalist_agent/requirements.txt+++ b/advanced_ai_agents/single_agent_apps/ai_journalist_agent/requirements.txt@@ -1,5 +1,5 @@streamlit-agno+agno>=2.2.10openaigoogle-search-resultsnewspaper4kdiff --git a/advanced_ai_agents/single_agent_apps/ai_lead_generation_agent/ai_lead_generation_agent.py b/advanced_ai_agents/single_agent_apps/ai_lead_generation_agent/ai_lead_generation_agent.pyindex 439fd583..b284eaeb 100644--- a/advanced_ai_agents/single_agent_apps/ai_lead_generation_agent/ai_lead_generation_agent.py+++ b/advanced_ai_agents/single_agent_apps/ai_lead_generation_agent/ai_lead_generation_agent.py@@ -1,6 +1,7 @@import streamlit as stimport requestsfrom agno.agent import Agent+from agno.run.agent import RunOutputfrom agno.tools.firecrawl import FirecrawlToolsfrom agno.models.openai import OpenAIChatfrom firecrawl import FirecrawlApp@@ -96,7 +97,7 @@ def create_google_sheets_agent(composio_api_key: str, openai_api_key: str) -> Aggoogle_sheets_agent = Agent(model=OpenAIChat(id="gpt-4o-mini", api_key=openai_api_key),tools=[google_sheets_tool],- show_tool_calls=True,+ debug_mode=True,instructions="You are an expert at creating and updating Google Sheets. You will be given user information in JSON format, and you need to write it into a new Google Sheet.",markdown=True)@@ -113,7 +114,7 @@ def write_to_google_sheets(flattened_data: List[dict], composio_api_key: str, opf"{json.dumps(flattened_data, indent=2)}")- create_sheet_response = google_sheets_agent.run(message)+ create_sheet_response: RunOutput = google_sheets_agent.run(message)if "https://docs.google.com/spreadsheets/d/" in create_sheet_response.content:google_sheets_link = create_sheet_response.content.split("https://docs.google.com/spreadsheets/d/")[1].split(" ")[0]@@ -176,7 +177,7 @@ def main():else:with st.spinner("Processing your query..."):transform_agent = create_prompt_transformation_agent(openai_api_key)- company_description = transform_agent.run(f"Transform this query into a concise 3-4 word company description: {user_query}")+ company_description: RunOutput = transform_agent.run(f"Transform this query into a concise 3-4 word company description: {user_query}")st.write("🎯 Searching for:", company_description.content)with st.spinner("Searching for relevant URLs..."):diff --git a/advanced_ai_agents/single_agent_apps/ai_lead_generation_agent/requirements.txt b/advanced_ai_agents/single_agent_apps/ai_lead_generation_agent/requirements.txtindex 5fa3753c..2c34eaeb 100644--- a/advanced_ai_agents/single_agent_apps/ai_lead_generation_agent/requirements.txt+++ b/advanced_ai_agents/single_agent_apps/ai_lead_generation_agent/requirements.txt@@ -1,5 +1,5 @@firecrawl-py==1.9.0-agno+agno>=2.2.10composio-phidatacomposio==0.1.1pydantic==2.10.5diff --git a/advanced_ai_agents/single_agent_apps/ai_movie_production_agent/movie_production_agent.py b/advanced_ai_agents/single_agent_apps/ai_movie_production_agent/movie_production_agent.pyindex b324bca8..0b201170 100644--- a/advanced_ai_agents/single_agent_apps/ai_movie_production_agent/movie_production_agent.py+++ b/advanced_ai_agents/single_agent_apps/ai_movie_production_agent/movie_production_agent.py@@ -1,6 +1,7 @@# Import the required librariesimport streamlit as stfrom agno.agent import Agent+from agno.run.agent import RunOutputfrom agno.tools.serpapi import SerpApiToolsfrom agno.models.anthropic import Claudefrom textwrap import dedent@@ -79,5 +80,5 @@ if anthropic_api_key and serp_api_key:f"Target audience: {target_audience}, Estimated runtime: {estimated_runtime} minutes")# Get the response from the assistant- response = movie_producer.run(input_text, stream=False)- st.write(response)\ No newline at end of file+ response: RunOutput = movie_producer.run(input_text, stream=False)+ st.write(response.content)\ No newline at end of filediff --git a/advanced_ai_agents/single_agent_apps/ai_personal_finance_agent/finance_agent.py b/advanced_ai_agents/single_agent_apps/ai_personal_finance_agent/finance_agent.pyindex 4d599360..02745552 100644--- a/advanced_ai_agents/single_agent_apps/ai_personal_finance_agent/finance_agent.py+++ b/advanced_ai_agents/single_agent_apps/ai_personal_finance_agent/finance_agent.py@@ -1,5 +1,6 @@from textwrap import dedentfrom agno.agent import Agent+from agno.run.agent import RunOutputfrom agno.tools.serpapi import SerpApiToolsimport streamlit as stfrom agno.models.openai import OpenAIChat@@ -33,7 +34,7 @@ if openai_api_key and serp_api_key:"Remember: the quality of the results is important.",],tools=[SerpApiTools(api_key=serp_api_key)],- add_datetime_to_instructions=True,+ add_datetime_to_context=True,)planner = Agent(name="Planner",@@ -53,7 +54,7 @@ if openai_api_key and serp_api_key:"Focus on clarity, coherence, and overall quality.","Never make up facts or plagiarize. Always provide proper attribution.",],- add_datetime_to_instructions=True,+ add_datetime_to_context=True,)# Input fields for the user's financial goals and current financial situation@@ -63,5 +64,5 @@ if openai_api_key and serp_api_key:if st.button("Generate Financial Plan"):with st.spinner("Processing..."):# Get the response from the assistant- response = planner.run(f"Financial goals: {financial_goals}, Current situation: {current_situation}", stream=False)+ response: RunOutput = planner.run(f"Financial goals: {financial_goals}, Current situation: {current_situation}", stream=False)st.write(response.content)diff --git a/advanced_ai_agents/single_agent_apps/ai_personal_finance_agent/requirements.txt b/advanced_ai_agents/single_agent_apps/ai_personal_finance_agent/requirements.txtindex ffff278b..ade7ee1e 100644--- a/advanced_ai_agents/single_agent_apps/ai_personal_finance_agent/requirements.txt+++ b/advanced_ai_agents/single_agent_apps/ai_personal_finance_agent/requirements.txt@@ -1,4 +1,4 @@streamlit-agno+agno>=2.2.10openaigoogle-search-results\ No newline at end of filediff --git a/advanced_ai_agents/single_agent_apps/ai_recipe_meal_planning_agent/ai_recipe_meal_planning_agent.py b/advanced_ai_agents/single_agent_apps/ai_recipe_meal_planning_agent/ai_recipe_meal_planning_agent.pyindex 3c419d32..4a3584a2 100644--- a/advanced_ai_agents/single_agent_apps/ai_recipe_meal_planning_agent/ai_recipe_meal_planning_agent.py+++ b/advanced_ai_agents/single_agent_apps/ai_recipe_meal_planning_agent/ai_recipe_meal_planning_agent.py@@ -6,6 +6,7 @@ from textwrap import dedentfrom typing import Dict, List, Optionalfrom agno.agent import Agent+from agno.run.agent import RunOutputfrom agno.models.openai import OpenAIChatfrom agno.tools import toolimport requests@@ -290,7 +291,7 @@ async def create_agent():- Be encouraging and supportive"""),markdown=True,- show_tool_calls=True+ debug_mode=True)return agent@@ -353,7 +354,7 @@ What would you like to explore? 🍽️"""try:loop = asyncio.new_event_loop()asyncio.set_event_loop(loop)- response = loop.run_until_complete(+ response: RunOutput = loop.run_until_complete(st.session_state.agent.arun(user_input))diff --git a/advanced_ai_agents/single_agent_apps/ai_recipe_meal_planning_agent/requirements.txt b/advanced_ai_agents/single_agent_apps/ai_recipe_meal_planning_agent/requirements.txtindex 2cc370b3..e76ca887 100644--- a/advanced_ai_agents/single_agent_apps/ai_recipe_meal_planning_agent/requirements.txt+++ b/advanced_ai_agents/single_agent_apps/ai_recipe_meal_planning_agent/requirements.txt@@ -1,5 +1,5 @@streamlit-agno+agno>=2.2.10python-dotenvrequestsduckduckgo-search\ No newline at end of filediff --git a/advanced_ai_agents/single_agent_apps/ai_startup_insight_fire1_agent/ai_startup_insight_fire1_agent.py b/advanced_ai_agents/single_agent_apps/ai_startup_insight_fire1_agent/ai_startup_insight_fire1_agent.pyindex f6142846..13c554b5 100644--- a/advanced_ai_agents/single_agent_apps/ai_startup_insight_fire1_agent/ai_startup_insight_fire1_agent.py+++ b/advanced_ai_agents/single_agent_apps/ai_startup_insight_fire1_agent/ai_startup_insight_fire1_agent.py@@ -3,6 +3,7 @@ import streamlit as stimport osimport jsonfrom agno.agent import Agent+from agno.run.agent import RunOutputfrom agno.models.openai import OpenAIChatst.set_page_config(@@ -234,7 +235,7 @@ Important guidelines:if openai_api_key:with st.spinner("Generating AI analysis..."):# Run the agent with the extracted data- agent_response = agno_agent.run(f"Analyze this company data and provide insights: {json.dumps(company_data)}")+ agent_response: RunOutput = agno_agent.run(f"Analyze this company data and provide insights: {json.dumps(company_data)}")# Display the agent's analysis in a highlighted boxst.subheader("🧠 AI Business Analysis")diff --git a/advanced_ai_agents/single_agent_apps/ai_startup_insight_fire1_agent/requirements.txt b/advanced_ai_agents/single_agent_apps/ai_startup_insight_fire1_agent/requirements.txtindex c7297762..312a80ab 100644--- a/advanced_ai_agents/single_agent_apps/ai_startup_insight_fire1_agent/requirements.txt+++ b/advanced_ai_agents/single_agent_apps/ai_startup_insight_fire1_agent/requirements.txt@@ -1,4 +1,4 @@firecrawl-pystreamlit-agno+agno>=2.2.10openai\ No newline at end of filediff --git a/advanced_ai_agents/single_agent_apps/ai_system_architect_r1/ai_system_architect_r1.py b/advanced_ai_agents/single_agent_apps/ai_system_architect_r1/ai_system_architect_r1.pyindex 5236c946..9e490ca5 100644--- a/advanced_ai_agents/single_agent_apps/ai_system_architect_r1/ai_system_architect_r1.py+++ b/advanced_ai_agents/single_agent_apps/ai_system_architect_r1/ai_system_architect_r1.py@@ -8,7 +8,8 @@ from dotenv import load_dotenvfrom pydantic import BaseModel, Fieldfrom enum import Enumimport json-from agno.agent import Agent, RunResponse+from agno.agent import Agent+from agno.run.agent import RunOutputfrom agno.models.anthropic import Claude# Model Constants@@ -230,8 +231,8 @@ class ModelChain:DeepSeek Technical Analysis: {normal_content}Give detailed explanation for each key value pair in brief in the JSON object, and why we chose it clearly. Dont use your own opinions, use the reasoning and the structured output to explain the choices."""- # Use Phi Agent to get response- response: RunResponse = self.agent.run(+ # Use Claude Agent to get response+ response: RunOutput = self.agent.run(message=message)diff --git a/advanced_ai_agents/single_agent_apps/ai_system_architect_r1/requirements.txt b/advanced_ai_agents/single_agent_apps/ai_system_architect_r1/requirements.txtindex e8fce4b3..f13c435d 100644--- a/advanced_ai_agents/single_agent_apps/ai_system_architect_r1/requirements.txt+++ b/advanced_ai_agents/single_agent_apps/ai_system_architect_r1/requirements.txt@@ -1,4 +1,4 @@streamlitopenaianthropic-agno\ No newline at end of file+agno>=2.2.10\ No newline at end of file