# kanerika-ai/langgraph-supervisor-agent architecture

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

- Interactive diagram: https://gitdiagram.com/kanerika-ai/langgraph-supervisor-agent
- Repository: https://github.com/kanerika-ai/langgraph-supervisor-agent

## Overview

This repository implements a LangGraph supervisor workflow for producing market-analysis reports. A user submits an example or custom task through the CLI; the workflow shares conversation state, lets the supervisor dynamically dispatch Research, Data, and Writing agents, and returns the final report. The README documents synthetic company, industry, and financial data, plus Azure OpenAI configuration. Several documented modules are absent from the supplied file tree and source excerpts, so their internal calls are represented only where the README explicitly describes them.

Main entry points: [`main.py`](https://github.com/kanerika-ai/langgraph-supervisor-agent/blob/main/main.py) (CLI entry), [`config.py`](https://github.com/kanerika-ai/langgraph-supervisor-agent/blob/main/config.py) (Azure LLM config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Task entry"]
  node_cli["CLI entry<br/>[main.py]"]
  node_llm_config["Azure LLM config<br/>[config.py]"]
end

subgraph group_orchestration["Workflow orchestration"]
  node_workflow["Workflow runner"]
  node_state["Shared state"]
  node_supervisor["Supervisor"]
end

subgraph group_specialists["Analysis agents"]
  node_research["Research agent"]
  node_data_agent["Data agent"]
  node_writing["Writing agent"]
end

subgraph group_knowledge["Synthetic knowledge"]
  node_profiles["Company profiles"]
  node_trends["Industry trends"]
  node_financials["Financial dataset"]
end

node_user(("User"))
node_azure["Azure OpenAI"]
node_report["Final report"]

node_user -->|"submits task"| node_cli
node_cli -->|"runs workflow"| node_workflow
node_workflow -->|"routes tasks"| node_supervisor
node_workflow -->|"shares history"| node_state
node_supervisor -->|"dispatches"| node_research
node_supervisor -->|"dispatches"| node_data_agent
node_supervisor -->|"dispatches"| node_writing
node_research -->|"updates history"| node_state
node_data_agent -->|"updates history"| node_state
node_writing -->|"updates history"| node_state
node_research -->|"reads profiles"| node_profiles
node_research -->|"reads trends"| node_trends
node_data_agent -->|"analyzes metrics"| node_financials
node_writing -->|"synthesizes context"| node_state
node_llm_config -->|"configures model"| node_azure
node_workflow -.->|"uses model config"| node_llm_config
node_cli -->|"prints report"| node_report

click node_cli "https://github.com/kanerika-ai/langgraph-supervisor-agent/blob/main/main.py"
click node_llm_config "https://github.com/kanerika-ai/langgraph-supervisor-agent/blob/main/config.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_llm_config,node_user toneBlue
class node_workflow,node_state,node_supervisor toneAmber
class node_research,node_data_agent,node_writing toneMint
class node_profiles,node_trends,node_financials toneRose
class node_azure,node_report toneIndigo
```

## Components

### Task entry

- [CLI entry](https://github.com/kanerika-ai/langgraph-supervisor-agent/blob/main/main.py): `main.py`
- [Azure LLM config](https://github.com/kanerika-ai/langgraph-supervisor-agent/blob/main/config.py): `config.py`

### Workflow orchestration

- **Workflow runner**
- **Shared state**
- **Supervisor**

### Analysis agents

- **Research agent**
- **Data agent**
- **Writing agent**

### Synthetic knowledge

- **Company profiles**
- **Industry trends**
- **Financial dataset**

### Other components

- **User**
- **Azure OpenAI**
- **Final report**

## Connections

- User → CLI entry: submits task (evidence: `README.md`)
- CLI entry → Workflow runner: runs workflow (evidence: `main.py`)
- Workflow runner → Supervisor: routes tasks (evidence: `README.md`)
- Workflow runner → Shared state: shares history (evidence: `README.md`)
- Supervisor → Research agent: dispatches (evidence: `README.md`)
- Supervisor → Data agent: dispatches (evidence: `README.md`)
- Supervisor → Writing agent: dispatches (evidence: `README.md`)
- Research agent → Shared state: updates history (evidence: `README.md`)
- Data agent → Shared state: updates history (evidence: `README.md`)
- Writing agent → Shared state: updates history (evidence: `README.md`)
- Research agent → Company profiles: reads profiles (evidence: `README.md`)
- Research agent → Industry trends: reads trends (evidence: `README.md`)
- Data agent → Financial dataset: analyzes metrics (evidence: `README.md`)
- Writing agent → Shared state: synthesizes context (evidence: `README.md`)
- Azure LLM config → Azure OpenAI: configures model (evidence: `config.py`)
- Workflow runner → Azure LLM config: uses model config
- CLI entry → Final report: prints report (evidence: `main.py`)
