Skip to content

About

Python-based multi-agent data analysis pipeline that uses OpenAI's LLM to coordinate intelligent agents for analyzing data, generating visualizations, and producing a comprehensive written analysis report.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

MultiAgents_DataAnalysis

A Python project implementing a multi‑agent data‑analysis pipeline that leverages an LLM for agent tasks, produces visualizations, and includes a written analysis report.

Table of Contents

  • Overview
  • Features
  • Repository structure
  • Requirements
  • Installation
  • Environment (OpenAI API key / .env)
  • Configuration
  • Usage
  • Outputs
  • Development notes
  • Contributing
  • License
  • Contact

Overview

This repository coordinates multiple agents to analyze data and produce visualizations and a final analysis report. An OpenAI LLM is used by the agents; its credentials are provided via environment variables.

Features

  • Multi-agent orchestration (agents.py)
  • Central configuration for LLM usage (config.py)
  • Utilities for data handling and plotting (utils.py)
  • System message templates used by agents (system_messages.py)
  • Exported analysis report (analysis_report.pdf)
  • Saved visualizations (visualizations/)

Repository structure

  • agents.py — agent implementations and orchestration
  • main.py — entry point to run experiments / pipeline
  • config.py — loads .env and defines llm_config (model, temperature, api_key, max_tokens)
  • utils.py — helper functions (data loading, processing, plotting)
  • system_messages.py — message templates used by agents
  • visualizations/ — generated plots (output)
  • analysis_report.pdf — final written report
  • .gitignore
  • .env.example (recommended)
  • README.md

Requirements

  • Python 3.8+
  • Python packages likely used by the project: python-dotenv, pandas, numpy, matplotlib, seaborn, scikit-learn, requests (check imports)
  • If a requirements.txt is not included, generate one from your environment or install packages manually: pip install python-dotenv pandas numpy matplotlib seaborn scikit-learn

Installation

  1. Clone the repo: git clone https://github.com/ShreyanshWarde/MultiAgents_DataAnalysis-main2.git
  2. Enter the project folder: cd MultiAgents_DataAnalysis-main2
  3. Create and activate a virtual environment: python -m venv venv source venv/bin/activate # macOS / Linux venv\Scripts\activate # Windows
  4. Install dependencies: pip install -r requirements.txt (If requirements.txt is not present, install the packages listed in Requirements.)

Environment (OpenAI API key / .env)

config.py calls load_dotenv() and reads the OPENAI_API_KEY environment variable. You must provide your OpenAI API key via environment variables or a .env file.

Recommended local setup (create a .env at repo root — DO NOT commit this file):

.env OPENAI_API_KEY=sk-REPLACE_WITH_YOUR_KEY

Alternative ways to provide the key:

  • macOS / Linux: export OPENAI_API_KEY="sk-..."
  • Windows PowerShell: $env:OPENAI_API_KEY="sk-..."
  • CI / GitHub Actions: add OPENAI_API_KEY as a repository secret and reference it in the workflow.

Recommended committed helper files:

  • .env.example (commit this file with placeholder value) Example .env.example: OPENAI_API_KEY=your_openai_api_key_here

  • Ensure .env is listed in .gitignore: Add a line: .env

Security notes:

  • Never commit your real API key.
  • Use repository secrets in CI.

Configuration

  • config.py contains llm_config:
    • model (default: "gpt-4")
    • temperature
    • api_key (read from OPENAI_API_KEY)
    • max_tokens
  • Edit config.py or set environment variables to change behavior.

Usage

Run the main pipeline: python main.py

Check main.py for any CLI flags or additional parameters. Output files (visualizations, logs) are saved to the visualizations/ folder by default.

Outputs

  • Visualizations: visualizations/
  • Written report: analysis_report.pdf (included)

Development notes

  • Ensure python-dotenv is installed (pip install python-dotenv) so load_dotenv() works.
  • If you want, I can generate requirements.txt by scanning imports.
  • Tests are not included — consider adding unit tests for utils and agent behavior.

Contributing

  • Open issues or submit pull requests.
  • Add a CONTRIBUTING.md if you want contribution guidelines.
  • Add a LICENSE file to define reuse and distribution terms (MIT, Apache‑2.0, etc.).

License

No LICENSE file is included. Add one to declare a license.

Contact

Repository owner: https://github.com/ShreyanshWarde

About

Python-based multi-agent data analysis pipeline that uses OpenAI's LLM to coordinate intelligent agents for analyzing data, generating visualizations, and producing a comprehensive written analysis report.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages