Back to Projects
Case study 01 / Agentic AI

Agentic AI
Code Analyzer

A multi-agent code analysis system built with LangGraph. Six specialized agents coordinate code review, security scanning, and performance optimization, then bring their findings together in one report.

06specialized agents
05preprocessing tools
03analysis routes
LANGGRAPHGROQ / LLAMA 3.3STREAMLIT
Demo Video
Application Interface
Agentic AI Code Analyzer interface setup
Analysis UI & Data Fields
Agentic AI Code Analyzer dashboard filling up with data details

Project Overview

A production-grade, multi-agent AI system that performs intelligent code analysis using specialized agents. The system leverages LangGraph for orchestrating a workflow of 6 specialized agents — each responsible for a different aspect of code quality — from preprocessing and routing to deep code review, security vulnerability scanning, and performance optimization.

The system automatically detects the programming language, calculates code complexity, runs security scans and Python linting via Ruff, then intelligently routes the analysis through the appropriate agent pipeline based on the code's characteristics. Results are aggregated into a comprehensive scored report that can be downloaded as Markdown or a styled PDF.

Key Features

Multi-Agent Architecture

6 specialized agents (Preprocessor, Router, Code Review, Security, Optimization, Aggregator) orchestrated via LangGraph with conditional routing.

Intelligent Routing

Automatically selects analysis depth (Quick / Deep / Security-Focused) based on code complexity and security scan results.

5 Functional Tools

Language detection, complexity scoring, security scanning, pattern checking, and Ruff linter — all executed during preprocessing.

PDF Report Export

Download styled code audit reports with scorecards, metrics tables, and prioritized recommendations as PDF documents.

Interactive Code Diff

Compare original vs. refactored code line-by-line with red (-) and green (+) annotations in a side-by-side view.

Git Repository Support

Clone public repositories via URL, index their source files, and select any file for multi-agent analysis directly.

Technologies Used

Python LangGraph LangChain Groq (LLaMA 3.3) Streamlit Ruff Linter FPDF2

Architecture & Routing

Preprocessor Agent

Runs all 5 tools: language detection, complexity scoring, security scanning, pattern checking, and Ruff linting.

Router Agent

Analyzes tool results and decides analysis path: Quick, Deep, or Security-Focused routing.

Code Review Agent

Deep code review covering bugs, logic errors, readability, best practices, and refactored code suggestions.

Security Agent

Vulnerability analysis: injection, secrets exposure, OWASP Top 10, and secure code rewrites.

Routing Logic

The system intelligently routes code through different analysis pipelines:

  • Quick: Simple code → Code Review → Aggregator
  • Deep: Complexity ≥ 40 or 3+ functions → Code Review → Optimization → Aggregator
  • Security-Focused: HIGH/CRITICAL security issues → Code Review → Security → Optimization → Aggregator