How scarwizz/moic_inventory_management works
MOIC is a supply-chain decision system with an offline data-to-surrogate pipeline and an online natural-language inventory-analysis workflow. A manager submits a query through Streamlit; the LangGraph agent can retrieve a SKU demand profile, estimate policy outcomes, calculate financial impact, and return a grounded response with an execution trace. The graph also preserves the documented aggregation, feature-engineering, simulation, and model-training stages. Some pipeline handoffs are documented in code, while CatBoost and the Groq model are described only in the README; those links are cited there.
Main entry points: agent_core.py LangGraph agent · data_aggregation.py Sales aggregation · feature_engineering.py Demand features · simulation.py Policy simulation
Components 14
Offline data pipeline
- Sales preparation
dataprep.py - Sales aggregation
data_aggregation.py - Demand features
feature_engineering.py - Policy simulation
simulation.py - Demand feature CSV
Dataset/m5_demand_features.csv - Simulation training data
Dataset
Surrogate models
- Surrogate training
train_surrogates.py
Agent runtime
- LangGraph agent
agent_core.py - SKU profile lookup
sku_store.py - Policy and cost tools
inventory_tools.py
User interface
- Streamlit dashboard
app.py
Other components
- Supply manager
- Groq Llama model
- M5 sales data
Connections 16
- Supply manager → Streamlit dashboard: submits query
README.md - Streamlit dashboard → LangGraph agent: invokes agent
app.py - LangGraph agent → Groq Llama model: reasons with
README.md - LangGraph agent → SKU profile lookup: dispatches lookup
agent_core.py - LangGraph agent → Policy and cost tools: dispatches tools
agent_core.py - M5 sales data → Sales preparation: reads sales
dataprep.py - M5 sales data → Sales aggregation: reads sales
data_aggregation.py - Sales aggregation → Demand features: provides series
feature_engineering.py - Demand features → Demand feature CSV: writes profiles
feature_engineering.py - Demand feature CSV → SKU profile lookup: loads profiles
sku_store.py - Demand features → Policy simulation: supplies features
simulation.py - Sales aggregation → Policy simulation: supplies sales
simulation.py - Policy simulation → Simulation training data: writes targets
simulation.py - Simulation training data → Surrogate training: loads observations
README.md - Surrogate training → Policy and cost tools: exports predictors
README.md - Policy and cost tools → Demand feature CSV: uses demand profile
README.md