# iam-pavanpachuru/github-ai-agent-web architecture

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

- Interactive diagram: https://gitdiagram.com/iam-pavanpachuru/github-ai-agent-web
- Repository: https://github.com/iam-pavanpachuru/github-ai-agent-web

## Overview

This is a self-hosted natural-language GitHub management dashboard. A user selects or enters a task in the browser; the FastAPI streaming endpoint loads GitHub tools, runs a LangGraph ReAct agent with Gemini, and streams progress and results back to the UI. Destructive tasks pass through a confirmation step, and repository actions reach GitHub through the MCP server or the custom delete tool. The dashboard also exposes tool discovery, activity, and command history. Unsampled UI and integration details are included only where documented in the README.

Main entry points: [`app.py`](https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/app.py) (Task Stream Handler), [`static/app.js`](https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/static/app.js) (Task Controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard UI"]
  node_dashboard_ui["Dashboard<br/>[index.html]"]
  node_task_controls["Task Controls<br/>[app.js]"]
  node_tool_carousel["Tool Carousel<br/>[app.js]"]
  node_live_activity["Live Activity<br/>[app.js]"]
  node_confirmation["Delete Confirmation<br/>[app.js]"]
end

subgraph group_backend["Web Backend"]
  node_api["FastAPI Routes<br/>[app.py]"]
  node_stream_handler["Task Stream Handler<br/>[app.py]"]
end

subgraph group_agent["Agent Runtime"]
  node_react_agent["ReAct Agent<br/>[app.py]"]
  node_gemini["Gemini Models"]
end

subgraph group_integrations["GitHub Integrations"]
  node_mcp_client["MCP Tool Client<br/>[app.py]"]
  node_mcp_server["GitHub MCP Server"]
  node_delete_tool["Custom Delete Tool<br/>[app.py]"]
  node_github_api["GitHub REST API"]
  node_github_account[("GitHub Account")]
end

node_user(("GitHub User"))

node_user -->|"enters task"| node_task_controls
node_user -->|"browses tools"| node_tool_carousel
node_tool_carousel -->|"fills prompt"| node_task_controls
node_task_controls -->|"sends task"| node_api
node_confirmation -->|"confirms task"| node_task_controls
node_api -->|"routes task"| node_stream_handler
node_stream_handler -->|"loads tools"| node_mcp_client
node_stream_handler -->|"runs agent"| node_react_agent
node_react_agent -->|"reasons with"| node_gemini
node_react_agent -->|"selects tools"| node_mcp_server
node_mcp_client -->|"connects over stdio"| node_mcp_server
node_stream_handler -->|"registers tool"| node_delete_tool
node_delete_tool -->|"deletes repository"| node_github_api
node_mcp_server -->|"executes operations"| node_github_api
node_github_api -->|"updates account"| node_github_account
node_stream_handler -->|"streams events"| node_live_activity
node_live_activity -->|"shows progress"| node_user
node_stream_handler -->|"requests approval"| node_confirmation
node_api -->|"provides tool status"| node_tool_carousel

click node_dashboard_ui "https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/static/index.html"
click node_task_controls "https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/static/app.js"
click node_tool_carousel "https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/static/app.js"
click node_live_activity "https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/static/app.js"
click node_confirmation "https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/static/app.js"
click node_api "https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/app.py"
click node_stream_handler "https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/app.py"
click node_react_agent "https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/app.py"
click node_mcp_client "https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/app.py"
click node_delete_tool "https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/app.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_dashboard_ui,node_task_controls,node_tool_carousel,node_live_activity,node_confirmation,node_user toneBlue
class node_api,node_stream_handler toneAmber
class node_react_agent,node_gemini toneMint
class node_mcp_client,node_mcp_server,node_delete_tool,node_github_api,node_github_account toneRose
```

## Components

### Dashboard UI

- [Dashboard](https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/static/index.html): `static/index.html`
- [Task Controls](https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/static/app.js): `static/app.js`
- [Tool Carousel](https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/static/app.js): `static/app.js`
- [Live Activity](https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/static/app.js): `static/app.js`
- [Delete Confirmation](https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/static/app.js): `static/app.js`

### Web Backend

- [FastAPI Routes](https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/app.py): `app.py`
- [Task Stream Handler](https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/app.py): `app.py`

### Agent Runtime

- [ReAct Agent](https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/app.py): `app.py`
- **Gemini Models**

### GitHub Integrations

- [MCP Tool Client](https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/app.py): `app.py`
- **GitHub MCP Server**
- [Custom Delete Tool](https://github.com/iam-pavanpachuru/github-ai-agent-web/blob/main/app.py): `app.py`
- **GitHub REST API**
- **GitHub Account**

### Other components

- **GitHub User**

## Connections

- GitHub User → Task Controls: enters task (evidence: `README.md`)
- GitHub User → Tool Carousel: browses tools (evidence: `README.md`)
- Tool Carousel → Task Controls: fills prompt (evidence: `README.md`)
- Task Controls → FastAPI Routes: sends task (evidence: `README.md`)
- Delete Confirmation → Task Controls: confirms task (evidence: `static/app.js`)
- FastAPI Routes → Task Stream Handler: routes task (evidence: `app.py`)
- Task Stream Handler → MCP Tool Client: loads tools (evidence: `app.py`)
- Task Stream Handler → ReAct Agent: runs agent (evidence: `app.py`)
- ReAct Agent → Gemini Models: reasons with (evidence: `README.md`)
- ReAct Agent → GitHub MCP Server: selects tools (evidence: `README.md`)
- MCP Tool Client → GitHub MCP Server: connects over stdio (evidence: `app.py`)
- Task Stream Handler → Custom Delete Tool: registers tool (evidence: `app.py`)
- Custom Delete Tool → GitHub REST API: deletes repository (evidence: `app.py`)
- GitHub MCP Server → GitHub REST API: executes operations (evidence: `README.md`)
- GitHub REST API → GitHub Account: updates account (evidence: `README.md`)
- Task Stream Handler → Live Activity: streams events (evidence: `README.md`)
- Live Activity → GitHub User: shows progress (evidence: `README.md`)
- Task Stream Handler → Delete Confirmation: requests approval (evidence: `README.md`)
- FastAPI Routes → Tool Carousel: provides tool status (evidence: `app.py`)
