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.
- Overview
- Features
- Repository structure
- Requirements
- Installation
- Environment (OpenAI API key / .env)
- Configuration
- Usage
- Outputs
- Development notes
- Contributing
- License
- Contact
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.
- 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/)
- 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
- 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
- Clone the repo: git clone https://github.com/ShreyanshWarde/MultiAgents_DataAnalysis-main2.git
- Enter the project folder: cd MultiAgents_DataAnalysis-main2
- Create and activate a virtual environment: python -m venv venv source venv/bin/activate # macOS / Linux venv\Scripts\activate # Windows
- Install dependencies: pip install -r requirements.txt (If requirements.txt is not present, install the packages listed in Requirements.)
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
.envis listed in .gitignore: Add a line: .env
Security notes:
- Never commit your real API key.
- Use repository secrets in CI.
- 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.
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.
- Visualizations: visualizations/
- Written report: analysis_report.pdf (included)
- 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.
- 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.).
No LICENSE file is included. Add one to declare a license.
Repository owner: https://github.com/ShreyanshWarde