# deeparajasabeson/langgraph-multiagents architecture

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

- Interactive diagram: https://gitdiagram.com/deeparajasabeson/langgraph-multiagents
- Repository: https://github.com/deeparajasabeson/langgraph-multiagents

## Overview

LangGraph-MultiAgents is a FastAPI customer-query service: callers submit a question, the coordinator asks an LLM to classify it, then dispatches to support or sales specialists, or answers general queries directly. Specialist agents use shared model-backed agent graphs and domain tools; the tools currently read hard-coded FAQ, order, and promotion data rather than an external store. Edges reflect calls shown in excerpts; no separate database or persistent state is evidenced.

Main entry points: [`agents/coordinator.py`](https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/coordinator.py) (Intent coordinator), [`agents/support.py`](https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/support.py) (Support agent), [`agents/base.py`](https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/base.py) (Agent runtime), [`agents/sales.py`](https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/sales.py) (Sales agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API service"]
  node_fastapi["Query API<br/>[main.py]"]
end

subgraph group_routing["Query routing"]
  node_coordinator["Intent coordinator<br/>[coordinator.py]"]
  node_general["General answer<br/>[coordinator.py]"]
end

subgraph group_agents["Specialist agents"]
  node_support["Support agent<br/>[support.py]"]
  node_sales["Sales agent<br/>[sales.py]"]
  node_base["Agent runtime<br/>[base.py]"]
end

subgraph group_shared["Models and tools"]
  node_client["Model client<br/>[client.py]"]
  node_faq["FAQ lookup<br/>[tools.py]"]
  node_orders["Order status<br/>[tools.py]"]
  node_promotions["Promotions lookup<br/>[tools.py]"]
end

node_caller(("API caller"))
node_llm["Chat model service"]

node_caller -->|"submits query"| node_fastapi
node_fastapi -->|"routes question"| node_coordinator
node_coordinator -->|"gets model"| node_client
node_client -->|"configures model"| node_llm
node_coordinator -->|"classifies query"| node_llm
node_coordinator -->|"dispatches support"| node_support
node_coordinator -->|"dispatches sales"| node_sales
node_coordinator -->|"answers general"| node_general
node_general -->|"generates answer"| node_llm
node_support -->|"inherits runtime"| node_base
node_sales -->|"inherits runtime"| node_base
node_support -->|"registers tool"| node_faq
node_support -->|"registers tool"| node_orders
node_sales -->|"registers tool"| node_promotions
node_base -->|"gets model"| node_client
node_base -->|"runs agent graph"| node_llm

click node_fastapi "https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/main.py"
click node_coordinator "https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/coordinator.py"
click node_general "https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/coordinator.py"
click node_support "https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/support.py"
click node_sales "https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/sales.py"
click node_base "https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/base.py"
click node_client "https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/client.py"
click node_faq "https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/tools.py"
click node_orders "https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/tools.py"
click node_promotions "https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/tools.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_fastapi toneBlue
class node_coordinator,node_general toneAmber
class node_support,node_sales,node_base,node_caller toneMint
class node_client,node_faq,node_orders,node_promotions toneRose
class node_llm toneIndigo
```

## Components

### API service

- [Query API](https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/main.py): `main.py`

### Query routing

- [Intent coordinator](https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/coordinator.py): `agents/coordinator.py`
- [General answer](https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/coordinator.py): `agents/coordinator.py`

### Specialist agents

- [Support agent](https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/support.py): `agents/support.py`
- [Sales agent](https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/sales.py): `agents/sales.py`
- [Agent runtime](https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/base.py): `agents/base.py`

### Models and tools

- [Model client](https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/client.py): `agents/client.py`
- [FAQ lookup](https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/tools.py): `agents/tools.py`
- [Order status](https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/tools.py): `agents/tools.py`
- [Promotions lookup](https://github.com/deeparajasabeson/langgraph-multiagents/blob/main/agents/tools.py): `agents/tools.py`

### Other components

- **API caller**
- **Chat model service**

## Connections

- API caller → Query API: submits query (evidence: `main.py`)
- Query API → Intent coordinator: routes question (evidence: `main.py`)
- Intent coordinator → Model client: gets model (evidence: `agents/coordinator.py`)
- Model client → Chat model service: configures model (evidence: `agents/client.py`)
- Intent coordinator → Chat model service: classifies query (evidence: `agents/coordinator.py`)
- Intent coordinator → Support agent: dispatches support (evidence: `agents/coordinator.py`)
- Intent coordinator → Sales agent: dispatches sales (evidence: `agents/coordinator.py`)
- Intent coordinator → General answer: answers general (evidence: `agents/coordinator.py`)
- General answer → Chat model service: generates answer (evidence: `agents/coordinator.py`)
- Support agent → Agent runtime: inherits runtime (evidence: `agents/support.py`)
- Sales agent → Agent runtime: inherits runtime (evidence: `agents/sales.py`)
- Support agent → FAQ lookup: registers tool (evidence: `agents/support.py`)
- Support agent → Order status: registers tool (evidence: `agents/support.py`)
- Sales agent → Promotions lookup: registers tool (evidence: `agents/sales.py`)
- Agent runtime → Model client: gets model (evidence: `agents/base.py`)
- Agent runtime → Chat model service: runs agent graph (evidence: `agents/base.py`)
