# suyashnemade/langgraph-gaia-benchmark-agent architecture

> Architecture diagram of the GitHub repository suyashnemade/langgraph-gaia-benchmark-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/suyashnemade/langgraph-gaia-benchmark-agent
- Repository: https://github.com/suyashnemade/langgraph-gaia-benchmark-agent

## Overview

This is a LangGraph-powered GAIA benchmark agent: users submit a question and optional attachment through the Gradio evaluation interface, which resolves the attachment, invokes the agent, then records and submits answers. The agent reasons with a rotating multi-provider model, dispatches tools for web, files, code, arithmetic, image, audio, and YouTube tasks, and applies a step-limit finalizer. README-documented video analysis is included as a capability, but its connection to the active workflow is not shown. The graph follows excerpted calls and documented behavior; unsampled evaluation details are not inferred.

Main entry points: [`agent/workflow.py`](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/agent/workflow.py) (ReAct Workflow), [`app.py`](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/app.py) (Evaluation Runner), [`agent/llm.py`](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/agent/llm.py) (Rotating LLM), [`agent/states.py`](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/agent/states.py) (Agent State)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Evaluation Interface"]
  node_app["Evaluation Runner<br/>[app.py]"]
  node_attachments["Attachment Resolver<br/>[app.py]"]
end

subgraph group_agent["Agent Orchestration"]
  node_workflow["ReAct Workflow<br/>[workflow.py]"]
  node_state["Agent State<br/>[states.py]"]
end

subgraph group_models["Models and Prompts"]
  node_prompt["GAIA Instructions<br/>[prompt.py]"]
  node_rotating["Rotating LLM<br/>[llm.py]"]
end

subgraph group_tools["Task Tools"]
  node_web["Web Research<br/>[web.py]"]
  node_files["File Reader<br/>[file_tools.py]"]
  node_python["Python Executor<br/>[python_tool.py]"]
  node_calculator["Safe Calculator<br/>[calculator.py]"]
  node_multimodal["Image and Audio<br/>[tools.py]"]
  node_youtube["YouTube Transcript<br/>[tools.py]"]
  node_video["Video Analysis<br/>[video_tool.py]"]
end

node_user(("Benchmark User"))
node_benchmark["GAIA Service"]
node_providers["LLM Providers"]

node_user -->|"submits tasks"| node_app
node_app -->|"resolves attachment"| node_attachments
node_attachments -->|"downloads files"| node_benchmark
node_app -->|"invokes agent"| node_workflow
node_app -->|"fetches and submits"| node_benchmark
node_workflow -->|"uses state"| node_state
node_workflow -->|"builds model messages"| node_prompt
node_workflow -->|"invokes model"| node_rotating
node_rotating -->|"rotates requests"| node_providers
node_workflow -->|"dispatches tools"| node_web
node_workflow -->|"dispatches tools"| node_files
node_workflow -->|"dispatches tools"| node_python
node_workflow -->|"dispatches tools"| node_calculator
node_workflow -->|"dispatches tools"| node_multimodal
node_workflow -->|"dispatches tools"| node_youtube
node_rotating -.->|"serves multimodal calls"| node_providers
node_user -.->|"requests video analysis"| node_video

click node_app "https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/app.py"
click node_attachments "https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/app.py"
click node_workflow "https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/agent/workflow.py"
click node_state "https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/agent/states.py"
click node_prompt "https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/agent/prompt.py"
click node_rotating "https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/agent/llm.py"
click node_web "https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/tools/web.py"
click node_files "https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/tools/file_tools.py"
click node_python "https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/tools/python_tool.py"
click node_calculator "https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/tools/calculator.py"
click node_multimodal "https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/tools/tools.py"
click node_youtube "https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/tools/tools.py"
click node_video "https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/tools/video_tool.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_attachments,node_user toneBlue
class node_workflow,node_state toneAmber
class node_prompt,node_rotating toneMint
class node_web,node_files,node_python,node_calculator,node_multimodal,node_youtube,node_video toneRose
class node_benchmark,node_providers toneIndigo
```

## Components

### Evaluation Interface

- [Evaluation Runner](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/app.py): `app.py`
- [Attachment Resolver](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/app.py): `app.py`

### Agent Orchestration

- [ReAct Workflow](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/agent/workflow.py): `agent/workflow.py`
- [Agent State](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/agent/states.py): `agent/states.py`

### Models and Prompts

- [GAIA Instructions](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/agent/prompt.py): `agent/prompt.py`
- [Rotating LLM](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/agent/llm.py): `agent/llm.py`

### Task Tools

- [Web Research](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/tools/web.py): `tools/web.py`
- [File Reader](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/tools/file_tools.py): `tools/file_tools.py`
- [Python Executor](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/tools/python_tool.py): `tools/python_tool.py`
- [Safe Calculator](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/tools/calculator.py): `tools/calculator.py`
- [Image and Audio](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/tools/tools.py): `tools/tools.py`
- [YouTube Transcript](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/tools/tools.py): `tools/tools.py`
- [Video Analysis](https://github.com/suyashnemade/langgraph-gaia-benchmark-agent/blob/main/tools/video_tool.py): `tools/video_tool.py`

### Other components

- **Benchmark User**
- **GAIA Service**
- **LLM Providers**

## Connections

- Benchmark User → Evaluation Runner: submits tasks (evidence: `README.md`)
- Evaluation Runner → Attachment Resolver: resolves attachment (evidence: `app.py`)
- Attachment Resolver → GAIA Service: downloads files (evidence: `app.py`)
- Evaluation Runner → ReAct Workflow: invokes agent (evidence: `app.py`)
- Evaluation Runner → GAIA Service: fetches and submits (evidence: `app.py`)
- ReAct Workflow → Agent State: uses state (evidence: `agent/workflow.py`)
- ReAct Workflow → GAIA Instructions: builds model messages (evidence: `agent/workflow.py`)
- ReAct Workflow → Rotating LLM: invokes model (evidence: `agent/workflow.py`)
- Rotating LLM → LLM Providers: rotates requests (evidence: `README.md`)
- ReAct Workflow → Web Research: dispatches tools (evidence: `agent/workflow.py`)
- ReAct Workflow → File Reader: dispatches tools (evidence: `agent/workflow.py`)
- ReAct Workflow → Python Executor: dispatches tools (evidence: `agent/workflow.py`)
- ReAct Workflow → Safe Calculator: dispatches tools (evidence: `agent/workflow.py`)
- ReAct Workflow → Image and Audio: dispatches tools (evidence: `agent/workflow.py`)
- ReAct Workflow → YouTube Transcript: dispatches tools (evidence: `agent/workflow.py`)
- Rotating LLM → LLM Providers: serves multimodal calls
- Benchmark User → Video Analysis: requests video analysis (evidence: `README.md`)
