CoderLakshman/Final_Assignment_Template
0
1---2title: Final Assignment Template3emoji: 🤖4colorFrom: blue5colorTo: green6sdk: docker7app_file: app.py8pinned: false9---10 11<br />12<div align="center">13 <a href="https://huggingface.co/learn/agents-course/unit4/introduction">14 <img src="images/unit-4.jpg" alt="Hugging Face Agents Course" width="800">15 </a>16 17 <h3 align="center">Agents Course Final Project</h3>18 19 <p align="center" style="width:80%">20 Final hands-on assignment for the Hugging Face Agents course. In this project I built a multi-agent solution, evaluated it against questions from the General AI Assistants (GAIA) benchmark (level one only), and got creative with some agent and tool improvements. 21</div>22 23## About The Project24 25Achieving 30 points for the certification was relatively easy with the template provided and a powerful enough LLM. However, evaluation revealed the unique types of implementation challenges with AI agents. Some of which include...26 27* Cost28* Reliability29* Response Times30 31[](https://huggingface.co/spaces/civerson916/Final_Assignment_Template)32 33[](https://huggingface.co/learn/agents-course/unit4/hands-on)34 35Beyond what looks like a smolagents guided tour, you can find the following in this repo... 36 37* Research agent armed with Google search via [Serper](https://serper.dev/) and both Audo and Video Understanding via [Gemini](https://ai.google.dev/gemini-api/docs/)38* Chess agent leveraging my [board_to_fen](https://github.com/civerson/board_to_fen) fork and a Stockfish API.39* [Langfuse](https://langfuse.com/) setup boilerplate, a working example. This is an absolute must.40* [Pydantic](https://docs.pydantic.dev/latest/) settings for type safety, centralized, and encapsulated config.41* Basic parallel agent task execution, compatible with [smolagents](https://huggingface.co/docs/smolagents/main/en/index) and the [Gradio](https://www.gradio.app/) UI.42 43 44## Getting Started45 46To get a local copy up and running follow these steps.47 48### Prerequisites49 50* python51* pip52* git53 54### Installation55 561. Get an API key for the following services: [OpenRouter](https://openrouter.ai/), [Gemini](https://ai.google.dev/gemini-api/docs/api-key), [Serper](https://serper.dev/), and [Langfuse](https://langfuse.com/). The HF username and space are only used when submitting answers for evaluation, but must be present to startup. If you run this in your own HF space, these will already be set for you. 572. Clone the repo and install packages58 ```sh59 git clone https://github.com/civerson/smolagents-gaia-final.git60 pip install -r requirements.txt61 ```623. Enter your API keys in a `.env` or set them as follows63 ```sh64 OPENROUTER_API_KEY = 'ENTER YOUR API'65 GEMINI_API_KEY = 'ENTER YOUR API'66 SERPER_API_KEY = 'ENTER YOUR API'67 LANGFUSE_PUBLIC_KEY = 'ENTER YOUR API'68 LANGFUSE_SECRET_KEY = 'ENTER YOUR API'69 USERNAME = 'ENTER YOUR HF USERNAME'70 SPACE_ID = 'ENTER YOUR HF SPACE'71 ```724. Run the app73 ```sh74 python app.py75 ```765. Change git remote url to avoid accidental pushes to base project77 ```sh78 git remote set-url origin github_username/repo_name79 git remote -v # confirm the changes80 ```81 82<p align="right">(<a href="#readme-top">back to top</a>)</p>83 84 