A newer version of the Gradio SDK is available: 6.9.0
title: Agents Course Final Assignment
emoji: π΅π»ββοΈ
colorFrom: indigo
colorTo: indigo
sdk: gradio
sdk_version: 5.34.0
app_file: app.py
pinned: true
hf_oauth: true
hf_oauth_expiration_minutes: 480
license: mit
short_description: Developed for the Agents Course final project.
π΅π»ββοΈ Agents Course Final Assignment
β οΈ Important Notice:
After this project is made public, theOPENAI_API_KEYin 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.
This is a multi-agent system developed for the Hugging Face Agents Course Unit 4 final project. The system is designed to evaluate AI agent performance through the GAIA benchmark.
Due to the fact that this agent system does not provide file processing capabilities, multimodal reasoning, and other advanced features, some questions like the following cannot be answered by this agent system:
The attached Excel file contains the sales of menu items for a local fast-food chain. What were the total sales that the chain made from food (not including drinks)? Express your answer in USD with two decimal places.
Review the chess position provided in the image. It is black's turn. Provide the correct next move for black which guarantees a win. Please provide your response in algebraic notation.
In the video https://www.youtube.com/watch?v=L1vXCYZAYYM, what is the highest number of bird species to be on camera simultaneously?
Even so, this agent system is able to pass the GAIA benchmark with a score of 50% by correctly answering 10 out of 20 questions.
Submission Successful!
User: Hemimoon
Overall Score: 50.0% (10/20 correct)
Message: Score calculated successfully: 10/20 total questions answered correctly (20 valid tasks attempted). High score updated on leaderboard.
ποΈ Architecture Design
This project adopts a multi-agent architecture with two specialized sub-agents:
1. Web Search Agent
- Functions: Web search, webpage access, Wikipedia queries
- Tools:
WebSearchTool(): Web searchVisitWebpageTool(): Access specific webpagesWikipediaSearchTool(): Wikipedia search
- Authorized Imports:
requests,beautifulsoup4
2. Calculation Agent
- Functions: Mathematical calculations, data analysis, statistical computing
- Authorized Imports:
pandas,numpy,math,statistics,scipy - Features: Specialized in numerical computation and data processing tasks
3. Main Agent
- Role: Coordinate and manage sub-agents
- Functions: Task distribution, result integration, decision making
- Features: Uses
managed_agentsmode to uniformly manage sub-agents
π Project Structure
βββ agent.py # Main agent definition and configuration
βββ prompt.py # Agent prompt templates and system instructions
βββ app.py # Gradio interface and GAIA evaluation logic
βββ test_agent.py # Agent functionality test scripts
βββ requirements.txt # Python dependencies
βββ pyproject.toml # Project configuration file
βββ README.md # Project documentation
π§ Tech Stack
- AI Framework: smolagents - Hugging Face's agent framework
- LLM: OpenAI GPT-4.1 (via OpenAI API)
- Frontend Interface: Gradio 5.34.0
- Data Processing: pandas, numpy, scipy
- Web Requests: requests, beautifulsoup4
- Environment Management: python-dotenv
π Quick Start
Environment Setup
- Clone the project
git clone https://huggingface.co/spaces/Hemimoon/Agents-Course-Final-Assignment
cd Agents-Course-Final-Assignment
- Install dependencies
pip install -r requirements.txt
- Configure API Key
Create a
.envfile and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
π Related Links
Created with β€οΈ for the Hugging Face Agents Course Final Assignment