--- title: Web3WealthManagement emoji: 🏆 colorFrom: purple colorTo: indigo sdk: gradio sdk_version: 5.33.0 app_file: app.py pinned: true license: apache-2.0 short_description: AI-powered Web3 portfolio management and risk analysis tags: - agent-demo-track --- # 🏆 Web3WealthManagement [![Demo Video](https://img.shields.io/badge/🎥-Watch%20Demo-red?style=for-the-badge)](https://www.youtube.com/watch?v=rgSSn563c_w) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=for-the-badge)](LICENSE) [![Python](https://img.shields.io/badge/Python-3.9+-green.svg?style=for-the-badge)](https://python.org) > An innovative, AI-powered platform that empowers cryptocurrency investors with personalized insights and expert guidance through a sophisticated multi-agent system. ## 🎥 Video Demo *https://www.youtube.com/watch?v=rgSSn563c_w* ## 📋 Table of Contents - [🚀 Introduction](#-introduction) - [✨ Key Features](#-key-features) - [🏗️ System Architecture](#️-system-architecture) - [🏁 Quick Start](#-quick-start) - [⚙️ Configuration](#️-configuration) - [🛠️ Technologies](#️-technologies) - [📊 Usage Examples](#-usage-examples) - [🤝 Contributing](#-contributing) - [📄 License](#-license) ## 🚀 Introduction **Web3WealthManagement** simplifies the complex world of Web3 investments by providing a structured approach to risk assessment and portfolio management through an intuitive Gradio interface. The platform leverages advanced AI agents to deliver personalized investment strategies tailored to your risk tolerance and portfolio composition. ### Why Web3WealthManagement? - **Personalized Approach**: Tailored recommendations based on your unique risk profile - **Real-time Data**: Live blockchain data integration via Etherscan API - **AI-Powered Insights**: Advanced analysis using Mistral LLM - **User-Friendly Interface**: Intuitive Gradio-based web application - **Comprehensive Analysis**: Multi-dimensional portfolio evaluation ## ✨ Key Features ### 🎯 Core Capabilities | Feature | Description | Benefits | |---------|-------------|----------| | **Risk Assessment** | Comprehensive survey-based risk profiling | Accurate determination of investment personality | | **Portfolio Import** | Automated Ethereum wallet integration | Seamless asset tracking and analysis | | **Portfolio Analysis** | Advanced volatility and diversification metrics | Data-driven investment insights | | **AI Consultation** | Natural language advisor with search capabilities | Personalized, context-aware recommendations | ### 📈 Supported Assets - **ETH** (Ethereum) - **ERC20 Tokens**: USDC, DAI, USDT, LINK - **Sample Wallets**: Pre-configured wallets for testing ### 🔍 Analysis Metrics - Portfolio volatility assessment - Asset concentration analysis - Diversification scoring - Risk-profile alignment evaluation ## 🏗️ System Architecture ```mermaid graph TD A[User Input] --> B[Risk Survey Agent] B --> C[Portfolio Import Agent] C --> D[Analysis Agent] D --> E[Expert Consulting Agent] E --> F[Recommendations] G[Etherscan API] --> C H[Mistral AI] --> E I[SerpAPI] --> E ``` ### Agent Workflow 1. **Risk Survey Agent** 📊 - Collects investment preferences - Calculates risk profile (Conservative/Moderate/Aggressive) - Validates user responses 2. **Portfolio Import Agent** 💼 - Fetches Ethereum asset balances - Integrates with Etherscan API - Handles API rate limiting and errors 3. **Analysis Agent** 🔬 - Processes portfolio data against risk profile - Generates comprehensive analysis reports - Calculates key performance metrics 4. **Expert Consulting Agent** 🤖 - Provides context-aware advice - Performs external research via Google Search - Maintains conversation context ## 🏁 Quick Start ### Prerequisites Ensure you have the following installed and configured: - **Python 3.9+** ([Download](https://python.org/downloads/)) - **Git** ([Download](https://git-scm.com/downloads/)) ### Installation 1. **Clone the repository** ```bash git clone https://github.com/your-username/Web3WealthManagement.git cd Web3WealthManagement ``` 2. **Create virtual environment** (Recommended) ```bash python -m venv venv # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate ``` 3. **Install dependencies** ```bash pip install -r requirements.txt ``` ### ⚙️ Configuration #### API Keys Setup Create a [`.env`](.env) file in the project root: ```env # Required API Keys ETHERSCAN_API_KEY=your_etherscan_api_key_here MISTRAL_API_KEY=your_mistral_api_key_here SERPAPI_API_KEY=your_serpapi_api_key_here # Optional Configuration DEBUG_MODE=false LOG_LEVEL=INFO ``` #### Obtaining API Keys | Service | Purpose | How to Get | |---------|---------|------------| | [Etherscan](https://etherscan.io/apis) | Blockchain data | Free registration required | | [Mistral AI](https://console.mistral.ai/) | LLM capabilities | API key from dashboard | | [SerpAPI](https://serpapi.com/) | Google Search | Free tier available | ### 🚀 Running the Application ```bash python app.py ``` The application will start and display: ``` Running on local URL: http://127.0.0.1:7860 ``` Open the URL in your browser to access the Web3WealthManagement interface. ## 🛠️ Technologies ### Core Stack - **[Python 3.9+](https://python.org)** - Primary programming language - **[Gradio](https://gradio.app)** - Interactive web interface framework - **[Smolagents](https://github.com/huggingface/smolagents)** - Multi-agent system framework ### AI & APIs - **[Mistral AI](https://mistral.ai)** - Large language model for expert consultation - **[Etherscan API](https://etherscan.io/apis)** - Ethereum blockchain data retrieval - **[SerpAPI](https://serpapi.com)** - Google search integration ### Dependencies ```txt gradio>=5.33.0 smolagents>=0.1.0 python-dotenv>=1.0.0 requests>=2.31.0 ``` ## 📊 Usage Examples ### Basic Workflow 1. **Complete Risk Assessment** - Answer investment preference questions - Receive risk profile classification 2. **Import Portfolio** - Enter Ethereum wallet address - Review imported assets 3. **Analyze Portfolio** - View comprehensive analysis report - Understand risk alignment 4. **Consult AI Expert** - Ask specific investment questions - Receive personalized recommendations ### Sample Wallet Addresses For testing purposes, you can use these sample addresses: ``` Vitalik Buterin: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 Ethereum Foundation: 0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe ``` ## 🔒 Security Considerations - **API Key Protection**: Never commit API keys to version control - **Rate Limiting**: Implement proper API rate limiting - **Input Validation**: Validate all user inputs and wallet addresses - **Error Handling**: Graceful handling of API failures and network issues ## 🤝 Contributing We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details. ### Development Setup 1. Fork the repository 2. Create a feature branch: `git checkout -b feature-name` 3. Make your changes and add tests 4. Commit your changes: `git commit -am 'Add feature'` 5. Push to the branch: `git push origin feature-name` 6. Submit a pull request ## 📄 License This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details. ---
**Built with ❤️ for the Web3 community** [Report Bug](https://github.com/your-username/Web3WealthManagement/issues) • [Request Feature](https://github.com/your-username/Web3WealthManagement/issues) • [Documentation](https://github.com/your-username/Web3WealthManagement/wiki)