Nigou Julien
Build routed GAIA agent v1
07fb471
---
title: Template Final Assignment
emoji: 🕵🏻‍♂️
colorFrom: indigo
colorTo: indigo
sdk: gradio
sdk_version: 5.25.2
app_file: app.py
pinned: false
hf_oauth: true
# optional, default duration is 8 hours/480 minutes. Max duration is 30 days/43200 minutes.
hf_oauth_expiration_minutes: 480
---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
## Local Setup
Install dependencies and run the smoke checks with `uv`:
```bash
uv sync
uv run pytest
uv run python scripts/run_one.py
```
Copy `.env.example` to `.env` and set the LiteLLM model you want to test:
```env
LITELLM_MODEL=anthropic/claude-3-5-sonnet-latest
ANTHROPIC_API_KEY=...
```
LiteLLM can also route OpenAI-compatible models through the same code path:
```env
LITELLM_MODEL=openai/gpt-4o-mini
OPENAI_API_KEY=...
```
If you run a LiteLLM proxy, set `LITELLM_API_BASE` and `LITELLM_API_KEY`.
## Agent V1
The agent uses a routed LangGraph flow:
```text
ingest_task -> classify_task -> specialized solver -> verify_answer -> normalize_final_answer
```
Routes cover direct reasoning, computation/table questions, web search, YouTube
transcripts, spreadsheets, Python files, audio files, and image files.
For audio questions, configure a LiteLLM transcription-compatible provider. By
default the code uses `AUDIO_TRANSCRIPTION_MODEL=whisper-1` and reads
`OPENAI_API_KEY`, or you can set:
```env
AUDIO_TRANSCRIPTION_MODEL=whisper-1
AUDIO_TRANSCRIPTION_API_KEY=...
AUDIO_TRANSCRIPTION_API_BASE=...
```
For image questions, use a vision-capable `LITELLM_MODEL`.