GAIA Agent β HF AI Agents Course Unit 4 Final Assignment
A LangGraph ReAct agent (skeleton from Unit 2.3) that answers the course's 20-question GAIA Level-1 validation subset, scoring β₯30% for the certificate.
Architecture
question βββΊ assistant (GLM-5.3 + bind_tools) β ToolNode βββΊ submit_answer
β β
βΌ βΌ
web_search / wikipedia_search / visit_webpage
file_reader (VLM Qwen3-VL / faster-whisper / pandas / pypdf)
python_repl (subprocess, 30s timeout)
- Agentic RAG pattern (Unit 3): the agent decides when/what to retrieve
- Exact-match discipline: a
submit_answertool records the bare answer - Salvage fallback: if the loop exhausts its step budget, one final extraction LLM call summarizes the research transcript into an answer
- Tool errors are non-fatal (
handle_tool_errors=True) β the agent retries/redirects
Files
| File | Role |
|---|---|
app.py |
LangGraph ReAct agent + answer salvage + format cleanup |
tools.py |
6 tools: DDG search, Wikipedia API, webpage reader, file reader (image VLM / audio STT / Excel / PDF), python REPL, submit_answer |
runner.py |
Fetch questions β download attachments (scoring API β GAIA dataset fallback) β run agent β answers.json cache |
submit.py |
POST answers to the course scoring API |
Notes
- Attachments for file questions come from the public
gaia-benchmark/GAIAvalidation set (the scoring API's/filesendpoint was empty at build time). - Secrets (LLM endpoint/key) are environment-driven β never in code.
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support