# proshanta000/search-engine-llm architecture

> Architecture diagram of the GitHub repository proshanta000/search-engine-llm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/proshanta000/search-engine-llm
- Repository: https://github.com/proshanta000/search-engine-llm

## Overview

ScholarStream is a Streamlit research assistant. A user configures an LLM and enters a prompt; the app builds a tool-enabled LangGraph, invokes it with the conversation history, and renders the resulting messages. The graph can route model tool requests through Wikipedia, arXiv, or DuckDuckGo search before returning to the chatbot. The map also includes configuration, conversation state, and both supported LLM providers. Relationships are limited to those visible in the excerpts or documented by the README; no persistent database is shown.

Main entry points: [`src/langraph_agenticai/main.py`](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/main.py) (App controller), [`src/langraph_agenticai/graph/graph_builder.py`](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/graph/graph_builder.py) (Graph builder), [`src/langraph_agenticai/ui/streamlitui/loadui.py`](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/ui/streamlitui/loadui.py) (UI and controls), [`src/langraph_agenticai/ui/streamlitui/display_result.py`](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/ui/streamlitui/display_result.py) (Chat rendering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Streamlit interface"]
  node_ui_loader["UI and controls<br/>[loadui.py]"]
  node_ui_config["UI configuration<br/>[uiconfigfile.py]"]
  node_result_display["Chat rendering<br/>[display_result.py]"]
end

subgraph group_orchestration["Agent orchestration"]
  node_app_controller["App controller<br/>[main.py]"]
  node_conversation_state["Conversation state<br/>[state.py]"]
  node_graph_builder["Graph builder<br/>[graph_builder.py]"]
  node_chatbot_node["Chatbot node"]
end

subgraph group_providers["LLM providers"]
  node_groq_provider["Groq provider<br/>[groqllm.py]"]
  node_gemini_provider["Gemini provider<br/>[geminillm.py]"]
end

subgraph group_research["Research tools"]
  node_tool_setup["Tool setup and dispatch<br/>[search_tool.py]"]
  node_search_services["Search services<br/>[search_tool.py]"]
end

node_user(("User"))
node_app_entry["App entry<br/>[app.py]"]
node_groq_service{{"Groq LLM"}}
node_gemini_service{{"Gemini LLM"}}

node_user -->|"opens app"| node_app_entry
node_app_entry -->|"starts"| node_app_controller
node_app_controller -->|"loads controls"| node_ui_loader
node_ui_loader -->|"reads settings"| node_ui_config
node_user -->|"configures model"| node_ui_loader
node_app_controller -->|"selects Groq"| node_groq_provider
node_app_controller -->|"selects Gemini"| node_gemini_provider
node_groq_provider -->|"creates client"| node_groq_service
node_gemini_provider -->|"creates client"| node_gemini_service
node_app_controller -->|"builds graph"| node_graph_builder
node_graph_builder -->|"defines state"| node_conversation_state
node_graph_builder -->|"registers node"| node_chatbot_node
node_graph_builder -->|"creates tools"| node_tool_setup
node_tool_setup -->|"wraps searches"| node_search_services
node_app_controller -->|"renders results"| node_result_display
node_result_display -->|"invokes graph"| node_conversation_state
node_user -->|"submits prompt"| node_result_display

click node_app_entry "https://github.com/proshanta000/search-engine-llm/blob/main/app.py"
click node_app_controller "https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/main.py"
click node_ui_loader "https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/ui/streamlitui/loadui.py"
click node_ui_config "https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/ui/uiconfigfile.py"
click node_result_display "https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/ui/streamlitui/display_result.py"
click node_conversation_state "https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/state/state.py"
click node_graph_builder "https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/graph/graph_builder.py"
click node_chatbot_node "https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/nodes/chatbot_with_tools_node.py"
click node_tool_setup "https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/tools/search_tool.py"
click node_search_services "https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/tools/search_tool.py"
click node_groq_provider "https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/LLMS/groqllm.py"
click node_gemini_provider "https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/LLMS/geminillm.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_ui_loader,node_ui_config,node_result_display,node_user toneBlue
class node_app_controller,node_conversation_state,node_graph_builder,node_chatbot_node toneAmber
class node_groq_provider,node_gemini_provider toneMint
class node_tool_setup,node_search_services toneRose
class node_app_entry toneTeal
class node_groq_service,node_gemini_service toneIndigo
```

## Components

### Streamlit interface

- [UI and controls](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/ui/streamlitui/loadui.py): `src/langraph_agenticai/ui/streamlitui/loadui.py`
- [UI configuration](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/ui/uiconfigfile.py): `src/langraph_agenticai/ui/uiconfigfile.py`
- [Chat rendering](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/ui/streamlitui/display_result.py): `src/langraph_agenticai/ui/streamlitui/display_result.py`

### Agent orchestration

- [App controller](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/main.py): `src/langraph_agenticai/main.py`
- [Conversation state](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/state/state.py): `src/langraph_agenticai/state/state.py`
- [Graph builder](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/graph/graph_builder.py): `src/langraph_agenticai/graph/graph_builder.py`
- [Chatbot node](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/nodes/chatbot_with_tools_node.py): `src/langraph_agenticai/nodes/chatbot_with_tools_node.py`

### LLM providers

- [Groq provider](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/LLMS/groqllm.py): `src/langraph_agenticai/LLMS/groqllm.py`
- [Gemini provider](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/LLMS/geminillm.py): `src/langraph_agenticai/LLMS/geminillm.py`

### Research tools

- [Tool setup and dispatch](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/tools/search_tool.py): `src/langraph_agenticai/tools/search_tool.py`
- [Search services](https://github.com/proshanta000/search-engine-llm/blob/main/src/langraph_agenticai/tools/search_tool.py): `src/langraph_agenticai/tools/search_tool.py`

### Other components

- **User**
- [App entry](https://github.com/proshanta000/search-engine-llm/blob/main/app.py): `app.py`
- **Groq LLM**
- **Gemini LLM**

## Connections

- User → App entry: opens app (evidence: `app.py`)
- App entry → App controller: starts (evidence: `app.py`)
- App controller → UI and controls: loads controls (evidence: `src/langraph_agenticai/main.py`)
- UI and controls → UI configuration: reads settings (evidence: `src/langraph_agenticai/ui/streamlitui/loadui.py`)
- User → UI and controls: configures model (evidence: `src/langraph_agenticai/ui/streamlitui/loadui.py`)
- App controller → Groq provider: selects Groq (evidence: `src/langraph_agenticai/main.py`)
- App controller → Gemini provider: selects Gemini (evidence: `src/langraph_agenticai/main.py`)
- Groq provider → Groq LLM: creates client (evidence: `src/langraph_agenticai/LLMS/groqllm.py`)
- Gemini provider → Gemini LLM: creates client (evidence: `src/langraph_agenticai/LLMS/geminillm.py`)
- App controller → Graph builder: builds graph (evidence: `src/langraph_agenticai/main.py`)
- Graph builder → Conversation state: defines state (evidence: `src/langraph_agenticai/graph/graph_builder.py`)
- Graph builder → Chatbot node: registers node (evidence: `src/langraph_agenticai/graph/graph_builder.py`)
- Graph builder → Tool setup and dispatch: creates tools (evidence: `src/langraph_agenticai/graph/graph_builder.py`)
- Tool setup and dispatch → Search services: wraps searches (evidence: `src/langraph_agenticai/tools/search_tool.py`)
- App controller → Chat rendering: renders results (evidence: `src/langraph_agenticai/main.py`)
- Chat rendering → Conversation state: invokes graph (evidence: `src/langraph_agenticai/ui/streamlitui/display_result.py`)
- User → Chat rendering: submits prompt (evidence: `src/langraph_agenticai/ui/streamlitui/display_result.py`)
