Intelligent Data Analysis & Research Assistant Platform
A sophisticated multi-agent AI system that seamlessly processes both structured business data and unstructured research documents through natural language queries and intelligent agent orchestration.
This system addresses the common business challenge of analyzing both structured data (CSV/Excel files) and unstructured research documents (PDFs) through a single, intuitive interface. Instead of switching between different tools, users can ask natural language questions and get intelligent responses with automatic visualizations and insights.
- π§ Intelligent Query Routing: Automatically determines whether your question is about data or research
- π Data Intelligence: Analyzes business data with natural language queries and auto-generated charts
- π Research Assistant: Processes research papers with summarization, keyword extraction, and Q&A
- π¬ Unified Chat Interface: Single interface for all types of queries
- π Interactive Visualizations: Real-time charts and graphs based on your questions
- π Multiple Deployment Options: Local, Docker, and cloud deployment ready
The system follows a multi-agent architecture pattern with three specialized AI agents coordinated by an intelligent orchestrator:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β USER INTERFACE (Streamlit) β
β Natural Language Queries β
βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ
β ORCHESTRATOR AGENT β
β β’ Query Classification β
β β’ Intent Recognition β
β β’ Agent Routing β
β β’ Context Management β
βββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββ
β β
βββββββββββββββΌββββββββββββββ βββββββββββββββΌββββββββββββββββββ
β DATA INTELLIGENCE β β RESEARCH ASSISTANT β
β AGENT β β AGENT β
β β β β
β β’ CSV/Excel Processing β β β’ PDF Text Extraction β
β β’ Pandas Integration β β β’ Document Chunking β
β β’ SQL Query Generation β β β’ Semantic Embeddings β
β β’ Chart Generation β β β’ Vector Search (FAISS) β
β β’ Statistical Analysis β β β’ Summarization β
β β β β’ Keyword Extraction β
βββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ
β β
βββββββββββββββΌββββββββββββββββββββββββββββββββββΌββββββββββββββββββ
β BACKEND API (FastAPI) β
β RESTful endpoints with OpenAPI docs β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π― Orchestrator Agent
- Purpose: Central coordinator that analyzes user queries and routes them to appropriate specialists
- Technology: Custom classification algorithm with keyword analysis and context awareness
- Intelligence: Handles query disambiguation and maintains conversation context
π Data Intelligence Agent
- Purpose: Specializes in structured data analysis and business intelligence
- Technology: Pandas for data processing, Plotly for visualizations, SQLite for storage
- Capabilities: Aggregations, trend analysis, statistical computations, automatic chart generation
π Research Assistant Agent
- Purpose: Handles unstructured document analysis and research tasks
- Technology: PyMuPDF for PDF processing, Sentence Transformers for embeddings, FAISS for vector search
- Capabilities: Document summarization, semantic search, keyword extraction, Q&A
π Unified Interface
- Frontend: Streamlit-based web application with chat interface
- Backend: FastAPI REST API with automatic OpenAPI documentation
- Communication: RESTful API endpoints with JSON data exchange
-
Clone the repository
git clone https://github.com/your-username/multi-agent-ai-system.git cd multi-agent-ai-system -
Install dependencies
pip install -r requirements.txt
-
Run the system
python run.py
-
Access the application
- Frontend: http://localhost:8501
- API Documentation: http://localhost:8000/docs
-
Build and run with Docker Compose
docker-compose up --build
-
Access the services
- Frontend: http://localhost:8501
- Backend API: http://localhost:8000
- Deploy to Streamlit Cloud
- Fork this repository
- Go to share.streamlit.io
- Deploy using
streamlit_app.py
For Data Analysis:
- Upload CSV or Excel files containing your business data
- Supported formats:
.csv,.xlsx,.xls - Examples: sales data, customer information, financial records
For Research Analysis:
- Upload PDF research papers or documents
- The system will automatically extract and process the text
- Creates searchable embeddings for intelligent Q&A
Data Analysis Examples:
"What was the total revenue in Q2?"
"Show me the top 5 customers by sales"
"Plot monthly revenue trends"
"Which product category performs best?"
"Create a bar chart of sales by region"
Research Analysis Examples:
"Summarize this research paper"
"What methodology was used in the study?"
"Extract the key findings"
"What are the main challenges discussed?"
"Find information about machine learning approaches"
The system automatically:
- Routes your query to the appropriate agent
- Processes the request using specialized algorithms
- Generates visualizations, summaries, or answers
- Presents results in an easy-to-understand format
The repository includes sample datasets for testing:
sales_data.csv: 40 sales transactions with product, revenue, and regional datacustomer_data.csv: 30 customer profiles with demographics and purchasing behaviorsample_research_paper.txt: Research paper on computer vision and deep learning
- FastAPI: Modern, fast web framework for building APIs
- Python 3.9+: Core programming language
- Pandas: Data manipulation and analysis
- SQLite: Lightweight database for data storage
- Uvicorn: ASGI server for FastAPI
- Sentence Transformers: Text embeddings for semantic search
- FAISS: Vector similarity search for document retrieval
- NLTK: Natural language processing toolkit
- PyMuPDF: PDF text extraction and processing
- Plotly: Interactive charts and graphs
- Matplotlib: Statistical plotting library
- Seaborn: Statistical data visualization
- Streamlit: Interactive web application framework
- HTML/CSS: Custom styling and responsive design
- Docker: Containerization for consistent deployment
- Docker Compose: Multi-container orchestration
multi-agent-ai-system/
βββ backend/ # FastAPI backend application
β βββ agents/ # AI agent implementations
β β βββ data_intelligence_agent.py
β β βββ research_assistant_agent.py
β β βββ orchestrator_agent.py
β βββ main.py # FastAPI application entry point
β
βββ frontend/ # Streamlit frontend application
β βββ app.py # Full-featured app (with backend)
β βββ app_standalone.py # Standalone app (for cloud deployment)
β
βββ docker/ # Docker configuration
β βββ Dockerfile.backend
β βββ Dockerfile.frontend
β
βββ sample_data/ # Sample datasets for testing
β βββ sales_data.csv
β βββ customer_data.csv
β βββ sample_research_paper.txt
β
βββ .streamlit/ # Streamlit configuration
β βββ config.toml
β
βββ requirements.txt # Python dependencies
βββ streamlit_requirements.txt # Streamlit Cloud dependencies
βββ docker-compose.yml # Container orchestration
βββ streamlit_app.py # Cloud deployment entry point
βββ run.py # Local development launcher
Create a .env file for custom configuration:
# API Configuration
API_HOST=0.0.0.0
API_PORT=8000
STREAMLIT_PORT=8501
# Development
DEBUG=False
LOG_LEVEL=INFO- Agent Behavior: Modify agent parameters in respective Python files
- UI Styling: Update CSS in the Streamlit app files
- Data Processing: Extend the data intelligence agent for custom analysis
- Document Processing: Enhance the research assistant for specific document types
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- FastAPI: For the excellent modern web framework
- Streamlit: For making web app development incredibly simple
- Sentence Transformers: For powerful text embeddings
- Plotly: For beautiful interactive visualizations
- The Open Source Community: For the amazing tools and libraries
If you encounter any issues or have questions:
- Check the existing Issues
- Create a new issue with detailed information
- Include steps to reproduce any problems
Built with β€οΈ for intelligent data analysis and research assistance
Transform your data analysis workflow with the power of AI agents working together seamlessly.