dromerosm's picture
sync
40959c4

A newer version of the Gradio SDK is available: 5.22.0

Upgrade
metadata
title: CrewAI Multiagent Research Tool
emoji: πŸ“ˆ
colorFrom: blue
colorTo: blue
sdk: gradio
sdk_version: 5.9.1
app_file: app.py
pinned: true
license: cc-by-nc-nd-4.0

CrewAI Multiagent Research Tool

Welcome to the CrewAI Research Tool on Hugging Face Spaces! This tool leverages Gradio, Cohere, CrewAI, and Azure/OpenAI technologies to automate and streamline online research, compile reports, and extract data through web crawling.

πŸ“ Description

The CrewAI Research Tool uses advanced AI capabilities to:

  • Gather, analyze, and compile information on various topics.
  • Deliver comprehensive, structured reports.
  • Automate the research process, from web searching to report generation.

πŸš€ Features

  • Web Search Automation:
    • Uses the DuckDuckGo search engine to perform searches and gather detailed results.
  • Data Extraction and Summarization:
    • Extracts and summarizes web content using web scraping tools and LLMs.
  • Detailed Report Generation:
    • Agents like 'Researcher' and 'Editor' sequentially craft polished reports based on findings.
  • Interactive Gradio Interface:
    • Allows users to input research topics and generate reports with a single button click.

πŸ›  Tools and Technologies

  • CrewAI:
    • Orchestrates agents with specific roles to automate workflows.
  • OpenAI, Azure OpenAI Services, and Groq:
    • Employs large language models for understanding and content generation.
  • Gradio:
    • Provides an intuitive web interface for user interaction.

βš™οΈ 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 URL, handling both PDFs and web articles.

Custom Tools

  • 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 URL related to a topic.

πŸ€– AI Agents and Tasks

Agents

  1. Researcher: Gathers detailed information on a specified topic using search and scraping tools.
  2. Editor: Refines the collected data into a structured, polished report.

Tasks

  • research_task: Directs the Researcher to collect and draft information.
  • edit_task: Guides the Editor to refine drafts into final reports.

🧠 Crew Orchestration

The Crew class manages agents and tasks, ensuring proper execution order and seamless interactions.

πŸ’» How to Use

The user interface, built with Gradio, includes:

  • Model Selection: Choose between AI models (Azure, OpenAI, Groq-Cohere).
  • API Key Inputs: Provide necessary API keys for the selected model.
  • Topic Input: Enter the research topic.
  • Buttons:
    • Start Research: Initiates the research process.
    • Export to Markdown: Saves the report as a Markdown file.

Steps

  1. Select a Model: Use the radio buttons to choose your preferred AI model.
  2. Enter API Keys: Fill in the required API keys based on the model.
  3. Enter a Topic: Type your research topic into the textbox.
  4. Start Research: Click the button to generate the report.
  5. View Results: See the generated report in the output section.
  6. Export Report: Save the report as a Markdown file for future reference.

🌟 Contributions and Feedback

We welcome contributions!

  • Duplicate this Space, make improvements, and submit a pull request.
  • For feedback and issues, 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:

And of course to Hugging Face!! πŸ€—