Skip to content

AI Code Review Agent

A multi-agent code review service on ASP.NET Core. Five specialist LLM reviewers run in parallel, and a supervisor merges them into one scored, line-cited report.

Built during my software engineering internship at HCLTech, June to August 2026.

reviewer agents in parallel
5
REST endpoints
8
model providers, one interface
2
  • C#
  • .NET 10
  • ASP.NET Core
  • Microsoft.Extensions.AI
  • Groq
  • Ollama
  • Docker
  • GitHub Actions
A finished review of a short Python file: score 7 out of 10, five agents run in parallel, and lines 6 and 7 flagged for SQL injection.

The problem

LLM code review sounds equally confident whether it is right or wrong. A reviewer who has to re-check every claim from scratch saves no time at all.

Pipeline

  1. Code or PR diff
  2. Number every line
  3. 5 agents in parallelBugsSecurityExplainFixesOnboarding
  4. Supervisor
  5. Scored report
Lines are numbered before any model sees the code, so every finding can cite one. The highlighted stage is where the key decision sits.

How it works

Five specialist agents (bug detector, security checker, code explainer, fix suggester, onboarding assistant) each get a narrow prompt and a structured output contract. They run concurrently through Task.WhenAll, and a supervisor merges them into one report scored out of 10.

Because the calls are I/O-bound and concurrent, wall-clock time is the slowest agent plus one supervisor call, not the sum of all five. Five prompted calls under Task.WhenAll needed no orchestration framework, so the control flow reads in one pass.

Pull request review fetches the unified diff through the GitHub REST API and returns APPROVE, REQUEST CHANGES or NEEDS DISCUSSION with a must-fix list. A second set of four agents produces a three-tier modernization roadmap with effort and business impact per item.

Every model call goes through the IChatClient abstraction from Microsoft.Extensions.AI, so the same code runs on Groq (llama-3.3-70b-versatile) or local Ollama (qwen2.5:3b), chosen per request. Local inference matters for code that cannot leave the building.

The decision

I chose
Number every source line before each model call, and require every finding to cite it as Line [N]:.
Instead of
Free-form review comments.
Because
A cited line can be checked in seconds, and a finding whose cited line does not support it is visibly wrong. The output stops being something you trust and becomes something you verify.

What I would do next

  • Build a benchmark of code with known defects and measure what each agent catches and what it invents. I judged output quality by reading it, which does not scale.
  • Send a few lines of context around each diff hunk, so a change that is wrong because of code elsewhere in the file is not missed.