Agent for the Hugging Face Agents Course final assignment. It answers the 20 GAIA level-1 questions and submits them to the course scoring API.
| File | Purpose |
|---|---|
| app.py | Gradio entry point: login, run, submit, per-question table. |
| gaia_agent/agent.py | ReAct loop: one strict JSON object per turn, JSON repair, forced-answer fallback, final formatting pass. |
| gaia_agent/llm.py | LLM backends: local MLX (Qwen3-8B-4bit), any OpenAI-compatible endpoint, HF router, keyless Pollinations. |
| gaia_agent/tools.py | Web search, page reading, Wikipedia API with parsed tables, YouTube captions, Python execution, attachment parsing (xlsx/pdf/docx/csv/py), Whisper transcription, image inspection. |
| gaia_agent/data.py | Question fetching, attachment download with mirror fallback, submission. |
| gaia_agent/vlm_worker.py | Vision model in a throwaway process so it never competes with the 8B text model for memory. |
| run_eval.py | CLI runner: --all, --task, --list, --submit. |
| requirements.txt | Python dependencies of the Space-side code. |
question -> model proposes {"thought", "tool", "input"}
-> tool runs (search / wikipedia / python / transcript / attachment / vision)
-> observation appended -> next turn
-> model emits {"thought", "answer"} -> formatting pass -> submitted
The agent was developed and run locally on Apple Silicon with a keyless local model
(mlx-lm, mlx-whisper, mlx-vlm), about 4 s per model call.
This Space hosts the code only: running the full evaluation needs a GPU runtime or an API key
supplied through OPENAI_BASE_URL / OPENAI_API_KEY.