# luuisotorres/langgraph-agent-orchestrator architecture

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

- Interactive diagram: https://gitdiagram.com/luuisotorres/langgraph-agent-orchestrator
- Repository: https://github.com/luuisotorres/langgraph-agent-orchestrator

## Overview

This repository is a command-line customer-support triage agent. A user enters a query, the LangGraph workflow uses an OpenAI chat model to classify it, conditionally dispatches to billing, technical, or general response logic, and prints the reply. The graph state carries messages and category; an in-memory checkpointer preserves thread context. README-level cyclic conversational behavior is represented by the persistent conversation state rather than an additional routing loop. Source evidence is limited to main.py and the README.

Main entry points: [`main.py`](https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py) (StateGraph workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["CLI interaction"]
  node_cli["CLI loop<br/>[main.py]"]
end

subgraph group_workflow["Triage workflow"]
  node_graph["StateGraph workflow<br/>[main.py]"]
  node_classifier["Intent classifier<br/>[main.py]"]
  node_router["Conditional router<br/>[main.py]"]
  node_llm{{"OpenAI chat model"}}
  node_end(("Workflow end<br/>[main.py]"))
end

subgraph group_responses["Department responses"]
  node_billing["Billing response<br/>[main.py]"]
  node_technical["Technical response<br/>[main.py]"]
  node_general["General response<br/>[main.py]"]
end

subgraph group_memory["Conversation state"]
  node_state["Graph state<br/>[main.py]"]
  node_checkpoint[("In-memory checkpoint<br/>[main.py]")]
end

node_user(("Support user"))

node_user -->|"enters query"| node_cli
node_cli -->|"invokes workflow"| node_graph
node_graph -->|"starts at"| node_classifier
node_classifier -->|"classifies with"| node_llm
node_classifier -->|"routes by category"| node_router
node_router -->|"dispatches billing"| node_billing
node_router -->|"dispatches technical"| node_technical
node_router -->|"dispatches general"| node_general
node_billing -->|"generates response"| node_llm
node_technical -->|"generates response"| node_llm
node_general -->|"generates response"| node_llm
node_billing -->|"completes workflow"| node_end
node_technical -->|"completes workflow"| node_end
node_general -->|"completes workflow"| node_end
node_graph -->|"passes state"| node_state
node_graph -->|"persists thread state"| node_checkpoint
node_cli -->|"prints reply"| node_user

click node_cli "https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py"
click node_graph "https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py"
click node_classifier "https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py"
click node_router "https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py"
click node_billing "https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py"
click node_technical "https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py"
click node_general "https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py"
click node_state "https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py"
click node_checkpoint "https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py"
click node_end "https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.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_cli,node_user toneBlue
class node_graph,node_classifier,node_router,node_llm,node_end toneAmber
class node_billing,node_technical,node_general toneMint
class node_state,node_checkpoint toneRose
```

## Components

### CLI interaction

- [CLI loop](https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py): `main.py`

### Triage workflow

- [StateGraph workflow](https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py): `main.py`
- [Intent classifier](https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py): `main.py`
- [Conditional router](https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py): `main.py`
- **OpenAI chat model**
- [Workflow end](https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py): `main.py`

### Department responses

- [Billing response](https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py): `main.py`
- [Technical response](https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py): `main.py`
- [General response](https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py): `main.py`

### Conversation state

- [Graph state](https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py): `main.py`
- [In-memory checkpoint](https://github.com/luuisotorres/langgraph-agent-orchestrator/blob/main/main.py): `main.py`

### Other components

- **Support user**

## Connections

- Support user → CLI loop: enters query (evidence: `main.py`)
- CLI loop → StateGraph workflow: invokes workflow (evidence: `main.py`)
- StateGraph workflow → Intent classifier: starts at (evidence: `main.py`)
- Intent classifier → OpenAI chat model: classifies with (evidence: `main.py`)
- Intent classifier → Conditional router: routes by category (evidence: `main.py`)
- Conditional router → Billing response: dispatches billing (evidence: `main.py`)
- Conditional router → Technical response: dispatches technical (evidence: `main.py`)
- Conditional router → General response: dispatches general (evidence: `main.py`)
- Billing response → OpenAI chat model: generates response (evidence: `main.py`)
- Technical response → OpenAI chat model: generates response (evidence: `main.py`)
- General response → OpenAI chat model: generates response (evidence: `main.py`)
- Billing response → Workflow end: completes workflow (evidence: `main.py`)
- Technical response → Workflow end: completes workflow (evidence: `main.py`)
- General response → Workflow end: completes workflow (evidence: `main.py`)
- StateGraph workflow → Graph state: passes state (evidence: `main.py`)
- StateGraph workflow → In-memory checkpoint: persists thread state (evidence: `main.py`)
- CLI loop → Support user: prints reply (evidence: `main.py`)
