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 henry@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.txt
as 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.py
to 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