GAIA_agent_space / README.md
Sebastian Reinhard
cleaned up
e0e55e2

A newer version of the Gradio SDK is available: 5.35.0

Upgrade
metadata
title: GAIA Agent Space
emoji: 🔥
colorFrom: indigo
colorTo: red
sdk: gradio
sdk\_version: 5.29.0
app\_file: app.py
pinned: false
license: mit
hf_oauth: true

GAIA Agent Space

A reproduction‑ready Retrieval‑Augmented Generation (RAG) agent built with LangChain and Gradio for the GAIA benchmark. The Space exposes both an interactive web UI and a programmatic /predict endpoint, making it easy to test single GAIA tasks or to batch‑evaluate whole splits with the Inspect‑AI runner.

✨ Demo

Click above ⬆️ and paste a GAIA JSON task – or just try something like:

{"question": "How many studio albums were published by Mercedes Sosa between 2000 and 2009 (included)?"}

The agent decides which tool chain to invoke (Wikipedia search, table parser, etc.) and returns the numeric answer in the GAIA SUBMIT: format.

🚀 Quick start (local)

# 1 ‑ clone
git clone https://huggingface.co/spaces/Acecross/GAIA_agent_space
cd GAIA_agent_space

# 2 ‑ create env
conda env create -f environment.yml   # or: python -m venv .venv && pip install -r requirements.txt
conda activate gaia‑agent

# 3 ‑ run UI
python app.py       # Gradio launches at http://127.0.0.1:7860

🛠️  Environment variables

Variable Purpose
HF_API_TOKEN Optional – needed only if you hit the Hugging Face Inference API or gated models.
OPENAI_API_KEY Optional – set to use OpenAI models for LLM or vision tasks.
TAVILY_API_KEY API key for web search (used by the TavilySearchTool).
STOCKFISH_PATH Path to the Stockfish binary for chess‑position questions (defaults to stockfish in $PATH).

Create a .env file with any keys you need; app.py loads it on start‑up.

📁 Project layout

├─ app.py                # Gradio interface + agent bootstrap
├─ agent/
│  ├─ chains.py          # LangChain boiler plate (router, retriever, etc.)
│  ├─ tools/             # Custom tool classes (spreadsheet, chess, video counter…)
│  └─ prompts/
├─ requirements.txt      # runtime deps
└─ environment.yml       # conda lock (optional)

📝 License

This project is released under the MIT License – see LICENSE for details.


🔗 Useful links

Feel free to open an issue or a pull request if you spot a bug or want to add a new GAIA‑specific tool! 🎉