# google-research/reasoning-bank architecture

> Architecture diagram of the GitHub repository google-research/reasoning-bank, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/google-research/reasoning-bank
- Repository: https://github.com/google-research/reasoning-bank

## Overview

ReasoningBank evaluates WebArena and SWE-Bench agent trajectories, extracts reusable reasoning memories from successes and failures, and applies those memories during later runs; its scaling workflows explore this memory/test-time-scaling feedback. The graph preserves the separately documented SWE-Bench path and WebArena evaluation capabilities. Several subsystem links are documented in the README; unsampled implementation details are not inferred beyond indexed references.

Main entry points: [`WebArena/run.py`](https://github.com/google-research/reasoning-bank/blob/main/WebArena/run.py) (WebArena runner), [`third_party/src/minisweagent/run/extra/swebench.py`](https://github.com/google-research/reasoning-bank/blob/main/third_party/src/minisweagent/run/extra/swebench.py) (SWE-Bench runner), [`WebArena/agents/legacy/agent.py`](https://github.com/google-research/reasoning-bank/blob/main/WebArena/agents/legacy/agent.py) (Browser agent), [`WebArena/induce_scaling.py`](https://github.com/google-research/reasoning-bank/blob/main/WebArena/induce_scaling.py) (Scaling induction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["WebArena agent runs"]
  node_web_run["WebArena runner<br/>[run.py]"]
  node_web_agent["Browser agent<br/>[agent.py]"]
  node_prompting["Dynamic prompting"]
  node_chat["Chat model adapter<br/>[chat_api.py]"]
  node_llm_utils["LLM utilities<br/>[llm_utils.py]"]
  node_browser["WebArena browser harness"]
end

subgraph group_memory["Memory and scaling"]
  node_memory_run["Memory-enabled pipeline<br/>[pipeline_memory.py]"]
  node_memory_scale["Scaling pipeline"]
  node_induce_memory["Memory induction<br/>[induce_memory.py]"]
  node_induce_scaling["Scaling induction<br/>[induce_scaling.py]"]
  node_memory_store["Memory management"]
  node_memory_prompts["Memory instructions"]
  node_reeval["Memory re-evaluation"]
end

subgraph group_evaluation["Evaluation"]
  node_web_eval["Trajectory evaluation"]
  node_web_judge["Evaluation logic<br/>[evaluator.py]"]
  node_web_eval_prompts["Judge prompts"]
  node_web_eval_clients["Judge model clients<br/>[clients.py]"]
  node_autoeval["Auto-evaluation"]
  node_autoeval_logic["Auto-evaluator<br/>[evaluator.py]"]
  node_autoeval_prompts["Auto-eval prompts<br/>[prompts.py]"]
  node_autoeval_clients["Auto-eval clients<br/>[clients.py]"]
end

subgraph group_swe["SWE-Bench agent"]
  node_swe_runner["SWE-Bench runner<br/>[swebench.py]"]
  node_swe_agent["Mini-SWE agent<br/>[default.py]"]
  node_swe_environment["SWE-Bench environment<br/>[docker.py]"]
end

node_operator(("Experiment operator"))
node_llm_service{{"LLM providers"}}
node_websites{{"Web task websites"}}
node_swe_tasks{{"SWE-Bench tasks"}}
node_results["Run results"]

node_operator -->|"configures and starts"| node_web_run
node_web_run -->|"runs agent"| node_web_agent
node_web_agent -->|"builds prompts"| node_prompting
node_web_agent -->|"queries model"| node_chat
node_web_agent -->|"uses utilities"| node_llm_utils
node_web_run -->|"retrieves memories"| node_memory_store
node_web_run -->|"runs browser tasks"| node_browser
node_chat -->|"calls model"| node_llm_service
node_browser -.->|"interacts with"| node_websites
node_operator -->|"starts workflow"| node_memory_run
node_operator -->|"starts scaling"| node_memory_scale
node_memory_run -.->|"induces memories"| node_induce_memory
node_memory_scale -->|"induces scaling"| node_induce_scaling
node_induce_memory -->|"uses instructions"| node_memory_prompts
node_induce_memory -->|"queries model"| node_llm_service
node_induce_scaling -->|"uses memory"| node_memory_store
node_induce_scaling -->|"uses instructions"| node_memory_prompts
node_induce_scaling -->|"queries model"| node_llm_service
node_reeval -->|"uses evaluation harness"| node_browser
node_web_run -->|"writes run output"| node_results
node_web_eval -->|"evaluates trajectory"| node_web_judge
node_web_eval -->|"requests judgments"| node_web_eval_clients
node_web_judge -->|"uses prompts"| node_web_eval_prompts
node_autoeval -->|"evaluates trajectory"| node_autoeval_logic
node_autoeval -->|"requests judgments"| node_autoeval_clients
node_autoeval_logic -->|"uses prompts"| node_autoeval_prompts
node_operator -->|"starts benchmark"| node_swe_runner
node_swe_runner -.->|"runs agent"| node_swe_agent
node_swe_runner -.->|"runs tasks"| node_swe_environment
node_swe_runner -->|"processes benchmark"| node_swe_tasks
node_swe_runner -->|"writes results"| node_results

click node_web_run "https://github.com/google-research/reasoning-bank/blob/main/WebArena/run.py"
click node_web_agent "https://github.com/google-research/reasoning-bank/blob/main/WebArena/agents/legacy/agent.py"
click node_prompting "https://github.com/google-research/reasoning-bank/blob/main/WebArena/agents/legacy/dynamic_prompting.py"
click node_chat "https://github.com/google-research/reasoning-bank/blob/main/WebArena/agents/legacy/utils/chat_api.py"
click node_llm_utils "https://github.com/google-research/reasoning-bank/blob/main/WebArena/agents/legacy/utils/llm_utils.py"
click node_browser "https://github.com/google-research/reasoning-bank/tree/main/third_party/webarena/browser_env"
click node_memory_run "https://github.com/google-research/reasoning-bank/blob/main/WebArena/pipeline_memory.py"
click node_memory_scale "https://github.com/google-research/reasoning-bank/blob/main/WebArena/pipeline_scaling.py"
click node_induce_memory "https://github.com/google-research/reasoning-bank/blob/main/WebArena/induce_memory.py"
click node_induce_scaling "https://github.com/google-research/reasoning-bank/blob/main/WebArena/induce_scaling.py"
click node_memory_store "https://github.com/google-research/reasoning-bank/blob/main/WebArena/memory_management.py"
click node_memory_prompts "https://github.com/google-research/reasoning-bank/blob/main/WebArena/prompts/memory_instruction.py"
click node_reeval "https://github.com/google-research/reasoning-bank/blob/main/WebArena/reeval_memevol_prompt.py"
click node_web_eval "https://github.com/google-research/reasoning-bank/blob/main/WebArena/utils/evaluate_trajectory.py"
click node_web_judge "https://github.com/google-research/reasoning-bank/blob/main/WebArena/utils/evaluator.py"
click node_web_eval_prompts "https://github.com/google-research/reasoning-bank/blob/main/WebArena/prompts/autoeval_prompts.py"
click node_web_eval_clients "https://github.com/google-research/reasoning-bank/blob/main/WebArena/utils/clients.py"
click node_autoeval "https://github.com/google-research/reasoning-bank/blob/main/WebArena/autoeval/evaluate_trajectory.py"
click node_autoeval_logic "https://github.com/google-research/reasoning-bank/blob/main/WebArena/autoeval/evaluator.py"
click node_autoeval_prompts "https://github.com/google-research/reasoning-bank/blob/main/WebArena/autoeval/prompts.py"
click node_autoeval_clients "https://github.com/google-research/reasoning-bank/blob/main/WebArena/autoeval/clients.py"
click node_swe_runner "https://github.com/google-research/reasoning-bank/blob/main/third_party/src/minisweagent/run/extra/swebench.py"
click node_swe_agent "https://github.com/google-research/reasoning-bank/blob/main/third_party/src/minisweagent/agents/default.py"
click node_swe_environment "https://github.com/google-research/reasoning-bank/blob/main/third_party/src/minisweagent/environments/docker.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_web_run,node_web_agent,node_prompting,node_chat,node_llm_utils,node_browser toneBlue
class node_memory_run,node_memory_scale,node_induce_memory,node_induce_scaling,node_memory_store,node_memory_prompts,node_reeval toneAmber
class node_web_eval,node_web_judge,node_web_eval_prompts,node_web_eval_clients,node_autoeval,node_autoeval_logic,node_autoeval_prompts,node_autoeval_clients toneMint
class node_swe_runner,node_swe_agent,node_swe_environment,node_websites,node_swe_tasks toneRose
class node_operator,node_llm_service,node_results toneIndigo
```

## Components

### WebArena agent runs

- [WebArena runner](https://github.com/google-research/reasoning-bank/blob/main/WebArena/run.py): `WebArena/run.py`
- [Browser agent](https://github.com/google-research/reasoning-bank/blob/main/WebArena/agents/legacy/agent.py): `WebArena/agents/legacy/agent.py`
- [Dynamic prompting](https://github.com/google-research/reasoning-bank/blob/main/WebArena/agents/legacy/dynamic_prompting.py): `WebArena/agents/legacy/dynamic_prompting.py`
- [Chat model adapter](https://github.com/google-research/reasoning-bank/blob/main/WebArena/agents/legacy/utils/chat_api.py): `WebArena/agents/legacy/utils/chat_api.py`
- [LLM utilities](https://github.com/google-research/reasoning-bank/blob/main/WebArena/agents/legacy/utils/llm_utils.py): `WebArena/agents/legacy/utils/llm_utils.py`
- [WebArena browser harness](https://github.com/google-research/reasoning-bank/tree/main/third_party/webarena/browser_env): `third_party/webarena/browser_env`

### Memory and scaling

- [Memory-enabled pipeline](https://github.com/google-research/reasoning-bank/blob/main/WebArena/pipeline_memory.py): `WebArena/pipeline_memory.py`
- [Scaling pipeline](https://github.com/google-research/reasoning-bank/blob/main/WebArena/pipeline_scaling.py): `WebArena/pipeline_scaling.py`
- [Memory induction](https://github.com/google-research/reasoning-bank/blob/main/WebArena/induce_memory.py): `WebArena/induce_memory.py`
- [Scaling induction](https://github.com/google-research/reasoning-bank/blob/main/WebArena/induce_scaling.py): `WebArena/induce_scaling.py`
- [Memory management](https://github.com/google-research/reasoning-bank/blob/main/WebArena/memory_management.py): `WebArena/memory_management.py`
- [Memory instructions](https://github.com/google-research/reasoning-bank/blob/main/WebArena/prompts/memory_instruction.py): `WebArena/prompts/memory_instruction.py`
- [Memory re-evaluation](https://github.com/google-research/reasoning-bank/blob/main/WebArena/reeval_memevol_prompt.py): `WebArena/reeval_memevol_prompt.py`

### Evaluation

- [Trajectory evaluation](https://github.com/google-research/reasoning-bank/blob/main/WebArena/utils/evaluate_trajectory.py): `WebArena/utils/evaluate_trajectory.py`
- [Evaluation logic](https://github.com/google-research/reasoning-bank/blob/main/WebArena/utils/evaluator.py): `WebArena/utils/evaluator.py`
- [Judge prompts](https://github.com/google-research/reasoning-bank/blob/main/WebArena/prompts/autoeval_prompts.py): `WebArena/prompts/autoeval_prompts.py`
- [Judge model clients](https://github.com/google-research/reasoning-bank/blob/main/WebArena/utils/clients.py): `WebArena/utils/clients.py`
- [Auto-evaluation](https://github.com/google-research/reasoning-bank/blob/main/WebArena/autoeval/evaluate_trajectory.py): `WebArena/autoeval/evaluate_trajectory.py`
- [Auto-evaluator](https://github.com/google-research/reasoning-bank/blob/main/WebArena/autoeval/evaluator.py): `WebArena/autoeval/evaluator.py`
- [Auto-eval prompts](https://github.com/google-research/reasoning-bank/blob/main/WebArena/autoeval/prompts.py): `WebArena/autoeval/prompts.py`
- [Auto-eval clients](https://github.com/google-research/reasoning-bank/blob/main/WebArena/autoeval/clients.py): `WebArena/autoeval/clients.py`

### SWE-Bench agent

- [SWE-Bench runner](https://github.com/google-research/reasoning-bank/blob/main/third_party/src/minisweagent/run/extra/swebench.py): `third_party/src/minisweagent/run/extra/swebench.py`
- [Mini-SWE agent](https://github.com/google-research/reasoning-bank/blob/main/third_party/src/minisweagent/agents/default.py): `third_party/src/minisweagent/agents/default.py`
- [SWE-Bench environment](https://github.com/google-research/reasoning-bank/blob/main/third_party/src/minisweagent/environments/docker.py): `third_party/src/minisweagent/environments/docker.py`

### Other components

- **Experiment operator**
- **LLM providers**
- **Web task websites**
- **SWE-Bench tasks**
- **Run results**

## Connections

- Experiment operator → WebArena runner: configures and starts (evidence: `README.md`)
- WebArena runner → Browser agent: runs agent (evidence: `WebArena/run.py`)
- Browser agent → Dynamic prompting: builds prompts (evidence: `WebArena/agents/legacy/agent.py`)
- Browser agent → Chat model adapter: queries model (evidence: `WebArena/agents/legacy/agent.py`)
- Browser agent → LLM utilities: uses utilities (evidence: `WebArena/agents/legacy/agent.py`)
- WebArena runner → Memory management: retrieves memories (evidence: `WebArena/run.py`)
- WebArena runner → WebArena browser harness: runs browser tasks (evidence: `README.md`)
- Chat model adapter → LLM providers: calls model (evidence: `WebArena/agents/legacy/utils/chat_api.py`)
- WebArena browser harness → Web task websites: interacts with (evidence: `README.md`)
- Experiment operator → Memory-enabled pipeline: starts workflow (evidence: `README.md`)
- Experiment operator → Scaling pipeline: starts scaling (evidence: `README.md`)
- Memory-enabled pipeline → Memory induction: induces memories
- Scaling pipeline → Scaling induction: induces scaling (evidence: `README.md`)
- Memory induction → Memory instructions: uses instructions (evidence: `WebArena/induce_memory.py`)
- Memory induction → LLM providers: queries model (evidence: `WebArena/induce_memory.py`)
- Scaling induction → Memory management: uses memory (evidence: `WebArena/induce_scaling.py`)
- Scaling induction → Memory instructions: uses instructions (evidence: `WebArena/induce_scaling.py`)
- Scaling induction → LLM providers: queries model (evidence: `WebArena/induce_scaling.py`)
- Memory re-evaluation → WebArena browser harness: uses evaluation harness (evidence: `WebArena/reeval_memevol_prompt.py`)
- WebArena runner → Run results: writes run output (evidence: `WebArena/run.py`)
- Trajectory evaluation → Evaluation logic: evaluates trajectory (evidence: `WebArena/utils/evaluate_trajectory.py`)
- Trajectory evaluation → Judge model clients: requests judgments (evidence: `WebArena/utils/evaluate_trajectory.py`)
- Evaluation logic → Judge prompts: uses prompts (evidence: `WebArena/utils/evaluator.py`)
- Auto-evaluation → Auto-evaluator: evaluates trajectory (evidence: `WebArena/autoeval/evaluate_trajectory.py`)
- Auto-evaluation → Auto-eval clients: requests judgments (evidence: `WebArena/autoeval/evaluate_trajectory.py`)
- Auto-evaluator → Auto-eval prompts: uses prompts (evidence: `WebArena/autoeval/evaluator.py`)
- Experiment operator → SWE-Bench runner: starts benchmark (evidence: `README.md`)
- SWE-Bench runner → Mini-SWE agent: runs agent
- SWE-Bench runner → SWE-Bench environment: runs tasks
- SWE-Bench runner → SWE-Bench tasks: processes benchmark (evidence: `README.md`)
- SWE-Bench runner → Run results: writes results (evidence: `README.md`)
