# josephsenior/langgraph-workflow-orchestrator architecture

> Architecture diagram of the GitHub repository josephsenior/langgraph-workflow-orchestrator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/josephsenior/langgraph-workflow-orchestrator
- Repository: https://github.com/josephsenior/langgraph-workflow-orchestrator

## Overview

This is a LangGraph-based multi-agent workflow application. Users select or invoke a workflow through the chat or Gradio interface, provide input, and receive an execution result or graph visualization. The workflow definitions encode approval, parallel, iterative-refinement, and conditional-routing stages; shared nodes update workflow state and LLM nodes delegate prompts through agents to the Gemini client. The README documents checkpointing and human approval, but the sampled excerpts do not establish the full persistence or approval-resumption path, so those links are limited.

Main entry points: [`backend/workflows/base_workflow.py`](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/workflows/base_workflow.py) (Graph runtime), [`backend/nodes/llm_node.py`](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/nodes/llm_node.py) (LLM processing), [`frontend/chainlit_app.py`](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/frontend/chainlit_app.py) (Chat interface), [`frontend/gradio_app.py`](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/frontend/gradio_app.py) (Gradio interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_chainlit["Chat interface<br/>[chainlit_app.py]"]
  node_gradio["Gradio interface<br/>[gradio_app.py]"]
end

subgraph group_orchestration["Workflow orchestration"]
  node_approval_workflow["Approval workflow"]
  node_parallel_workflow["Parallel workflow"]
  node_iterative_workflow["Iterative workflow"]
  node_conditional_workflow["Conditional workflow"]
  node_workflow_runtime["Graph runtime<br/>[base_workflow.py]"]
end

subgraph group_execution["Nodes and agents"]
  node_base_node["Node execution<br/>[base_node.py]"]
  node_llm_node["LLM processing<br/>[llm_node.py]"]
  node_approval_node["Approval step<br/>[approval_node.py]"]
  node_conditional_node["Conditional routing"]
  node_agent["Agent<br/>[base_agent.py]"]
end

subgraph group_models["State and LLM"]
  node_workflow_state["Workflow state<br/>[models.py]"]
  node_gemini_client["Gemini client<br/>[gemini_client.py]"]
end

node_user(("User"))
node_gemini{{"Gemini API"}}

node_user -->|"submits input"| node_chainlit
node_user -->|"submits input"| node_gradio
node_chainlit -->|"invokes workflows"| node_approval_workflow
node_chainlit -->|"invokes workflows"| node_parallel_workflow
node_chainlit -->|"invokes workflows"| node_iterative_workflow
node_chainlit -->|"invokes workflows"| node_conditional_workflow
node_gradio -->|"runs workflow"| node_approval_workflow
node_gradio -->|"runs workflow"| node_parallel_workflow
node_gradio -->|"runs workflow"| node_iterative_workflow
node_gradio -->|"runs workflow"| node_conditional_workflow
node_approval_workflow -->|"extends runtime"| node_workflow_runtime
node_parallel_workflow -->|"extends runtime"| node_workflow_runtime
node_iterative_workflow -->|"extends runtime"| node_workflow_runtime
node_conditional_workflow -->|"extends runtime"| node_workflow_runtime
node_workflow_runtime -->|"registers execution"| node_base_node
node_workflow_runtime -->|"invokes with state"| node_workflow_state
node_approval_workflow -->|"registers steps"| node_llm_node
node_approval_workflow -->|"registers approval"| node_approval_node
node_parallel_workflow -->|"registers steps"| node_llm_node
node_iterative_workflow -->|"registers steps"| node_llm_node
node_iterative_workflow -->|"routes by quality"| node_conditional_node
node_conditional_workflow -->|"registers processors"| node_llm_node
node_conditional_workflow -->|"routes by type"| node_conditional_node
node_llm_node -->|"inherits execution"| node_base_node
node_approval_node -->|"inherits execution"| node_base_node
node_conditional_node -->|"inherits execution"| node_base_node
node_llm_node -->|"calls agent"| node_agent
node_agent -->|"creates client"| node_gemini_client
node_gemini_client -->|"sends prompts"| node_gemini
node_base_node -->|"updates state"| node_workflow_state

click node_chainlit "https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/frontend/chainlit_app.py"
click node_gradio "https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/frontend/gradio_app.py"
click node_approval_workflow "https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/workflows/approval_workflow.py"
click node_parallel_workflow "https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/workflows/parallel_workflow.py"
click node_iterative_workflow "https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/workflows/iterative_workflow.py"
click node_conditional_workflow "https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/workflows/conditional_workflow.py"
click node_workflow_runtime "https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/workflows/base_workflow.py"
click node_base_node "https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/nodes/base_node.py"
click node_llm_node "https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/nodes/llm_node.py"
click node_approval_node "https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/nodes/approval_node.py"
click node_conditional_node "https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/nodes/conditional_node.py"
click node_agent "https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/agents/base_agent.py"
click node_workflow_state "https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/models.py"
click node_gemini_client "https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/utils/gemini_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_chainlit,node_gradio,node_user toneBlue
class node_approval_workflow,node_parallel_workflow,node_iterative_workflow,node_conditional_workflow,node_workflow_runtime toneAmber
class node_base_node,node_llm_node,node_approval_node,node_conditional_node,node_agent,node_gemini toneMint
class node_workflow_state,node_gemini_client toneRose
```

## Components

### User interfaces

- [Chat interface](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/frontend/chainlit_app.py): `frontend/chainlit_app.py`
- [Gradio interface](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/frontend/gradio_app.py): `frontend/gradio_app.py`

### Workflow orchestration

- [Approval workflow](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/workflows/approval_workflow.py): `backend/workflows/approval_workflow.py`
- [Parallel workflow](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/workflows/parallel_workflow.py): `backend/workflows/parallel_workflow.py`
- [Iterative workflow](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/workflows/iterative_workflow.py): `backend/workflows/iterative_workflow.py`
- [Conditional workflow](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/workflows/conditional_workflow.py): `backend/workflows/conditional_workflow.py`
- [Graph runtime](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/workflows/base_workflow.py): `backend/workflows/base_workflow.py`

### Nodes and agents

- [Node execution](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/nodes/base_node.py): `backend/nodes/base_node.py`
- [LLM processing](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/nodes/llm_node.py): `backend/nodes/llm_node.py`
- [Approval step](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/nodes/approval_node.py): `backend/nodes/approval_node.py`
- [Conditional routing](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/nodes/conditional_node.py): `backend/nodes/conditional_node.py`
- [Agent](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/agents/base_agent.py): `backend/agents/base_agent.py`

### State and LLM

- [Workflow state](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/models.py): `backend/models.py`
- [Gemini client](https://github.com/josephsenior/langgraph-workflow-orchestrator/blob/main/backend/utils/gemini_client.py): `backend/utils/gemini_client.py`

### Other components

- **User**
- **Gemini API**

## Connections

- User → Chat interface: submits input (evidence: `README.md`)
- User → Gradio interface: submits input (evidence: `frontend/gradio_app.py`)
- Chat interface → Approval workflow: invokes workflows (evidence: `frontend/chainlit_app.py`)
- Chat interface → Parallel workflow: invokes workflows (evidence: `frontend/chainlit_app.py`)
- Chat interface → Iterative workflow: invokes workflows (evidence: `frontend/chainlit_app.py`)
- Chat interface → Conditional workflow: invokes workflows (evidence: `frontend/chainlit_app.py`)
- Gradio interface → Approval workflow: runs workflow (evidence: `frontend/gradio_app.py`)
- Gradio interface → Parallel workflow: runs workflow (evidence: `frontend/gradio_app.py`)
- Gradio interface → Iterative workflow: runs workflow (evidence: `frontend/gradio_app.py`)
- Gradio interface → Conditional workflow: runs workflow (evidence: `frontend/gradio_app.py`)
- Approval workflow → Graph runtime: extends runtime (evidence: `backend/workflows/approval_workflow.py`)
- Parallel workflow → Graph runtime: extends runtime (evidence: `backend/workflows/parallel_workflow.py`)
- Iterative workflow → Graph runtime: extends runtime (evidence: `backend/workflows/iterative_workflow.py`)
- Conditional workflow → Graph runtime: extends runtime (evidence: `backend/workflows/conditional_workflow.py`)
- Graph runtime → Node execution: registers execution (evidence: `backend/workflows/base_workflow.py`)
- Graph runtime → Workflow state: invokes with state (evidence: `backend/workflows/base_workflow.py`)
- Approval workflow → LLM processing: registers steps (evidence: `backend/workflows/approval_workflow.py`)
- Approval workflow → Approval step: registers approval (evidence: `backend/workflows/approval_workflow.py`)
- Parallel workflow → LLM processing: registers steps (evidence: `backend/workflows/parallel_workflow.py`)
- Iterative workflow → LLM processing: registers steps (evidence: `backend/workflows/iterative_workflow.py`)
- Iterative workflow → Conditional routing: routes by quality (evidence: `backend/workflows/iterative_workflow.py`)
- Conditional workflow → LLM processing: registers processors (evidence: `backend/workflows/conditional_workflow.py`)
- Conditional workflow → Conditional routing: routes by type (evidence: `backend/workflows/conditional_workflow.py`)
- LLM processing → Node execution: inherits execution (evidence: `backend/nodes/llm_node.py`)
- Approval step → Node execution: inherits execution (evidence: `backend/nodes/approval_node.py`)
- Conditional routing → Node execution: inherits execution (evidence: `backend/nodes/conditional_node.py`)
- LLM processing → Agent: calls agent (evidence: `backend/nodes/llm_node.py`)
- Agent → Gemini client: creates client (evidence: `backend/agents/base_agent.py`)
- Gemini client → Gemini API: sends prompts (evidence: `backend/utils/gemini_client.py`)
- Node execution → Workflow state: updates state (evidence: `backend/nodes/base_node.py`)
