# mimshad1999/multi-agent-research-system architecture

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

- Interactive diagram: https://gitdiagram.com/mimshad1999/multi-agent-research-system
- Repository: https://github.com/mimshad1999/multi-agent-research-system

## Overview

ResearchMind accepts a topic through its Streamlit interface or command-line pipeline, searches for sources, scrapes selected content, drafts a report, and critiques it. The app also displays the research and report and offers a Markdown download. The sampled source confirms these orchestration paths and the search/scrape tools; unsampled app sections may contain additional presentation details.

Main entry points: [`pipeline.py`](https://github.com/mimshad1999/multi-agent-research-system/blob/main/pipeline.py) (CLI Pipeline), [`app.py`](https://github.com/mimshad1999/multi-agent-research-system/blob/main/app.py) (Streamlit App), [`agents.py`](https://github.com/mimshad1999/multi-agent-research-system/blob/main/agents.py) (Search Agent), [`tools.py`](https://github.com/mimshad1999/multi-agent-research-system/blob/main/tools.py) (Web Search Tool)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User Interface"]
  node_app["Streamlit App<br/>[app.py]"]
end

subgraph group_orchestration["Pipeline Orchestration"]
  node_pipeline["CLI Pipeline<br/>[pipeline.py]"]
end

subgraph group_research["Research Tools"]
  node_search_agent["Search Agent<br/>[agents.py]"]
  node_reader_agent["Reader Agent<br/>[agents.py]"]
  node_web_search["Web Search Tool<br/>[tools.py]"]
  node_scraper["URL Scraper<br/>[tools.py]"]
end

subgraph group_generation["Report Generation"]
  node_writer["Writer Chain<br/>[agents.py]"]
  node_critic["Critic Chain<br/>[agents.py]"]
end

node_user(("Researcher"))
node_tavily["Tavily Search"]
node_web["Web Pages"]
node_groq["Groq LLM"]

node_user -->|"enters topic"| node_app
node_user -->|"enters topic"| node_pipeline
node_app -->|"invokes"| node_search_agent
node_app -->|"invokes"| node_reader_agent
node_app -->|"invokes"| node_writer
node_app -->|"invokes"| node_critic
node_pipeline -->|"invokes"| node_search_agent
node_pipeline -->|"invokes"| node_reader_agent
node_pipeline -->|"invokes"| node_writer
node_pipeline -->|"invokes"| node_critic
node_search_agent -->|"dispatches"| node_web_search
node_reader_agent -->|"dispatches"| node_scraper
node_web_search -->|"searches"| node_tavily
node_tavily -->|"returns results"| node_web_search
node_scraper -->|"fetches page"| node_web
node_web -->|"returns HTML"| node_scraper
node_search_agent -->|"uses model"| node_groq
node_reader_agent -->|"uses model"| node_groq
node_writer -->|"uses model"| node_groq
node_critic -->|"uses model"| node_groq
node_pipeline -->|"returns state"| node_user

click node_app "https://github.com/mimshad1999/multi-agent-research-system/blob/main/app.py"
click node_pipeline "https://github.com/mimshad1999/multi-agent-research-system/blob/main/pipeline.py"
click node_search_agent "https://github.com/mimshad1999/multi-agent-research-system/blob/main/agents.py"
click node_reader_agent "https://github.com/mimshad1999/multi-agent-research-system/blob/main/agents.py"
click node_web_search "https://github.com/mimshad1999/multi-agent-research-system/blob/main/tools.py"
click node_scraper "https://github.com/mimshad1999/multi-agent-research-system/blob/main/tools.py"
click node_writer "https://github.com/mimshad1999/multi-agent-research-system/blob/main/agents.py"
click node_critic "https://github.com/mimshad1999/multi-agent-research-system/blob/main/agents.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 toneBlue
class node_pipeline toneAmber
class node_search_agent,node_reader_agent,node_web_search,node_scraper toneMint
class node_writer,node_critic toneRose
class node_user,node_tavily,node_web,node_groq toneIndigo
```

## Components

### User Interface

- [Streamlit App](https://github.com/mimshad1999/multi-agent-research-system/blob/main/app.py): `app.py`

### Pipeline Orchestration

- [CLI Pipeline](https://github.com/mimshad1999/multi-agent-research-system/blob/main/pipeline.py): `pipeline.py`

### Research Tools

- [Search Agent](https://github.com/mimshad1999/multi-agent-research-system/blob/main/agents.py): `agents.py`
- [Reader Agent](https://github.com/mimshad1999/multi-agent-research-system/blob/main/agents.py): `agents.py`
- [Web Search Tool](https://github.com/mimshad1999/multi-agent-research-system/blob/main/tools.py): `tools.py`
- [URL Scraper](https://github.com/mimshad1999/multi-agent-research-system/blob/main/tools.py): `tools.py`

### Report Generation

- [Writer Chain](https://github.com/mimshad1999/multi-agent-research-system/blob/main/agents.py): `agents.py`
- [Critic Chain](https://github.com/mimshad1999/multi-agent-research-system/blob/main/agents.py): `agents.py`

### Other components

- **Researcher**
- **Tavily Search**
- **Web Pages**
- **Groq LLM**

## Connections

- Researcher → Streamlit App: enters topic
- Researcher → CLI Pipeline: enters topic
- Streamlit App → Search Agent: invokes
- Streamlit App → Reader Agent: invokes
- Streamlit App → Writer Chain: invokes
- Streamlit App → Critic Chain: invokes
- CLI Pipeline → Search Agent: invokes
- CLI Pipeline → Reader Agent: invokes
- CLI Pipeline → Writer Chain: invokes
- CLI Pipeline → Critic Chain: invokes
- Search Agent → Web Search Tool: dispatches
- Reader Agent → URL Scraper: dispatches
- Web Search Tool → Tavily Search: searches
- Tavily Search → Web Search Tool: returns results
- URL Scraper → Web Pages: fetches page
- Web Pages → URL Scraper: returns HTML
- Search Agent → Groq LLM: uses model
- Reader Agent → Groq LLM: uses model
- Writer Chain → Groq LLM: uses model
- Critic Chain → Groq LLM: uses model
- CLI Pipeline → Researcher: returns state
