title: Crewai Multiagent Research Tool
emoji: 📈
colorFrom: blue
colorTo: blue
sdk: gradio
sdk_version: 5.9.1
app_file: app.py
pinned: false
license: cc-by-nc-nd-4.0
CrewAI Research Tool
Welcome to the CrewAI Research Tool on Hugging Face Spaces! This tool employs a combination of Gradio, Cohere, CrewAI, and Azure / OpenAI technologies to automate and streamline the process of online research, compiling reports, and extracting data through web crawling.
Description
The CrewAI Research Tool leverages advanced AI capabilities to gather, analyze, and compile information on a wide range of topics, delivering comprehensive and structured reports. It automates the entire research process from web searching to report generation.
Features
- Web Search Automation: Utilizes the DuckDuckGo search engine to perform web searches and gather detailed results related to specified topics.
- Data Extraction and Summarization: Employs web scraping tools and LLMs to extract and summarize web content.
- Detailed Report Generation: Automated agents, defined as 'Researcher' and 'Editor', work sequentially to craft detailed and polished reports based on web findings.
- Interactive Gradio Interface: Users can input their research topic directly into the Gradio interface and initiate the research process with a simple button click.
Tools and Technologies
- CrewAI: Integrates agents with specific roles and tasks to automate complex workflows.
- OpenAI, Azure OpenAI Services and Groq: Employs large language models for deep understanding and generation of content.
- Gradio: Provides an interactive web interface to facilitate easy user interaction with the CrewAI system.
Utility Functions
• setup_logging(): Configures logging to output messages to the console.
• export_to_markdown(result): Saves the generated report to a Markdown file.
• fetch_content(url): Retrieves content from a given URL, handling both PDFs and standard web articles.
Tools
Custom tools are defined to extend the capabilities of the AI agents: • search_results(search_query: str) -> list: Performs a web search using DuckDuckGo and returns a list of results. • web_scrapper(url: str, topic: str) -> str: Extracts and summarizes content from a specified URL related to a given topic.
AI Agents and Tasks
The application defines two primary agents: 1. Researcher: Gathers detailed information on a specified topic using web search and scraping tools. 2. Editor: Compiles and refines the gathered information into a comprehensive report.
Tasks are assigned to these agents to guide their actions: • research_task: Instructs the Researcher to collect and draft information on the topic. • edit_task: Instructs the Editor to refine the draft into a polished report.
Crew Orchestration
The Crew class coordinates the agents and tasks, managing their execution order and interactions.
How to Use
The user interface is built using Gradio, providing interactive elements for user input and displaying results. • Model Selection: Users can choose between different AI models (Azure, OpenAI, Groq-Cohere). • API Key Inputs: Depending on the selected model, relevant API key fields are displayed for user input. • Topic Input: Users enter the research topic they are interested in. • Buttons: ‘Start Research’ initiates the process, and ‘Export to Markdown’ allows users to save the report.
How to Use the Interface: 1. Select a Model: Choose the AI model you wish to use from the ‘Choose Model’ radio buttons. 2. Enter API Keys: Depending on the selected model, input the required API keys in the provided fields. 3. Enter a Topic: Type the research topic into the ‘Enter Topic’ textbox. 4. Start Research: Click the ‘Start Research’ button to initiate the automated research process. 5. View Results: The generated report will appear in the ‘Result’ section. 6. Export Report: To save the report, click the ‘Export to Markdown’ button and download the file.
Contributions and Feedback
Contributions to this project are welcome! Feel free to duplicate the Space, make improvements, and submit a pull request. For feedback and issues, please open an issue in the project's Community tab.
License
This project is licensed under the cc-by-nc-nd-4.0.
Acknowledgments
Special thanks to the open-source projects and APIs that made this tool possible: Gradio, CrewAI, LangChain, Cohere, and DuckDuckGo.