# kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment architecture

> Architecture diagram of the GitHub repository kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment
- Repository: https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment

## Overview

##### Project type and purpose
- This is a full-stack, end-to-end “Agentic AI” application built on Streamlit.
- Purpose: Expose an AI “agent” pipeline (graph of nodes and tools) via a web UI (app.py), where user inputs travel planning queries and the system orchestrates LLM calls, state management, tool execution (search, synthesizer, human review), and vectorstore memory.

##### File structure
Top-level and key directories:
- app.py + README.md + Dockerfile: entrypoint, documentation, containerization
- src/AgenticAI/main.py: core orchestration script
- src/AgenticAI/Graph: graph_builder.py – constructs the agent’s execution DAG
- src/AgenticAI/Node: individual processing units (basic_chatbot_node, travel_agent, etc.)
- src/AgenticAI/LLM: groqllm wrapper – abstracts calls to the LLM service
- src/AgenticAI/Tool: external tools & submodules (search_tool, travel orchestrator/evaluator/workers/human_review/synthesizer)
- src/AgenticAI/State: state.py and travel_state.py – holds conversation and travel planning context
- src/AgenticAI/VectorStore: embedding storage & retrieval
- src/AgenticAI/UserInterface/StreamlitUI: Streamlit pages and layout logic

##### Insights from README
- Confirms: built with Streamlit (app_file: app.py), Apache 2.0 license.
- Short description: “Refined langgraphAgenticAI,” i.e., a language-graph agent.

##### Main components
a. Frontend (User Interaction)
- Streamlit UI (app.py + StreamlitUI folder)
b. Agent Orchestrator
- main.py → uses GraphBuilder to assemble a Graph of Nodes
c. Nodes (Compute Units)
- Basic/Chatbot nodes, TravelAgent node
d. State Manager
- state.py, travel_state.py – shared context across nodes
e. LLM Service
- groqllm wrapper calls external LLM API (e.g., Groq)
f. Tooling Subsystem
- search_tool (web search API), travel tools (orchestrator, evaluator, synthesizer, human_review, workers)
g. VectorStore
- Embedding store for retrieval, memory, caching

##### Relationships and interactions
- User submits input via Streamlit → forwarded to main.py
- main.py invokes GraphBuilder → returns Graph of Node objects
- Graph execution iterates Nodes in sequence/branches:
- Each Node reads/writes to State Manager
- Nodes call LLM wrapper or Tooling functions as needed
- Tooling subsystem may call external APIs or human-in-the-loop service
- VectorStore accessed by nodes for memory/embeddings
- Final result sent back to UI for display

##### Architectural patterns and design principles
- Modular “Graph of Nodes” pattern: graph_builder configures flow, supports extension
- Separation of concerns: UI / Orchestrator / Nodes / LLM / Tools / State / Storage
- Dependency injection via GraphBuilder
- External service wrappers (LLM, search) abstracted behind interfaces
- Stateful vs. stateless components clearly separated

