# harish-ai-engineer/langgraph-agent- architecture

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

- Interactive diagram: https://gitdiagram.com/harish-ai-engineer/langgraph-agent-
- Repository: https://github.com/harish-ai-engineer/langgraph-agent-

## Overview

This is a customer-support assistant with a LangGraph conversational workflow and a separate MCP interface to the same tools. A user submits a question through the CLI or an MCP client; the graph consults a configured language model, dispatches tool calls when needed, and returns a response. The tools provide arithmetic, sample weather, and support-article lookup. Source excerpts show the graph and tool dispatches; README documentation establishes the MCP stdio entry point. The weather and knowledge data shown are local sample data, not external services.

Main entry points: [`agent/graph.py`](https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/graph.py) (Conversation graph), [`mcp_server/server.py`](https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/mcp_server/server.py) (MCP server), [`main.py`](https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/main.py) (CLI entry point), [`agent/tools.py`](https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/tools.py) (Calculator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent_runtime["Agent runtime"]
  node_cli["CLI entry point<br/>[main.py]"]
  node_graph["Conversation graph<br/>[graph.py]"]
  node_prompt["System prompt<br/>[prompts.py]"]
  node_config["Model config<br/>[config.py]"]
  node_tool_dispatch["Tool dispatch<br/>[graph.py]"]
end

subgraph group_tool_services["Support tools"]
  node_calculator["Calculator<br/>[tools.py]"]
  node_weather["Weather lookup<br/>[tools.py]"]
  node_knowledge["Knowledge lookup<br/>[tools.py]"]
end

subgraph group_mcp_interface["MCP interface"]
  node_mcp_server["MCP server<br/>[server.py]"]
  node_stdio["stdio transport<br/>[server.py]"]
end

node_user(("User"))
node_llm{{"Language model"}}
node_mcp_client(("MCP client"))

node_user -->|"asks"| node_cli
node_cli -->|"invokes"| node_graph
node_graph -->|"returns response"| node_cli
node_graph -->|"formats with"| node_prompt
node_graph -->|"reads settings"| node_config
node_graph -->|"invokes model"| node_llm
node_llm -->|"returns message"| node_graph
node_graph -->|"routes tool calls"| node_tool_dispatch
node_tool_dispatch -->|"dispatches"| node_calculator
node_tool_dispatch -->|"dispatches"| node_weather
node_tool_dispatch -->|"dispatches"| node_knowledge
node_mcp_client -->|"connects over stdio"| node_stdio
node_stdio -->|"serves requests"| node_mcp_server
node_mcp_server -->|"calls on request"| node_calculator
node_mcp_server -->|"calls on request"| node_weather
node_mcp_server -->|"calls on request"| node_knowledge

click node_cli "https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/main.py"
click node_graph "https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/graph.py"
click node_prompt "https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/prompts.py"
click node_config "https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/config.py"
click node_tool_dispatch "https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/graph.py"
click node_calculator "https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/tools.py"
click node_weather "https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/tools.py"
click node_knowledge "https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/tools.py"
click node_mcp_server "https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/mcp_server/server.py"
click node_stdio "https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/mcp_server/server.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_graph,node_prompt,node_config,node_tool_dispatch,node_user,node_mcp_client toneBlue
class node_calculator,node_weather,node_knowledge toneAmber
class node_mcp_server,node_stdio toneMint
class node_llm toneIndigo
```

## Components

### Agent runtime

- [CLI entry point](https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/main.py): `main.py`
- [Conversation graph](https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/graph.py): `agent/graph.py`
- [System prompt](https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/prompts.py): `agent/prompts.py`
- [Model config](https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/config.py): `agent/config.py`
- [Tool dispatch](https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/graph.py): `agent/graph.py`

### Support tools

- [Calculator](https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/tools.py): `agent/tools.py`
- [Weather lookup](https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/tools.py): `agent/tools.py`
- [Knowledge lookup](https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/agent/tools.py): `agent/tools.py`

### MCP interface

- [MCP server](https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/mcp_server/server.py): `mcp_server/server.py`
- [stdio transport](https://github.com/harish-ai-engineer/langgraph-agent-/blob/main/mcp_server/server.py): `mcp_server/server.py`

### Other components

- **User**
- **Language model**
- **MCP client**

## Connections

- User → CLI entry point: asks (evidence: `main.py`)
- CLI entry point → Conversation graph: invokes (evidence: `main.py`)
- Conversation graph → CLI entry point: returns response (evidence: `main.py`)
- Conversation graph → System prompt: formats with (evidence: `agent/graph.py`)
- Conversation graph → Model config: reads settings (evidence: `agent/graph.py`)
- Conversation graph → Language model: invokes model (evidence: `agent/graph.py`)
- Language model → Conversation graph: returns message (evidence: `agent/graph.py`)
- Conversation graph → Tool dispatch: routes tool calls (evidence: `agent/graph.py`)
- Tool dispatch → Calculator: dispatches (evidence: `agent/graph.py`)
- Tool dispatch → Weather lookup: dispatches (evidence: `agent/graph.py`)
- Tool dispatch → Knowledge lookup: dispatches (evidence: `agent/graph.py`)
- MCP client → stdio transport: connects over stdio (evidence: `README.md`)
- stdio transport → MCP server: serves requests (evidence: `mcp_server/server.py`)
- MCP server → Calculator: calls on request (evidence: `mcp_server/server.py`)
- MCP server → Weather lookup: calls on request (evidence: `mcp_server/server.py`)
- MCP server → Knowledge lookup: calls on request (evidence: `mcp_server/server.py`)
