kennethhendricks/hf-agents-course-project
AI agents course project
Coursework project for Kenneth Hendricks, built with Codex assistance using the Hugging Face AI Agents Course.
What it contains
- Unit 1: a
CodeAgentwith a time tool and Python calculations. - Units 2 and 3: a
ToolCallingAgent, a BM25 retriever over the course's fictional gala guests, live weather, web search, and Hugging Face model statistics. - Unit 4: an agent that researches questions, reads attachments, performs bounded calculations, and saves model outputs and tool traces before optional submission.
The final agent has no question-specific answer table. It generates answers using Qwen 3.5 9B through a local Ollama server. Evaluation scores measure this course's small public benchmark; they are not a general measure of reliability.
Verified course result
On September 10, 2026 (UTC), the official Unit 4 scoring API recorded 35%: 7 correct answers out of 20 benchmark questions, with 13 questions attempted. This exceeds the final certificate's requirement of a score above 30. The run used the local Qwen model and the public code in this Space. A separate model pass formatted the recorded candidate answers for exact matching; original responses and tool traces were preserved locally. The five tool tests passed, and the three recorded introductory and gala exercises ran successfully.
The course attachment API returned missing-file errors. Its original GAIA fallback requires separate dataset access, so that submission used text questions.
Run locally
Install Python 3.11+ and Ollama, then:
pip install -r requirements.txt
ollama pull qwen3.5:9bStart Ollama on its default port, and set OLLAMA_HOST=http://127.0.0.1:11434 in your terminal. The adapter defaults to port 11439 for the isolated course setup. Then run:
python -m unittest test_tools.py
python course_checks.py
python app.py
python evaluate.pypython evaluate.py downloads the official questions, runs the agent and writes evidence. It does not submit a score unless --submit is explicitly supplied. Use --username YOUR_USERNAME --repo YOUR_USERNAME/YOUR_SPACE for your own account. Existing evidence is skipped so an interrupted run can resume. Move an individual result out of evidence/ if you intentionally want to rerun that question. When the course attachment endpoint returns 404, the reader attempts the named input file in the original GAIA repository. This requires dataset access on your Hugging Face account. The code never downloads the dataset's answer metadata.
publish.py --repo YOUR_USERNAME/YOUR_SPACE uploads an explicit allowlist of code, fictional guest data, and the three exercise recordings. Benchmark questions, attachments, submitted answers, caches, and credentials are excluded.
Public demo
The free static Space provides live keyword search and recorded agent examples. Run app.py locally for the Gradio interface with BM25 retrieval and agent chat. The full generative agent runs locally. A public Space cannot reach a local Ollama server, and no paid inference backend or private access token is included here.
Limitations
- Web search and third-party sites can fail or return incomplete evidence.
- Captions do not establish what is visually present in a video.
- Image understanding and exact-answer formatting can be wrong.
- Audio uses the local
small.enWhisper model, downloaded on first use. - Python evaluation uses the framework's restricted interpreter. This project is a coursework demo, not a hardened service for arbitrary hostile workloads.
- The public demo uses fictional course records. Do not upload private data.
Attribution and assistance
Based on the course's agent, tool, retrieval, and evaluation exercises. The original course is at huggingface/agents-course. The fictional guest dataset is agents-course/unit3-invitees. Codex assisted with implementation, debugging, and running the exercises. No claim is made that this project was completed without AI assistance.