##### Technologies and frameworks
- Python 3.x, Streamlit
- groqllm (LLM client)
- Potential HTTP clients for search and tool APIs
- Docker for containerization
- VSCode/GitHub Actions (main.yml) for CI/CD

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% UI Layer
    subgraph "UI Layer"
        direction TB
        App["Streamlit App\n(app.py)"]:::internal
        UI_Lib["StreamlitUI\n(folder)"]:::internal
        Display["display_result.py"]:::internal
        LoadUI["loadUI.py"]:::internal
        UIConfig["UIconfigFile.py"]:::internal
        UIConfigIni["UIconfigFile.ini"]:::internal
    end

    %% Agent Engine
    subgraph "Agent Engine"
        direction TB
        Orchestrator["main.py"]:::internal
        GraphBuilder["graph_builder.py"]:::internal
        subgraph "Nodes"
            direction TB
            BasicNode["basic_chatbot_node.py"]:::internal
            ChatbotToolNode["chatbot_with_Tool_node.py"]:::internal
            TravelAgentNode["travel_agent.py"]:::internal
        end
        subgraph "State Manager"
            direction TB
            State["state.py"]:::state
            TravelState["travel_state.py"]:::state
        end
    end

    %% LLM and Tools
    subgraph "LLM Service"
        direction TB
        LLMWrapper["groqllm.py"]:::tool
    end

    subgraph "Tooling Subsystem"
        direction TB
        SearchTool["search_tool.py"]:::tool
        subgraph "Travel Tools"
            direction TB
            OrchTool["orchestrator.py"]:::tool
            Evaluator["evaluator.py"]:::tool
            Synthesizer["synthesizer.py"]:::tool
            HumanReview["human_review.py"]:::tool
            Workers["workers.py"]:::tool
        end
    end

    %% External Services
    subgraph "External Services"
        direction TB
        ExternalLLM["LLM API"]:::external
        ExternalSearch["Search API"]:::external
        HumanService["Human-in-the-loop Service"]:::external
    end

    %% Data Store
    VectorStore["VectorStore\n(Embeddings)"]:::datastore

    %% Deployment & CI/CD
    subgraph "Deployment & CI/CD"
        direction TB
        Dockerfile["Dockerfile"]:::external
        CI[".github/workflows/main.yml"]:::external
        README["README.md"]:::external
        Req["requirements.txt"]:::external
    end

    %% Connections
    App -->|"user input"| Orchestrator
    Orchestrator -->|"build graph"| GraphBuilder
    GraphBuilder --> BasicNode
    GraphBuilder --> ChatbotToolNode
    GraphBuilder --> TravelAgentNode

    BasicNode -->|"read/write state"| State
    BasicNode -->|"prompt"| LLMWrapper
    ChatbotToolNode -->|"read/write state"| State
    ChatbotToolNode -->|"calls tool"| SearchTool
    ChatbotToolNode -->|"prompt"| LLMWrapper
    TravelAgentNode -->|"read/write travel_state"| TravelState
    TravelAgentNode -->|"calls travel tools"| OrchTool
    TravelAgentNode -->|"calls travel tools"| Evaluator
    TravelAgentNode -->|"calls travel tools"| Synthesizer
    TravelAgentNode -->|"calls travel tools"| HumanReview

    LLMWrapper -->|"LLM request"| ExternalLLM
    SearchTool -->|"search query"| ExternalSearch
    HumanReview -->|"human review task"| HumanService

    BasicNode <-->|"embeddings"| VectorStore
    ChatbotToolNode <-->|"embeddings"| VectorStore
    TravelAgentNode <-->|"embeddings"| VectorStore

    Orchestrator -->|"output result"| App

    %% Click Events
    click App "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/app.py"
    click UI_Lib "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/tree/main/src/AgenticAI/UserInterface/StreamlitUI/"
    click Display "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/UserInterface/StreamlitUI/display_result.py"
    click LoadUI "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/UserInterface/StreamlitUI/loadUI.py"
    click UIConfig "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/UserInterface/UIconfigFile.py"
    click UIConfigIni "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/UserInterface/UIconfigFile.ini"
    click Orchestrator "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/main.py"
    click GraphBuilder "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/Graph/graph_builder.py"
    click BasicNode "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/Node/basic_chatbot_node.py"
    click ChatbotToolNode "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/Node/chatbot_with_Tool_node.py"
    click TravelAgentNode "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/Node/travel_agent.py"
    click State "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/State/state.py"
    click TravelState "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/State/travel_state.py"
    click LLMWrapper "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/LLM/groqllm.py"
    click SearchTool "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/Tool/search_tool.py"
    click OrchTool "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/Tool/travel/orchestrator.py"
    click Evaluator "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/Tool/travel/evaluator.py"
    click Synthesizer "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/Tool/travel/synthesizer.py"
    click HumanReview "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/Tool/travel/human_review.py"
    click Workers "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/src/AgenticAI/Tool/travel/workers.py"
    click VectorStore "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/tree/main/src/AgenticAI/VectorStore/"
    click Dockerfile "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/tree/main/Dockerfile"
    click CI "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/.github/workflows/main.yml"
    click README "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/README.md"
    click Req "https://github.com/kaushalprajapatikp/agentic-ai-webapp-with-multiple-ai-agents-and-deployment/blob/main/requirements.txt"

    %% Styles
    classDef internal fill:#ADD8E6,stroke:#036,stroke-width:1px
    classDef tool fill:#87CEFA,stroke:#036,stroke-width:1px
    classDef external fill:#98FB98,stroke:#060,stroke-width:1px
    classDef datastore fill:#FFFF99,stroke:#996,stroke-width:1px
    classDef state fill:#B0E0E6,stroke:#036,stroke-width:1px
```
