himanishbajaj0127/FashionAgent
If you are the rightful owner of FashionAgent and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
FashionAgent is an AI-driven solution designed to enhance forecasting and decision-making in the fashion retail industry.
FashionAgent: AI-Powered Fashion Retail Forecasting
📖 Introduction
FashionAgent is an AI-driven solution designed to enhance forecasting and decision-making in the fashion retail industry. By integrating various data sources, it provides actionable insights to optimize inventory management and sales strategies.
🛠️ Setup Instructions
1. Clone the Repository
git clone https://github.com/yourusername/FashionAgent.git
cd FashionAgent_HybridSetup_Prod_Repo
2. Create a Virtual Environment
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
3. Configure Environment Variables
Edit run_mcp.sh to set your Salesforce, Azure SQL, Snowflake, and Slack credentials. The script includes placeholders for the following environment variables:
SALESFORCE_USERNAME: Your Salesforce usernameSALESFORCE_PASSWORD: Your Salesforce passwordSALESFORCE_TOKEN: Your Salesforce security tokenAZURESQL_CONN: Your Azure SQL connection stringSNOWFLAKE_CONN: Your Snowflake connection string (format: "user=username password=password account=account warehouse=warehouse database=database schema=schema")SLACK_WEBHOOK: Your Slack webhook URLMCP_URL: MCP server URL (default: "http://localhost:8000")MCP_API_KEY: Optional API key for MCP authenticationSF_OBJECT: Salesforce object to query (default: "Opportunity")EXCEL_FOLDER: Path to Excel files (default: "/dbfs/mnt/excel_drop")HORIZON: Forecast horizon in days (default: 28)
4. Run the MCP Server
bash run_mcp.sh
This will start a FastAPI MCP server at http://localhost:8000.
5. Upload to Databricks
- Go to Databricks CE
- Create a cluster (Python 3.x, small node)
- Import
orchestrator.py - Attach
requirements.txtas a library - Run the job
6. View Forecasts & Alerts
- Forecast outputs are stored in Delta tables (Databricks).
- Slack alerts are sent to the configured channel.
📊 Example Workflow
- Fetch CRM data from Salesforce Sandbox.
- Load inventory sheets from Excel (Google Drive/local).
- Query sales transactions from Azure SQL.
- Fetch warehouse stock from Snowflake.
- Merge data into a single feature store.
- Run
demand_forecaster.pyto predict demand. - Compare demand vs. stock.
- Trigger a Slack alert if stock shortage is predicted.
🧑💻 Tech Stack
- Databricks (Spark Orchestration)
- MCP Protocol (local FastAPI server)
- Salesforce Sandbox (CRM)
- Azure SQL, Snowflake, Excel (data sources)
- PySpark, Pandas, MLlib (forecasting)
- Slack API (alerts)
📌 Next Steps
- Extend MCP to support tool manifests for external apps.
- Add real-time API triggers instead of batch processing.
- Deploy the MCP server on Azure App Service for scalability.
✅ With this setup, you can demo an enterprise-grade AI Agent that resonates with fashion industry recruiters and product-based companies.
📁 Project Structure
FashionAgent/
├── README.md # Project documentation
├── requirements.txt # Python dependencies
├── agent/ # Main agent module
│ ├── agent.py # Main agent class and logic
│ ├── config.py # Configuration management
│ ├── logging_conf.py # Logging configuration
│ ├── mcp_client.py # MCP client implementation
│ ├── orchestrator.py # Workflow orchestration
│ ├── actions/ # Action handlers
│ │ └── alert.py # Alert generation and handling
│ ├── connectors/ # Data source connectors
│ │ ├── __init__.py
│ │ ├── azuresql_connector.py # Azure SQL connector
│ │ ├── excel_connector.py # Excel file connector
│ │ ├── pos_connector.py # POS system connector
│ │ ├── salesforce_connector.py # Salesforce CRM connector
│ │ ├── snowflake_connector.py # Snowflake data warehouse connector
│ │ └── social_connector.py # Social media data connector
│ └── forecasting/ # Forecasting module
│ ├── __init__.py
│ ├── features.py # Feature engineering
│ └── model.py # ML model implementation
└── mcp_server/ # MCP server implementation
└── app.py # FastAPI MCP server application
This structure organizes the code into logical modules:
- agent/: Core AI agent functionality
- connectors/: Data source integrations
- forecasting/: Machine learning and prediction logic
- mcp_server/: Model Context Protocol server
- actions/: Specific action implementations