# itsaugustine04/agentic-code-review-system architecture

> Architecture diagram of the GitHub repository itsaugustine04/agentic-code-review-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/itsaugustine04/agentic-code-review-system
- Repository: https://github.com/itsaugustine04/agentic-code-review-system

## Overview

This is an agentic code-review application: a user submits Python code through the CLI or Streamlit UI, the LangGraph workflow analyzes it, selects a quick, deep, or security-focused LLM review, and presents a Markdown report. Static analysis counts nonblank lines, calculates cyclomatic complexity, and scans for security patterns; security flags take routing priority over complexity. The graph also checkpoints per-thread state and streams node progress. The README documents these capabilities, and the sampled source confirms the workflow; no separate storage or persistence service is shown.

Main entry points: [`nodes.py`](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.py) (Report Generator), [`graph.py`](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/graph.py) (LangGraph Workflow), [`review.py`](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/review.py) (CLI), [`app.py`](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/app.py) (Streamlit UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User Interfaces"]
  node_cli["CLI<br/>[review.py]"]
  node_streamlit["Streamlit UI<br/>[app.py]"]
end

subgraph group_workflow["Review Workflow"]
  node_graph["LangGraph Workflow<br/>[graph.py]"]
  node_state["Review State<br/>[state.py]"]
  node_checkpoint[("Memory Checkpoint<br/>[graph.py]")]
  node_router["Review Router<br/>[nodes.py]"]
end

subgraph group_analysis["Static Analysis"]
  node_ingest["Ingest Code<br/>[nodes.py]"]
  node_complexity["Complexity Check<br/>[nodes.py]"]
  node_security["Pattern Scanner<br/>[security.py]"]
end

subgraph group_review["LLM Review"]
  node_quick["Quick Review<br/>[nodes.py]"]
  node_deep["Deep Review<br/>[nodes.py]"]
  node_security_review["Security Review<br/>[nodes.py]"]
  node_report["Report Generator<br/>[nodes.py]"]
end

node_user(("Code Submitter"))
node_radon["Radon"]
node_groq["Groq LLM"]

node_user -->|"submits code"| node_cli
node_user -->|"submits code"| node_streamlit
node_cli -->|"streams review"| node_graph
node_streamlit -->|"streams review"| node_graph
node_graph -->|"starts"| node_ingest
node_ingest -->|"passes state"| node_complexity
node_complexity -->|"calculates complexity"| node_radon
node_complexity -->|"scans code"| node_security
node_complexity -->|"provides findings"| node_router
node_router -->|"selects default"| node_quick
node_router -->|"selects high complexity"| node_deep
node_router -->|"prioritizes security"| node_security_review
node_quick -->|"requests review"| node_groq
node_deep -->|"requests review"| node_groq
node_security_review -->|"requests review"| node_groq
node_quick -->|"passes findings"| node_report
node_deep -->|"passes findings"| node_report
node_security_review -->|"passes findings"| node_report
node_report -->|"requests summary"| node_groq
node_graph -->|"checkpoints state"| node_checkpoint
node_graph -->|"updates state"| node_state
node_report -->|"returns report"| node_cli
node_report -->|"returns report"| node_streamlit

click node_cli "https://github.com/itsaugustine04/agentic-code-review-system/blob/main/review.py"
click node_streamlit "https://github.com/itsaugustine04/agentic-code-review-system/blob/main/app.py"
click node_graph "https://github.com/itsaugustine04/agentic-code-review-system/blob/main/graph.py"
click node_state "https://github.com/itsaugustine04/agentic-code-review-system/blob/main/state.py"
click node_checkpoint "https://github.com/itsaugustine04/agentic-code-review-system/blob/main/graph.py"
click node_ingest "https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.py"
click node_complexity "https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.py"
click node_security "https://github.com/itsaugustine04/agentic-code-review-system/blob/main/security.py"
click node_router "https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.py"
click node_quick "https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.py"
click node_deep "https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.py"
click node_security_review "https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.py"
click node_report "https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.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_streamlit toneBlue
class node_graph,node_state,node_checkpoint,node_router toneAmber
class node_ingest,node_complexity,node_security toneMint
class node_quick,node_deep,node_security_review,node_report toneRose
class node_user,node_radon,node_groq toneIndigo
```

## Components

### User Interfaces

- [CLI](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/review.py): `review.py`
- [Streamlit UI](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/app.py): `app.py`

### Review Workflow

- [LangGraph Workflow](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/graph.py): `graph.py`
- [Review State](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/state.py): `state.py`
- [Memory Checkpoint](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/graph.py): `graph.py`
- [Review Router](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.py): `nodes.py`

### Static Analysis

- [Ingest Code](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.py): `nodes.py`
- [Complexity Check](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.py): `nodes.py`
- [Pattern Scanner](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/security.py): `security.py`

### LLM Review

- [Quick Review](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.py): `nodes.py`
- [Deep Review](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.py): `nodes.py`
- [Security Review](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.py): `nodes.py`
- [Report Generator](https://github.com/itsaugustine04/agentic-code-review-system/blob/main/nodes.py): `nodes.py`

### Other components

- **Code Submitter**
- **Radon**
- **Groq LLM**

## Connections

- Code Submitter → CLI: submits code
- Code Submitter → Streamlit UI: submits code
- CLI → LangGraph Workflow: streams review
- Streamlit UI → LangGraph Workflow: streams review
- LangGraph Workflow → Ingest Code: starts
- Ingest Code → Complexity Check: passes state
- Complexity Check → Radon: calculates complexity
- Complexity Check → Pattern Scanner: scans code
- Complexity Check → Review Router: provides findings
- Review Router → Quick Review: selects default
- Review Router → Deep Review: selects high complexity
- Review Router → Security Review: prioritizes security
- Quick Review → Groq LLM: requests review
- Deep Review → Groq LLM: requests review
- Security Review → Groq LLM: requests review
- Quick Review → Report Generator: passes findings
- Deep Review → Report Generator: passes findings
- Security Review → Report Generator: passes findings
- Report Generator → Groq LLM: requests summary
- LangGraph Workflow → Memory Checkpoint: checkpoints state
- LangGraph Workflow → Review State: updates state
- Report Generator → CLI: returns report
- Report Generator → Streamlit UI: returns report
