An intelligent multi-agent system for inventory management, financial analysis, and business decision-making using LangGraph, OpenAI, and weather forecasting.
Live Demo: https://aiinventory.streamlit.app/
Portfolio: https://prachi-gore-portfolio.netlify.app/
AI Inventory Assistant helps inventory and finance teams ask natural-language questions, inspect stock and sales data, get weather-aware reorder recommendations, and manage restocking tickets from one Streamlit dashboard.
- Multi-Agent AI System: Orchestrated using LangGraph for complex decision-making
- Financial Analysis: Automated financial summaries, profit/loss tracking, revenue analysis
- Inventory Management: Real-time stock tracking, low-stock alerts, reorder recommendations
- Weather Integration: Weather-based demand forecasting and inventory planning
- Ticket Management: Automated vendor ticketing for restocking and issues
- Interactive Dashboard: Streamlit-based web interface for visualization
- Conversation Memory: Maintains context across interactions
- Coordinator Agent (LangGraph): Orchestrates workflow between agents
- Decision Agent: Makes inventory and financial recommendations
- Report Agent: Generates data reports and summaries
┌─────────────────────────────────────────────────────────────┐
│ User Interface │
│ (Streamlit Web App / CLI) │
└────────────────────┬────────────────────────────────────────┘
│
┌────────────▼────────────┐
│ 1. CLASSIFY Intent │
│ (LLM Classification) │
└────────────┬────────────┘
│
┌────────────▼────────────┐
│ 2. GATHER Data │
│ (Report Agent) │
└────────────┬────────────┘
│
┌────────────▼────────────┐
│ 3. DECIDE (Optional) │
│ (Decision Agent + AI) │
└────────────┬────────────┘
│
┌────────────▼────────────┐
│ 4. RESPOND Format │
│ (User-friendly text) │
└─────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ Coordinator (LangGraph - 341 lines) │
│ Classify → Gather → Decide → Respond │
└─────┬──────────────────────────────┬─────────────────┬──────┘
│ │ │
┌─────▼─────────┐ ┌─────────────▼──────┐ ┌──────▼──────┐
│ Decision Agent│ │ Report Agent │ │ Data Pipeline│
│ (OpenAI LLM) │ │ (Data Analysis) │ │ (Processing) │
│ - Reorder Rec │ │ - Inventory │ │ - Aggregates│
│ - Vendor Sel │ │ - Financial │ │ - Caching │
│ - Weather Fcs │ │ - Sales │ │ │
│ + MCP Tools │ │ - Tickets │ │ │
└─────┬─────────┘ └─────────────┬──────┘ └──────┬──────┘
│ │ │
┌─────▼──────────────────────────────▼─────────────────▼──────┐
│ Services & Tools Layer │
│ ┌──────────┐ ┌──────────┐ ┌─────────────┐ │
│ │ Finance │ │ Weather │ │ Tickets │ │
│ │ Tool │ │ Tool │ │ Manager │ │
│ └──────────┘ └──────────┘ └─────────────┘ │
└──────────────────────────┬───────────────────────────────────┘
│
┌──────────────────────────▼───────────────────────────────────┐
│ Database Layer │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ SQLite │ │ Memory │ │ CSV │ │
│ │ (inventra.db)│ │ (Conversations)│ │ (Seed Data) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└──────────────────────────────────────────────────────────────┘
The system uses SQLite database located at database/inventra.db. It includes:
- Inventory: Product stock levels and details
- Sales: Historical sales transactions
- Finance: Financial transactions (sales, purchases)
- Vendors: Vendor information
- Tickets: Reorder and issue tickets
- Forecasts: Weather-based demand forecasts
inventra/
├── agents/ # AI Agents (LLM-powered)
│ ├── coordinator.py # LangGraph orchestrator
│ ├── decision_agent.py # Business decision making
│ └── report_agent.py # Data aggregation & reports
│
├── services/ # Business Logic & Workflows
│ ├── data_pipeline.py # Data aggregation
│ ├── forecast_updater.py # Weather-based forecasting
│ └── ticket_manager.py # Ticket lifecycle management
│
├── tools/ # Utility Functions
│ ├── finance.py # Financial calculations
│ ├── weather.py # Weather API integration
│ └── export.py # Data export utilities
│
├── database/ # Data Persistence Layer
│ ├── db_manager.py # SQLite operations
│ ├── memory_manager.py # Conversation history
│ ├── seed_db.py # Database initialization
│ ├── inventra.db # SQLite database
│ ├── schema.sql # Database schema
│ └── data/ # CSV seed files
│
├── integrations/ # External Integrations
│ └── mcp_tools.py # MCP protocol tools
│
├── config/ # Configuration
│ ├── settings.py # Environment settings
│ └── logger.py # Logging configuration
│
├── ui/ # User Interface
│ └── streamlit_app.py # Streamlit web app
│
├── main.py # Application entry point
├── requirements.txt # Python dependencies
├── .env.example # Environment template
└── README.md # This file
- "Show me the financial summary"
- "What's our profit margin?"
- "Give me sales breakdown by region"
- "Show revenue trends"
- "What items are low in stock?"
- "Check inventory for North region"
- "Which products need reordering?"
- "Show me all electronics inventory"
- "Give me reorder recommendations"
- "What should I stock for monsoon season?"
- "Suggest vendors for restocking"
- "Analyze sales opportunities"
- "Show pending tickets"
- "What tickets need attention?"
- "List all vendor tickets"
This is an educational and portfolio project. Feel free to:
- Report issues
- Suggest improvements
- Fork and extend functionality