YI Zhongyue commited on
Commit
7f72cbd
Β·
1 Parent(s): 93360b5

update README.py

Browse files
Files changed (1) hide show
  1. README.md +85 -1
README.md CHANGED
@@ -12,4 +12,88 @@ hf_oauth: true
12
  hf_oauth_expiration_minutes: 480
13
  ---
14
 
15
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  hf_oauth_expiration_minutes: 480
13
  ---
14
 
15
+ # πŸ•΅πŸ»β€β™‚οΈ Agents Course Final Assignment
16
+
17
+ > **⚠️ Important Notice**: After this project is made public, the `OPENAI_API_KEY` in Hugging Face Space settings has been set to an invalid value to protect API key security. To run this project, please use your own OpenAI API key.
18
+
19
+ This is a multi-agent system developed for the [Hugging Face Agents Course](https://huggingface.co/learn/agents-course/en/unit4/introduction) Unit 4 final project. The system is designed to evaluate AI agent performance through the [GAIA benchmark](https://huggingface.co/spaces/gaia-benchmark/leaderboard).
20
+
21
+ ## 🎯 Project Goals
22
+
23
+ Create an agent system capable of achieving 30% or higher score on the GAIA benchmark to earn the course completion certificate πŸ….
24
+
25
+ ## πŸ—οΈ Architecture Design
26
+
27
+ This project adopts a multi-agent architecture with two specialized sub-agents:
28
+
29
+ ### 1. Web Search Agent
30
+ - **Functions**: Web search, webpage access, Wikipedia queries
31
+ - **Tools**:
32
+ - `WebSearchTool()`: Web search
33
+ - `VisitWebpageTool()`: Access specific webpages
34
+ - `WikipediaSearchTool()`: Wikipedia search
35
+ - **Authorized Imports**: `requests`, `beautifulsoup4`
36
+
37
+ ### 2. Calculation Agent
38
+ - **Functions**: Mathematical calculations, data analysis, statistical computing
39
+ - **Authorized Imports**: `pandas`, `numpy`, `math`, `statistics`, `scipy`
40
+ - **Features**: Specialized in numerical computation and data processing tasks
41
+
42
+ ### 3. Main Agent
43
+ - **Role**: Coordinate and manage sub-agents
44
+ - **Functions**: Task distribution, result integration, decision making
45
+ - **Features**: Uses `managed_agents` mode to uniformly manage sub-agents
46
+
47
+ ## πŸ“ Project Structure
48
+
49
+ ```
50
+ β”œβ”€β”€ agent.py # Main agent definition and configuration
51
+ β”œβ”€β”€ prompt.py # Agent prompt templates and system instructions
52
+ β”œβ”€β”€ app.py # Gradio interface and GAIA evaluation logic
53
+ β”œβ”€β”€ test_agent.py # Agent functionality test scripts
54
+ β”œβ”€β”€ requirements.txt # Python dependencies
55
+ β”œβ”€β”€ pyproject.toml # Project configuration file
56
+ └── README.md # Project documentation
57
+ ```
58
+
59
+ ## πŸ”§ Tech Stack
60
+
61
+ - **AI Framework**: [smolagents](https://github.com/huggingface/smolagents) - Hugging Face's agent framework
62
+ - **LLM**: OpenAI GPT-4.1 (via OpenAI API)
63
+ - **Frontend Interface**: Gradio 5.34.0
64
+ - **Data Processing**: pandas, numpy, scipy
65
+ - **Web Requests**: requests, beautifulsoup4
66
+ - **Environment Management**: python-dotenv
67
+
68
+ ## πŸš€ Quick Start
69
+
70
+ ### Environment Setup
71
+
72
+ 1. **Clone the project**
73
+ ```bash
74
+ git clone <repository-url>
75
+ cd Agents-Course-Final-Assignment
76
+ ```
77
+
78
+ 2. **Install dependencies**
79
+ ```bash
80
+ pip install -r requirements.txt
81
+ ```
82
+
83
+ 3. **Configure API Key**
84
+ Create a `.env` file and add your OpenAI API key:
85
+ ```bash
86
+ OPENAI_API_KEY=your_openai_api_key_here
87
+ ```
88
+
89
+ ## πŸ”— Related Links
90
+
91
+ - [Hugging Face Agents Course](https://huggingface.co/learn/agents-course/en/unit4/introduction)
92
+ - [GAIA Benchmark](https://huggingface.co/spaces/gaia-benchmark/leaderboard)
93
+ - [Student Leaderboard](https://huggingface.co/spaces/agents-course/Students_leaderboard)
94
+ - [smolagents Documentation](https://github.com/huggingface/smolagents)
95
+
96
+
97
+ ---
98
+
99
+ *Created with ❀️ for the Hugging Face Agents Course Final Assignment*