MOFA-Shopping is an intelligent shopping assistant application designed to help users select products from different e-commerce platforms and provide personalized shopping recommendations. By leveraging the advanced open-source frameworks MOFA and dora-rs's dataflow technology, we have built an efficient, modular, and flexible system that intelligently gathers and analyzes user needs to provide the best shopping options.
Our goal is to solve the issues of information overload and choice paralysis that users face while shopping on e-commerce platforms. MOFA-Shopping uses an intelligent multi-Agent architecture to connect multiple data sources and automate the process of retrieving product information from websites, reducing decision fatigue and providing personalized shopping advice. Users only need to express their needs simply, and MOFA-Shopping will use sub-Agents to fetch product data from various platforms, analyze it, and return the most suitable recommendations.
- MOFA
MOFA is our core framework, supporting the construction of flexible multi-Agent systems. The entire shopping recommendation system is built on this framework, ensuring that various sub-modules (such as data acquisition, analysis, etc.) can work together efficiently.
- dora-rs Dataflow
To achieve efficient and scalable data flow interactions between sub-modules, we use dora-rs's dataflow. Through data flow management, we ensure that data retrieved from different platforms is smoothly passed to the main Agent for analysis and ultimately generates recommendations.
- Streamlit UI: User-Friendly Interface for Shopping Assistance
With Streamlit, users can interact with the shopping assistant application in real-time via their browser. Streamlit provides a simple and intuitive front-end interface, allowing users to input their needs. The system then fetches product information from multiple e-commerce platforms in real-time via backend connections and dynamically displays the recommendation results to the user. Streamlit's front-end and back-end separation design ensures a smooth user experience, where all data fetching and analysis occur in the background while the user can easily browse the recommended products through an interactive interface. With components like input boxes, buttons, and filters, users can quickly adjust their needs and instantly see updated recommendations.
- User Inputs a Requirement: The user expresses their needs to the main Agent in natural language (e.g., "I need a high-performance Bluetooth headset").
- Main Agent Calls Sub-Agents: Based on the user's needs, the main Agent assigns the task to the appropriate sub-Agent, which starts fetching relevant product data from various e-commerce sites (such as Amazon, worldmarket, balsamhill, etc.).
- Data Aggregation and Analysis: The sub-Agent returns the fetched data to the main Agent, which cleans and analyzes the data, combining it with the user's needs to generate the most suitable list of recommendations.
- Feedback to the User: Finally, the main Agent provides the recommendation results to the user, helping them make a purchase decision.
- Modular Architecture: Based on MOFA and dora-rs, the system has a highly modular design, making it easy to expand and integrate more sub-Agents to support more e-commerce platforms and product types.
- Intelligent Analysis: The main Agent is not just a data aggregator; it also deeply analyzes the user's preferences, purchase history, and other factors to provide the most accurate shopping suggestions.
- Open Source: We have decided to open-source MOFA-Shopping and welcome community contributions to improve the system and support more features.
Clone the MOFA-Shopping Project
Clone the project and switch to the main branch:
git clone https://github.com/chengzi0103/mofa_berkeley_hackathon.git && git checkout main
Navigate to the project folder:
cd mofa_berkeley_hackathon
Use Python 3.10 or later: If there is a version mismatch, reinstall the environment with conda. For example:
conda create -n shopping-agent python=3.10 conda activate shopping-agent
Install the environment dependencies:
cd python && pip3 install -r requirements.txt && pip3 install -e .
Once installed, you can use the mofa --help
command to view the CLI help information.
Rust and Dora-RS Installation Since the underlying Dora-RS computation framework is developed in Rust, please visit the following page to install Rust based on your operating system: https://www.rust-lang.org/tools/install
Then, install Dora-RS:
cargo install dora-cli --locked
Since dora-rs is developed in Rust, please ensure that Rust is installed on your system.
- First, navigate to the
python/berkeley-hackathon/shopping_agents
directory. - Create a file named
.env.secret
in this directory with the following structure:
API_KEY=
- Run the command
dora up && dora build shopping_dataflow.yml && dora start shopping_dataflow.yml --attach
in the current directory. - In another terminal window, run
hitl-agent
. - In a separate terminal, use
cd /mofa_berkeley_hackathon/python/berkeley-hackathon/ui && streamlit run socket_client.py
to open the page. Make sure that port 12345 is not in use. If it is, uselsof -i :12345
to find the process ID and kill it withkill -9
.
Visit http://localhost:8501
to start using MOFAagent.
- Multi-Platform Support: We plan to expand support for more e-commerce platforms, enabling the retrieval of more product data and providing users with a wider range of options.
- Deep Learning Optimization: We aim to optimize the product recommendation algorithm by incorporating deep learning techniques to make recommendations more intelligent.
- Personalized Features: Based on users' shopping history, preferences, and other factors, we aim to offer more personalized shopping suggestions.
We welcome contributions in any form, including but not limited to:
- Reporting bugs and suggesting features
- Submitting code optimizations or new features
- Writing documentation and tutorials
MIT License. See LICENSE for more details.