404robbie/evidence-research-agent
0
Evidence Research Agent
A transparent LangGraph agent built for the Hugging Face Agents Course final assignment and its 20-question GAIA Level 1 subset.
What it can do
- Search the web
- Read web pages
- Perform safe arithmetic
- Inspect PDF, DOCX, spreadsheet, CSV, JSON, and text attachments
- Return concise answers for exact-match scoring
Hugging Face Space setup
- Duplicate the official Final Assignment Template.
- Replace its files with the files in this project.
- In Settings → Variables and secrets, add
HF_TOKENas a secret. - Optionally set
AGENT_MODELas a variable. The default isQwen/Qwen3-32B. - Keep the Space public so its code link can be submitted.
The Space uses the Hugging Face OpenAI-compatible router by default.
Local Ollama setup
Set these environment variables before running the app:
export MODEL_PROVIDER=ollama
export AGENT_MODEL=qwen2:7b
export OLLAMA_BASE_URL=http://localhost:11434/v1
python app.pyWhen Ollama runs on Windows and the app runs inside WSL, use the Windows host address in OLLAMA_BASE_URL rather than localhost if needed.
Design
This project constructs its own LangGraph state graph:
question → model reasoning → tool execution → model reasoning → exact answer
The loop is bounded with AGENT_RECURSION_LIMIT (default: 14) to prevent runaway tool calls.
