All AI videos

AI video

How to Build an AI Code Review Agent - Daksh Gupta, Greptile

Greptile co-founder Daksh Gupta builds up a code-review agent from a sandbox and webhook, then explains the data, context, testing and routing needed to make reviews useful.

AI Engineer · 2026 featured video

Watch on YouTube

What this video shows

Gupta starts with a simple design: clone a pull request into a sandbox, ask an agent to review it and post findings through a webhook. He then identifies recurring failures, including missed bugs, excessive nitpicks and review costs that he reports at $3 to $25 per pull request.

His proposed improvements are specific prompts, a dataset of past incident pull requests, cross-family model review, repository documentation, executable tests and cheaper models for bounded subtasks. Treat the reported figures as Greptile's experience, then validate each change against your own accepted and rejected findings.

Use Learnetto's code review checklist to keep intent, evidence and security checks in the release path. Build a versioned regression set with the AI agent test-set guide.

What you will learn

  • Start with past incidents whose correct review outcome is known.
  • Measure valid findings, false positives, missed defects, cost and reviewer action rate.
  • Give the reviewer repository history and operating constraints, not only the changed files.
  • Run generated tests in an isolated environment and keep merge authority with accountable maintainers.

How to apply this safely

  1. Collect 20 incident and near-miss pull requests with written expected findings.
  2. Run the simplest reviewer and label useful, noisy and missed comments.
  3. Add one improvement at a time, such as context retrieval, executable tests or model inversion.
  4. Ship only when the reviewer catches more important defects without overwhelming maintainers or exceeding the cost budget.

Important limitations

  • The speaker co-founded Greptile and has a commercial interest in automated code review.
  • The cost and bug-detection figures come from the speaker's experience and may change with repository size, models and tool use.
  • Different model families can still share training data, blind spots and incorrect assumptions.
  • Passing generated tests does not establish that a change meets user intent, security requirements or production constraints.

Sources to check

Continue learning on Learnetto