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.
-
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.
git clone [email protected]:gabrieltjaeger/multi-agent-article-generator.git && \
cd multi-agent-article-generatorWe recommend using a .venv folder for your virtual environment to keep it hidden and standardized:
python3.12 -m venv .venv-
Linux/macOS:
source .venv/bin/activate -
Windows:
.venv\Scripts\activate
If successfully activated, your terminal prompt will start with (.venv).
With the virtual environment activated, run:
pip install -r requirements.txtThis will install all necessary packages for the project.
- Copy the
.env.examplefile to a new file named.env:cp .env.example .env
- Open
.envand fill in the required environment variables, such as yourGEMINI_API_KEYand theGEMINI_MODEL_NAME.
Make sure your virtual environment is active, then start the application:
python3 main.py- Always remember to activate the virtual environment before working on the project.
- You can deactivate it at any time by running:
deactivate
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/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..." }
- Method:
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