# manojpremsm/literature_review architecture

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

- Interactive diagram: https://gitdiagram.com/manojpremsm/literature_review
- Repository: https://github.com/manojpremsm/literature_review

## Overview

The product is a Streamlit literature-review assistant. A user submits a topic and paper count; the frontend invokes an async runtime that creates a two-agent team, streams its conversation, and displays the resulting review. The research agent searches arXiv and selects papers for the summarizer. Prompts define each agent’s task, while a model-client factory configures Ollama. The graph follows README-described workflow where source excerpts do not show the full runtime handoff.

Main entry points: [`teams/team_round_robin.py`](https://github.com/manojpremsm/literature_review/blob/main/teams/team_round_robin.py) (Round-robin team), [`Agents/Research_agent.py`](https://github.com/manojpremsm/literature_review/blob/main/Agents/Research_agent.py) (Research agent), [`Streamlit_Frontend.py`](https://github.com/manojpremsm/literature_review/blob/main/Streamlit_Frontend.py) (Streamlit interface), [`main.py`](https://github.com/manojpremsm/literature_review/blob/main/main.py) (Async review runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_frontend["Streamlit interface"]
end

subgraph group_runtime["Conversation runtime"]
  node_runtime["Async review runtime<br/>[main.py]"]
  node_team["Round-robin team"]
end

subgraph group_agents["Review agents"]
  node_research["Research agent<br/>[Research_agent.py]"]
  node_summarizer["Summarization agent"]
end

subgraph group_services["Prompts and integrations"]
  node_research_prompt["Research instructions<br/>[research_prompt.py]"]
  node_summary_prompt["Summary instructions<br/>[summary_prompt.py]"]
  node_arxiv_tool["arXiv search tool<br/>[Arvix_tool.py]"]
  node_model_client["Ollama client"]
end

node_user(("Researcher"))
node_arxiv{{"arXiv service"}}
node_ollama{{"Ollama model"}}

node_user -->|"enters topic"| node_frontend
node_frontend -->|"starts review"| node_runtime
node_runtime -->|"creates team"| node_team
node_runtime -->|"creates client"| node_model_client
node_team -->|"registers agent"| node_research
node_team -->|"registers agent"| node_summarizer
node_research -->|"uses instructions"| node_research_prompt
node_summarizer -->|"uses instructions"| node_summary_prompt
node_research -->|"registers tool"| node_arxiv_tool
node_arxiv_tool -->|"searches papers"| node_arxiv
node_research -->|"passes selected papers"| node_summarizer
node_model_client -.->|"configures model"| node_ollama
node_team -->|"streams conversation"| node_frontend
node_frontend -->|"shows review"| node_user

click node_frontend "https://github.com/manojpremsm/literature_review/blob/main/Streamlit_Frontend.py"
click node_runtime "https://github.com/manojpremsm/literature_review/blob/main/main.py"
click node_team "https://github.com/manojpremsm/literature_review/blob/main/teams/team_round_robin.py"
click node_research "https://github.com/manojpremsm/literature_review/blob/main/Agents/Research_agent.py"
click node_summarizer "https://github.com/manojpremsm/literature_review/blob/main/Agents/Summarizer_agent.py"
click node_research_prompt "https://github.com/manojpremsm/literature_review/blob/main/prompts/research_prompt.py"
click node_summary_prompt "https://github.com/manojpremsm/literature_review/blob/main/prompts/summary_prompt.py"
click node_arxiv_tool "https://github.com/manojpremsm/literature_review/blob/main/tools/Arvix_tool.py"
click node_model_client "https://github.com/manojpremsm/literature_review/blob/main/Models/ollama_model_client.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_frontend toneBlue
class node_runtime,node_team toneAmber
class node_research,node_summarizer toneMint
class node_research_prompt,node_summary_prompt,node_arxiv_tool,node_model_client toneRose
class node_user,node_arxiv,node_ollama toneIndigo
```

## Components

### User interface

- [Streamlit interface](https://github.com/manojpremsm/literature_review/blob/main/Streamlit_Frontend.py): `Streamlit_Frontend.py`

### Conversation runtime

- [Async review runtime](https://github.com/manojpremsm/literature_review/blob/main/main.py): `main.py`
- [Round-robin team](https://github.com/manojpremsm/literature_review/blob/main/teams/team_round_robin.py): `teams/team_round_robin.py`

### Review agents

- [Research agent](https://github.com/manojpremsm/literature_review/blob/main/Agents/Research_agent.py): `Agents/Research_agent.py`
- [Summarization agent](https://github.com/manojpremsm/literature_review/blob/main/Agents/Summarizer_agent.py): `Agents/Summarizer_agent.py`

### Prompts and integrations

- [Research instructions](https://github.com/manojpremsm/literature_review/blob/main/prompts/research_prompt.py): `prompts/research_prompt.py`
- [Summary instructions](https://github.com/manojpremsm/literature_review/blob/main/prompts/summary_prompt.py): `prompts/summary_prompt.py`
- [arXiv search tool](https://github.com/manojpremsm/literature_review/blob/main/tools/Arvix_tool.py): `tools/Arvix_tool.py`
- [Ollama client](https://github.com/manojpremsm/literature_review/blob/main/Models/ollama_model_client.py): `Models/ollama_model_client.py`

### Other components

- **Researcher**
- **arXiv service**
- **Ollama model**

## Connections

- Researcher → Streamlit interface: enters topic (evidence: `README.md`)
- Streamlit interface → Async review runtime: starts review (evidence: `Streamlit_Frontend.py`)
- Async review runtime → Round-robin team: creates team (evidence: `main.py`)
- Async review runtime → Ollama client: creates client (evidence: `main.py`)
- Round-robin team → Research agent: registers agent (evidence: `teams/team_round_robin.py`)
- Round-robin team → Summarization agent: registers agent (evidence: `teams/team_round_robin.py`)
- Research agent → Research instructions: uses instructions (evidence: `Agents/Research_agent.py`)
- Summarization agent → Summary instructions: uses instructions (evidence: `Agents/Summarizer_agent.py`)
- Research agent → arXiv search tool: registers tool (evidence: `Agents/Research_agent.py`)
- arXiv search tool → arXiv service: searches papers (evidence: `tools/Arvix_tool.py`)
- Research agent → Summarization agent: passes selected papers
- Ollama client → Ollama model: configures model (evidence: `Models/ollama_model_client.py`)
- Round-robin team → Streamlit interface: streams conversation (evidence: `README.md`)
- Streamlit interface → Researcher: shows review (evidence: `README.md`)
