CoolFace
Apppublic

Agents-MCP-Hackathon/Web3WealthManagement

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
2likes
App README

๐Ÿ† Web3WealthManagement

![Demo Video](https://www.youtube.com/watch?v=rgSSn563c_w) ![License](LICENSE) ![Python](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

<iframe width="560" height="315" src="https://www.youtube.com/embed/rgSSn563c_w?si=Q1txXjioDkiO1L3w" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

https://www.youtube.com/watch?v=rgSSn563c_w

๐Ÿ“‹ Table of Contents

๐Ÿš€ 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

FeatureDescriptionBenefits
Risk AssessmentComprehensive survey-based risk profilingAccurate determination of investment personality
Portfolio ImportAutomated Ethereum wallet integrationSeamless asset tracking and analysis
Portfolio AnalysisAdvanced volatility and diversification metricsData-driven investment insights
AI ConsultationNatural language advisor with search capabilitiesPersonalized, 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. 1.Risk Survey Agent ๐Ÿ“Š
  2. 2.Collects investment preferences
  3. 3.Calculates risk profile (Conservative/Moderate/Aggressive)
  4. 4.Validates user responses
  1. 1.Portfolio Import Agent ๐Ÿ’ผ
  2. 2.Fetches Ethereum asset balances
  3. 3.Integrates with Etherscan API
  4. 4.Handles API rate limiting and errors
  1. 1.Analysis Agent ๐Ÿ”ฌ
  2. 2.Processes portfolio data against risk profile
  3. 3.Generates comprehensive analysis reports
  4. 4.Calculates key performance metrics
  1. 1.Expert Consulting Agent ๐Ÿค–
  2. 2.Provides context-aware advice
  3. 3.Performs external research via Google Search
  4. 4.Maintains conversation context

๐Ÿ Quick Start

Prerequisites

Ensure you have the following installed and configured:

Installation

  1. 1.Clone the repository
bash
   git clone https://github.com/your-username/Web3WealthManagement.git
   cd Web3WealthManagement
  1. 1.Create virtual environment (Recommended)
bash
   python -m venv venv
   
   # Windows
   venv\Scripts\activate
   
   # macOS/Linux
   source venv/bin/activate
  1. 1.Install dependencies
bash
   pip install -r requirements.txt

โš™๏ธ Configuration

API Keys Setup

Create a `.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
ServicePurposeHow to Get
EtherscanBlockchain dataFree registration required
Mistral AILLM capabilitiesAPI key from dashboard
SerpAPIGoogle SearchFree 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. 1.Complete Risk Assessment
  2. 2.Answer investment preference questions
  3. 3.Receive risk profile classification
  1. 1.Import Portfolio
  2. 2.Enter Ethereum wallet address
  3. 3.Review imported assets
  1. 1.Analyze Portfolio
  2. 2.View comprehensive analysis report
  3. 3.Understand risk alignment
  1. 1.Consult AI Expert
  2. 2.Ask specific investment questions
  3. 3.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 for details.

Development Setup

  1. 1.Fork the repository
  2. 2.Create a feature branch: git checkout -b feature-name
  3. 3.Make your changes and add tests
  4. 4.Commit your changes: git commit -am 'Add feature'
  5. 5.Push to the branch: git push origin feature-name
  6. 6.Submit a pull request

๐Ÿ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


<div align="center">

Built with โค๏ธ for the Web3 community

Report Bug โ€ข Request Feature โ€ข Documentation

</div>