# junjue-wang/dora architecture

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

- Interactive diagram: https://gitdiagram.com/junjue-wang/dora
- Repository: https://github.com/junjue-wang/dora

## Overview

DORA is a disaster-response geospatial reasoning benchmark and agent runtime. A user task is given to the ReAct runner, which prompts an LLM, exposes MCP tools, and records the answer and tool trajectory; the evaluator scores both against gold results. The tool library spans perception, spatial analysis, planning-oriented calculations, temporal comparison, and report/visualization capabilities. The README documents broader tool categories than the sampled runtime excerpts expose, so those branches are represented at the tool-module level; unverified internal call chains are omitted.

Main entry points: [`dora/agent/mcp_tools.py`](https://github.com/Junjue-Wang/DORA/blob/master/dora/agent/mcp_tools.py) (MCP tool pool), [`dora/agent/runner.py`](https://github.com/Junjue-Wang/DORA/blob/master/dora/agent/runner.py) (Task runner), [`dora/tools/segmentation`](https://github.com/Junjue-Wang/DORA/tree/master/dora/tools/segmentation) (Segmentation architectures), [`dora/agent/llm.py`](https://github.com/Junjue-Wang/DORA/blob/master/dora/agent/llm.py) (LLM connector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent["Agent runtime"]
  node_runner["Task runner<br/>[runner.py]"]
  node_prompt["Task prompts<br/>[prompts.py]"]
  node_llm_builder["LLM connector<br/>[llm.py]"]
  node_mcp_pool["MCP tool pool<br/>[mcp_tools.py]"]
end

subgraph group_tools["Geospatial tools"]
  node_tool_runtime["Tool runtime<br/>[_common.py]"]
  node_analysis["Spatial analysis<br/>[analysis.py]"]
  node_calculations["Raster calculations<br/>[calculate.py]"]
  node_poi["POI operations<br/>[poi.py]"]
  node_perception["Image perception<br/>[perception.py]"]
  node_visualization["Visualization<br/>[vis.py]"]
  node_summarization["Report synthesis<br/>[model.py]"]
end

subgraph group_models["Perception models"]
  node_seg_inference["Sliding-window inference<br/>[inference.py]"]
  node_seg_models["Segmentation architectures"]
  node_dinov3["DINOv3 transformer"]
  node_dinov3_layers["Transformer layers<br/>[block.py]"]
  node_segformer["SegFormer backbone<br/>[mix_transformer.py]"]
end

subgraph group_benchmark["Benchmark data and scoring"]
  node_data[("Tasks and geodata<br/>[paths.py]")]
  node_evaluator["Trajectory and answer scoring<br/>[evaluation.py]"]
end

node_user(("Analyst"))
node_llm_provider(("LLM provider"))

node_user -->|"submits task"| node_runner
node_runner -.->|"loads task data"| node_data
node_runner -->|"builds prompt"| node_prompt
node_runner -->|"builds model"| node_llm_builder
node_llm_builder -.->|"requests completion"| node_llm_provider
node_runner -->|"loads tools"| node_mcp_pool
node_runner -.->|"records results for"| node_evaluator
node_mcp_pool -->|"starts servers"| node_tool_runtime
node_mcp_pool -->|"exposes tools"| node_analysis
node_mcp_pool -->|"exposes tools"| node_calculations
node_mcp_pool -->|"exposes tools"| node_poi
node_mcp_pool -->|"exposes tools"| node_perception
node_mcp_pool -->|"exposes tools"| node_visualization
node_mcp_pool -->|"exposes tools"| node_summarization
node_perception -->|"runs inference"| node_seg_inference
node_seg_inference -.->|"predicts with"| node_seg_models
node_seg_models -->|"includes backbone"| node_dinov3
node_dinov3 -->|"uses layers"| node_dinov3_layers
node_seg_models -->|"includes backbone"| node_segformer
node_data -.->|"provides gold data"| node_evaluator

click node_runner "https://github.com/Junjue-Wang/DORA/blob/master/dora/agent/runner.py"
click node_prompt "https://github.com/Junjue-Wang/DORA/blob/master/dora/agent/prompts.py"
click node_llm_builder "https://github.com/Junjue-Wang/DORA/blob/master/dora/agent/llm.py"
click node_mcp_pool "https://github.com/Junjue-Wang/DORA/blob/master/dora/agent/mcp_tools.py"
click node_tool_runtime "https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/_common.py"
click node_analysis "https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/analysis.py"
click node_calculations "https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/calculate.py"
click node_poi "https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/poi.py"
click node_perception "https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/perception.py"
click node_visualization "https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/vis.py"
click node_summarization "https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/model.py"
click node_seg_inference "https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/segmentation/inference.py"
click node_seg_models "https://github.com/Junjue-Wang/DORA/tree/master/dora/tools/segmentation"
click node_dinov3 "https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/segmentation/dinov3/vision_transformer.py"
click node_dinov3_layers "https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/segmentation/dinov3/layers/block.py"
click node_segformer "https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/segmentation/segformer/mix_transformer.py"
click node_data "https://github.com/Junjue-Wang/DORA/blob/master/dora/paths.py"
click node_evaluator "https://github.com/Junjue-Wang/DORA/blob/master/dora/evaluation.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_runner,node_prompt,node_llm_builder,node_mcp_pool toneBlue
class node_tool_runtime,node_analysis,node_calculations,node_poi,node_perception,node_visualization,node_summarization toneAmber
class node_seg_inference,node_seg_models,node_dinov3,node_dinov3_layers,node_segformer toneMint
class node_data,node_evaluator toneRose
class node_user,node_llm_provider toneIndigo
```

## Components

### Agent runtime

- [Task runner](https://github.com/Junjue-Wang/DORA/blob/master/dora/agent/runner.py): `dora/agent/runner.py`
- [Task prompts](https://github.com/Junjue-Wang/DORA/blob/master/dora/agent/prompts.py): `dora/agent/prompts.py`
- [LLM connector](https://github.com/Junjue-Wang/DORA/blob/master/dora/agent/llm.py): `dora/agent/llm.py`
- [MCP tool pool](https://github.com/Junjue-Wang/DORA/blob/master/dora/agent/mcp_tools.py): `dora/agent/mcp_tools.py`

### Geospatial tools

- [Tool runtime](https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/_common.py): `dora/tools/_common.py`
- [Spatial analysis](https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/analysis.py): `dora/tools/analysis.py`
- [Raster calculations](https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/calculate.py): `dora/tools/calculate.py`
- [POI operations](https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/poi.py): `dora/tools/poi.py`
- [Image perception](https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/perception.py): `dora/tools/perception.py`
- [Visualization](https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/vis.py): `dora/tools/vis.py`
- [Report synthesis](https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/model.py): `dora/tools/model.py`

### Perception models

- [Sliding-window inference](https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/segmentation/inference.py): `dora/tools/segmentation/inference.py`
- [Segmentation architectures](https://github.com/Junjue-Wang/DORA/tree/master/dora/tools/segmentation): `dora/tools/segmentation`
- [DINOv3 transformer](https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/segmentation/dinov3/vision_transformer.py): `dora/tools/segmentation/dinov3/vision_transformer.py`
- [Transformer layers](https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/segmentation/dinov3/layers/block.py): `dora/tools/segmentation/dinov3/layers/block.py`
- [SegFormer backbone](https://github.com/Junjue-Wang/DORA/blob/master/dora/tools/segmentation/segformer/mix_transformer.py): `dora/tools/segmentation/segformer/mix_transformer.py`

### Benchmark data and scoring

- [Tasks and geodata](https://github.com/Junjue-Wang/DORA/blob/master/dora/paths.py): `dora/paths.py`
- [Trajectory and answer scoring](https://github.com/Junjue-Wang/DORA/blob/master/dora/evaluation.py): `dora/evaluation.py`

### Other components

- **Analyst**
- **LLM provider**

## Connections

- Analyst → Task runner: submits task (evidence: `README.md`)
- Task runner → Tasks and geodata: loads task data
- Task runner → Task prompts: builds prompt (evidence: `dora/agent/runner.py`)
- Task runner → LLM connector: builds model (evidence: `dora/agent/runner.py`)
- LLM connector → LLM provider: requests completion
- Task runner → MCP tool pool: loads tools (evidence: `dora/agent/runner.py`)
- Task runner → Trajectory and answer scoring: records results for
- MCP tool pool → Tool runtime: starts servers (evidence: `dora/agent/mcp_tools.py`)
- MCP tool pool → Spatial analysis: exposes tools (evidence: `README.md`)
- MCP tool pool → Raster calculations: exposes tools (evidence: `README.md`)
- MCP tool pool → POI operations: exposes tools (evidence: `README.md`)
- MCP tool pool → Image perception: exposes tools (evidence: `README.md`)
- MCP tool pool → Visualization: exposes tools (evidence: `README.md`)
- MCP tool pool → Report synthesis: exposes tools (evidence: `README.md`)
- Image perception → Sliding-window inference: runs inference (evidence: `dora/tools/perception.py`)
- Sliding-window inference → Segmentation architectures: predicts with (evidence: `dora/tools/segmentation/__init__.py`)
- Segmentation architectures → DINOv3 transformer: includes backbone (evidence: `dora/tools/segmentation/__init__.py`)
- DINOv3 transformer → Transformer layers: uses layers (evidence: `dora/tools/segmentation/dinov3/vision_transformer.py`)
- Segmentation architectures → SegFormer backbone: includes backbone (evidence: `dora/tools/segmentation/segformer/wetr.py`)
- Tasks and geodata → Trajectory and answer scoring: provides gold data
