100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
Added new demo
ShubhamSaboo0f1be80b73b4
diff --git a/README.md b/README.mdindex 5a6cce36..e88ca40d 100644--- a/README.md+++ b/README.md@@ -26,6 +26,7 @@ A curated collection of awesome LLM apps built with RAG and AI agents. This repo- [π― Generative AI Web Search Assistant](#-generative-ai-web-search-assistant)- [π¬ Chat with GitHub Repo](#-chat-with-github-repo)- [π AI Investment Agent](#-ai-investment-agent)+ - [ποΈ AI Journalist Agent](#-ai-journalist-agent)- [π° Multi-Agent AI Researcher](#-multi-agent-ai-researcher)- [π Chat with PDF](#-chat-with-pdf)- [π» Web Scraping AI Agent](#-web-scraping-ai-agent)@@ -55,6 +56,9 @@ Engage in natural conversations with your GitHub repositories using GPT-4. Uncov### π AI Investment AgentAI investment agent that compares the performance of two stocks and generates detailed stock reports with company insights, news, and analyst recommendations to help you make smart investment choices.+### ποΈ AI Journalist Agent+AI-powered journalist agent that generates high-quality articles using OpenAI GPT-4o. It automates the process of researching, writing, and editing articles, allowing you to create compelling content on any topic with ease.+### π° Multi-Agent AI ResearcherUse a team of AI agents to research top HackerNews stories and users with GPT-4 to generate blog posts, reports, and social media content on autopilot.diff --git a/investment_ai_agent/README.md b/ai_investment_agent/README.mdsimilarity index 100%rename from investment_ai_agent/README.mdrename to ai_investment_agent/README.mddiff --git a/investment_ai_agent/investment_agent.py b/ai_investment_agent/investment_agent.pysimilarity index 100%rename from investment_ai_agent/investment_agent.pyrename to ai_investment_agent/investment_agent.pydiff --git a/investment_ai_agent/requirements.txt b/ai_investment_agent/requirements.txtsimilarity index 100%rename from investment_ai_agent/requirements.txtrename to ai_investment_agent/requirements.txtdiff --git a/ai_journalist_agent/README.md b/ai_journalist_agent/README.mdnew file mode 100644index 00000000..76b3df71--- /dev/null+++ b/ai_journalist_agent/README.md@@ -0,0 +1,40 @@+## ποΈ AI Journalist Agent+This Streamlit app is an AI-powered journalist agent that generates high-quality articles using OpenAI GPT-4o. It automates the process of researching, writing, and editing articles, allowing you to create compelling content on any topic with ease.++### Features+- Searches the web for relevant information on a given topic+- Writes well-structured, informative, and engaging articles+- Edits and refines the generated content to meet the high standards of the New York Times++### How to get Started?++1. Clone the GitHub repository++```bash+git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git+```+2. Install the required dependencies:++```bash+pip install -r requirements.txt+```+3. Get your OpenAI API Key++- Sign up for an [OpenAI account](https://platform.openai.com/) (or the LLM provider of your choice) and obtain your API key.++4. Get your SerpAPI Key++- Sign up for an [SerpAPI account](https://serpapi.com/) and obtain your API key.++5. Run the Streamlit App+```bash+streamlit run journalist_agent.py+```++### How it Works?++The AI Journalist Agent utilizes three main components:+- Searcher: Responsible for generating search terms based on the given topic and searching the web for relevant URLs using the SerpAPI.+- Writer: Retrieves the text from the provided URLs using the NewspaperToolkit and writes a high-quality article based on the extracted information.+- Editor: Coordinates the workflow between the Searcher and Writer, and performs final editing and refinement of the generated article.+diff --git a/ai_journalist_agent/journalist_agent.py b/ai_journalist_agent/journalist_agent.pynew file mode 100644index 00000000..39b43831--- /dev/null+++ b/ai_journalist_agent/journalist_agent.py@@ -0,0 +1,88 @@+# Import the required libraries+from textwrap import dedent+from phi.assistant import Assistant+from phi.tools.serpapi_tools import SerpApiTools+from phi.tools.newspaper_toolkit import NewspaperToolkit+import streamlit as st++# Set up the Streamlit app+st.title("AI Journalist Agent ποΈ")+st.caption("Generate High-quality articles with AI Journalist by researching, wriritng and editing quality articles on autopilot using GPT-4o")++# Get OpenAI API key from user+openai_api_key = st.text_input("Enter OpenAI API Key to access GPT-4o", type="password")++# Get SerpAPI key from the user+serp_api_key = st.text_input("Enter Serp API Key for Search functionality", type="password")++if openai_api_key and serp_api_key:+ searcher = Assistant(+ name="Searcher",+ role="Searches for top URLs based on a topic",+ description=dedent(+ """\+ You are a world-class journalist for the New York Times. Given a topic, generate a list of 3 search terms+ for writing an article on that topic. Then search the web for each term, analyse the results+ and return the 10 most relevant URLs.+ """+ ),+ instructions=[+ "Given a topic, first generate a list of 3 search terms related to that topic.",+ "For each search term, `search_google` and analyze the results."+ "From the results of all searcher, return the 10 most relevant URLs to the topic.",+ "Remember: you are writing for the New York Times, so the quality of the sources is important.",+ ],+ tools=[SerpApiTools(api_key="649ee0e7d64c6704b8ff92f3b01a424accfe6dbece128d043b17641b875e5f69")],+ add_datetime_to_instructions=True,+ )+ writer = Assistant(+ name="Writer",+ role="Retrieves text from URLs and writes a high-quality article",+ description=dedent(+ """\+ You are a senior writer for the New York Times. Given a topic and a list of URLs,+ your goal is to write a high-quality NYT-worthy article on the topic.+ """+ ),+ instructions=[+ "Given a topic and a list of URLs, first read the article using `get_article_text`."+ "Then write a high-quality NYT-worthy article on the topic."+ "The article should be well-structured, informative, and engaging",+ "Ensure the length is at least as long as a NYT cover story -- at a minimum, 15 paragraphs.",+ "Ensure you provide a nuanced and balanced opinion, quoting facts where possible.",+ "Remember: you are writing for the New York Times, so the quality of the article is important.",+ "Focus on clarity, coherence, and overall quality.",+ "Never make up facts or plagiarize. Always provide proper attribution.",+ ],+ tools=[NewspaperToolkit()],+ add_datetime_to_instructions=True,+ add_chat_history_to_prompt=True,+ num_history_messages=3,+ )++ editor = Assistant(+ name="Editor",+ team=[searcher, writer],+ description="You are a senior NYT editor. Given a topic, your goal is to write a NYT worthy article.",+ instructions=[+ "Given a topic, ask the search journalist to search for the most relevant URLs for that topic.",+ "Then pass a description of the topic and URLs to the writer to get a draft of the article.",+ "Edit, proofread, and refine the article to ensure it meets the high standards of the New York Times.",+ "The article should be extremely articulate and well written. "+ "Focus on clarity, coherence, and overall quality.",+ "Ensure the article is engaging and informative.",+ "Remember: you are the final gatekeeper before the article is published.",+ ],+ add_datetime_to_instructions=True,+ # debug_mode=True,+ markdown=True,+ )++ # Input field for the report query+ query = st.text_input("What do you want the AI journalist to write an Article on?")++ if query:+ with st.spinner("Processing..."):+ # Get the response from the assistant+ response = editor.run(query, stream=False)+ st.write(response)\ No newline at end of filediff --git a/ai_journalist_agent/requirements.txt b/ai_journalist_agent/requirements.txtnew file mode 100644index 00000000..23167611--- /dev/null+++ b/ai_journalist_agent/requirements.txt@@ -0,0 +1,6 @@+streamlit+phidata+openai+google-search-results+newspaper3k+lxml_html_clean\ No newline at end of file