Skip to content

An automated multi-agent system that uses CrewAI's framework to create articles of any subject for a website using the Wikipedia API

Notifications You must be signed in to change notification settings

gabrieltjaeger/multi-agent-article-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi Agent Article Generator

Welcome to the Multi Agent Article Generator project! This system is designed to automatically generate articles on any subject by leveraging the CrewAI framework and the Wikipedia API. Below, you’ll find all the information you need to get started.

📦 Table of Contents


🛠️ Installation

⚙️ Requirements

  • Python ≥ 3.12 and < 3.13
    Ensure you have a compatible Python version installed. You can check your version by running:

    python --version

If you don’t have it installed, download it from the official Python website.

Note: Python 3.13.x is currently not supported due to dependency issues. Please use Python 3.12.x.


🚀 Getting Started

1. Clone the Repository

git clone [email protected]:gabrieltjaeger/multi-agent-article-generator.git && \
cd multi-agent-article-generator

2. Create a Virtual Environment

We recommend using a .venv folder for your virtual environment to keep it hidden and standardized:

python3.12 -m venv .venv

3. Activate the Virtual Environment

  • Linux/macOS:

    source .venv/bin/activate
  • Windows:

    .venv\Scripts\activate

If successfully activated, your terminal prompt will start with (.venv).


4. Install Dependencies

With the virtual environment activated, run:

pip install -r requirements.txt

This will install all necessary packages for the project.


5. Create a .env File

  1. Copy the .env.example file to a new file named .env:
    cp .env.example .env
  2. Open .env and fill in the required environment variables, such as your GEMINI_API_KEY and the GEMINI_MODEL_NAME.

6. Run the Project

Make sure your virtual environment is active, then start the application:

python3 main.py

🧹 Additional Notes

  • Always remember to activate the virtual environment before working on the project.
  • You can deactivate it at any time by running:
    deactivate

💡 Usage Overview

This project provides a FastAPI application that serves a REST API for generating articles. The main entry point is main.py, which initializes the FastAPI app and sets up the necessary routes.

API Endpoints

  1. /api/article/generate
    • Method: GET
    • Description: Generates an article based on the provided topic, returning the content formatted in markdown and a minimal word count of 300 words.
    • Query Parameters:
      • topic (string, required): The topic for which the article should be generated.
    • Response:
      {
        "content": "Generated article content here"
      }
    • Example Request:
       curl -X GET "http://localhost:8000/api/article/generate?topic=Artificial%20Intelligence"
    • Response Example:
      {
        "content": "Artificial Intelligence (AI) is..."
      }

A more detailed description of the API and its endpoints can be found in the swagger documentation, which is automatically generated by FastAPI. You can access it at: http://localhost:8000/docs

About

An automated multi-agent system that uses CrewAI's framework to create articles of any subject for a website using the Wikipedia API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages