# prasun-steve/research_mind---the-multi-agent-research-system architecture

> Architecture diagram of the GitHub repository prasun-steve/research_mind---the-multi-agent-research-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prasun-steve/research_mind---the-multi-agent-research-system
- Repository: https://github.com/prasun-steve/research_mind---the-multi-agent-research-system

## Overview

ResearchMind accepts a topic through either the Streamlit dashboard or CLI, then runs search, source reading, report writing, and critique to return a report plus feedback. The two entry points orchestrate the stages directly; agents.py configures the shared Hugging Face model and writer/critic chains, while tools.py implements Tavily search and URL scraping. The README documents both interfaces and the four-stage workflow. App excerpts are partial, so the graph omits unshown UI details and uses only relationships visible in excerpts or documented by the README.

Main entry points: [`pipeline.py`](https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/pipeline.py) (CLI runner), [`app.py`](https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/app.py) (Streamlit dashboard), [`agents.py`](https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/agents.py) (Search agent), [`tools.py`](https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/tools.py) (Search and scrape tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User interfaces"]
  node_cli["CLI runner<br/>[pipeline.py]"]
  node_dashboard["Streamlit dashboard<br/>[app.py]"]
end

subgraph group_research["Research workflow"]
  node_search["Search agent<br/>[agents.py]"]
  node_reader["Reader agent<br/>[agents.py]"]
  node_writer["Writer chain<br/>[agents.py]"]
  node_critic["Critic chain<br/>[agents.py]"]
end

subgraph group_runtime["AI and web services"]
  node_webtools["Search and scrape tools<br/>[tools.py]"]
  node_huggingface["Hugging Face inference"]
  node_tavily["Tavily search"]
  node_web["Source websites"]
end

node_researcher(("Researcher"))

node_researcher -->|"enters topic"| node_cli
node_researcher -->|"enters topic"| node_dashboard
node_cli -->|"invokes"| node_search
node_cli -->|"invokes"| node_reader
node_cli -->|"invokes"| node_writer
node_cli -->|"invokes"| node_critic
node_dashboard -->|"invokes"| node_search
node_dashboard -->|"invokes"| node_reader
node_dashboard -->|"invokes"| node_writer
node_dashboard -->|"invokes"| node_critic
node_search -->|"uses search tool"| node_webtools
node_reader -->|"uses scrape tool"| node_webtools
node_webtools -->|"searches"| node_tavily
node_webtools -->|"requests page"| node_web
node_search -.->|"runs model"| node_huggingface
node_reader -.->|"runs model"| node_huggingface
node_writer -.->|"runs model"| node_huggingface
node_critic -.->|"runs model"| node_huggingface

click node_cli "https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/pipeline.py"
click node_dashboard "https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/app.py"
click node_search "https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/agents.py"
click node_reader "https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/agents.py"
click node_writer "https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/agents.py"
click node_critic "https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/agents.py"
click node_webtools "https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/tools.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_cli,node_dashboard toneBlue
class node_search,node_reader,node_writer,node_critic toneAmber
class node_webtools,node_huggingface,node_tavily,node_web toneMint
class node_researcher toneIndigo
```

## Components

### User interfaces

- [CLI runner](https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/pipeline.py): `pipeline.py`
- [Streamlit dashboard](https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/app.py): `app.py`

### Research workflow

- [Search agent](https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/agents.py): `agents.py`
- [Reader agent](https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/agents.py): `agents.py`
- [Writer chain](https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/agents.py): `agents.py`
- [Critic chain](https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/agents.py): `agents.py`

### AI and web services

- [Search and scrape tools](https://github.com/prasun-steve/research_mind---the-multi-agent-research-system/blob/main/tools.py): `tools.py`
- **Hugging Face inference**
- **Tavily search**
- **Source websites**

### Other components

- **Researcher**

## Connections

- Researcher → CLI runner: enters topic (evidence: `README.md`)
- Researcher → Streamlit dashboard: enters topic (evidence: `README.md`)
- CLI runner → Search agent: invokes (evidence: `pipeline.py`)
- CLI runner → Reader agent: invokes (evidence: `pipeline.py`)
- CLI runner → Writer chain: invokes (evidence: `pipeline.py`)
- CLI runner → Critic chain: invokes (evidence: `pipeline.py`)
- Streamlit dashboard → Search agent: invokes (evidence: `app.py`)
- Streamlit dashboard → Reader agent: invokes (evidence: `app.py`)
- Streamlit dashboard → Writer chain: invokes (evidence: `app.py`)
- Streamlit dashboard → Critic chain: invokes (evidence: `app.py`)
- Search agent → Search and scrape tools: uses search tool (evidence: `agents.py`)
- Reader agent → Search and scrape tools: uses scrape tool (evidence: `agents.py`)
- Search and scrape tools → Tavily search: searches (evidence: `tools.py`)
- Search and scrape tools → Source websites: requests page (evidence: `tools.py`)
- Search agent → Hugging Face inference: runs model
- Reader agent → Hugging Face inference: runs model
- Writer chain → Hugging Face inference: runs model
- Critic chain → Hugging Face inference: runs model
