# jahnavikorukonda/multi_agent_system architecture

> Architecture diagram of the GitHub repository jahnavikorukonda/multi_agent_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/jahnavikorukonda/multi_agent_system
- Repository: https://github.com/jahnavikorukonda/multi_agent_system

## Overview

ResearchMind accepts a topic, searches for sources, scrapes a relevant page, drafts a report, and critiques it. The Streamlit app orchestrates and displays the interactive workflow; pipeline.py offers a separate command-line workflow. The sampled code supports the search, scrape, writing, and critique stages, but does not show persistence or other result destinations.

Main entry points: [`agents.py`](https://github.com/jahnavikorukonda/multi_agent_system/blob/main/agents.py) (Agents and chains), [`app.py`](https://github.com/jahnavikorukonda/multi_agent_system/blob/main/app.py) (Streamlit app), [`pipeline.py`](https://github.com/jahnavikorukonda/multi_agent_system/blob/main/pipeline.py) (CLI pipeline), [`tools.py`](https://github.com/jahnavikorukonda/multi_agent_system/blob/main/tools.py) (Search and scrape tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_app["Streamlit app<br/>[app.py]"]
  node_pipeline["CLI pipeline<br/>[pipeline.py]"]
end

subgraph group_research["Research stages"]
  node_agents["Agents and chains<br/>[agents.py]"]
  node_tools["Search and scrape tools<br/>[tools.py]"]
  node_search["Web search<br/>[tools.py]"]
  node_scrape["Page scraping<br/>[tools.py]"]
  node_writer["Report writer<br/>[agents.py]"]
  node_critic["Report critic<br/>[agents.py]"]
end

subgraph group_integrations["External services"]
  node_groq["Groq LLM"]
  node_tavily["Tavily Search"]
  node_web["Source websites"]
end

node_user(("Researcher"))

node_user -->|"enters topic"| node_app
node_user -->|"enters topic"| node_pipeline
node_app -->|"builds and invokes"| node_agents
node_pipeline -->|"invokes search"| node_search
node_pipeline -->|"builds reader; invokes chains"| node_agents
node_agents -->|"configures agent tools"| node_tools
node_tools -->|"defines"| node_search
node_tools -->|"defines"| node_scrape
node_search -->|"queries"| node_tavily
node_scrape -->|"fetches page"| node_web
node_agents -->|"sends prompts"| node_groq
node_agents -->|"defines chain"| node_writer
node_agents -->|"defines chain"| node_critic
node_app -->|"invokes chain"| node_writer
node_app -->|"invokes chain"| node_critic
node_app -->|"displays results"| node_user
node_pipeline -->|"returns state"| node_user

click node_app "https://github.com/jahnavikorukonda/multi_agent_system/blob/main/app.py"
click node_pipeline "https://github.com/jahnavikorukonda/multi_agent_system/blob/main/pipeline.py"
click node_agents "https://github.com/jahnavikorukonda/multi_agent_system/blob/main/agents.py"
click node_tools "https://github.com/jahnavikorukonda/multi_agent_system/blob/main/tools.py"
click node_search "https://github.com/jahnavikorukonda/multi_agent_system/blob/main/tools.py"
click node_scrape "https://github.com/jahnavikorukonda/multi_agent_system/blob/main/tools.py"
click node_writer "https://github.com/jahnavikorukonda/multi_agent_system/blob/main/agents.py"
click node_critic "https://github.com/jahnavikorukonda/multi_agent_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,node_pipeline toneBlue
class node_agents,node_tools,node_search,node_scrape,node_writer,node_critic toneAmber
class node_groq,node_tavily,node_web toneMint
class node_user toneIndigo
```

## Components

### Entry points

- [Streamlit app](https://github.com/jahnavikorukonda/multi_agent_system/blob/main/app.py): `app.py`
- [CLI pipeline](https://github.com/jahnavikorukonda/multi_agent_system/blob/main/pipeline.py): `pipeline.py`

### Research stages

- [Agents and chains](https://github.com/jahnavikorukonda/multi_agent_system/blob/main/agents.py): `agents.py`
- [Search and scrape tools](https://github.com/jahnavikorukonda/multi_agent_system/blob/main/tools.py): `tools.py`
- [Web search](https://github.com/jahnavikorukonda/multi_agent_system/blob/main/tools.py): `tools.py`
- [Page scraping](https://github.com/jahnavikorukonda/multi_agent_system/blob/main/tools.py): `tools.py`
- [Report writer](https://github.com/jahnavikorukonda/multi_agent_system/blob/main/agents.py): `agents.py`
- [Report critic](https://github.com/jahnavikorukonda/multi_agent_system/blob/main/agents.py): `agents.py`

### External services

- **Groq LLM**
- **Tavily Search**
- **Source websites**

### Other components

- **Researcher**

## Connections

- Researcher → Streamlit app: enters topic
- Researcher → CLI pipeline: enters topic
- Streamlit app → Agents and chains: builds and invokes
- CLI pipeline → Web search: invokes search
- CLI pipeline → Agents and chains: builds reader; invokes chains
- Agents and chains → Search and scrape tools: configures agent tools
- Search and scrape tools → Web search: defines
- Search and scrape tools → Page scraping: defines
- Web search → Tavily Search: queries
- Page scraping → Source websites: fetches page
- Agents and chains → Groq LLM: sends prompts
- Agents and chains → Report writer: defines chain
- Agents and chains → Report critic: defines chain
- Streamlit app → Report writer: invokes chain
- Streamlit app → Report critic: invokes chain
- Streamlit app → Researcher: displays results
- CLI pipeline → Researcher: returns state
