Skip to content
How I AIHow I AI

Build an AI code review agent with Vercel Eve (full tutorial)

AI writes most of my code now, and that created a new problem: a PR queue I couldn’t keep up with. In this episode, I walk through how I built Merge Mommy, a Vercel Eve agent that reads every PR after checks pass, scores it across six risk dimensions, auto-approves the low-risk ones, and pings me in Slack for anything that needs a human. I built the whole thing in one Codex session, it’s SOC 2 compatible, and it’s already cleared my backlog. *What you’ll learn:* 1. Why AI-generated PRs create a review bottleneck and why the answer isn’t reviewing all of them 2. How Intercom 5x’d PR approval speed and reduced revert rates by putting AI in the review loop 3. Why Vercel Eve is the simplest framework I’ve found for deploying AI agents in Slack and GitHub 4. How I built a full PR review agent in Codex with one prompt and a few steering turns 5. The six components I use to score PR risk (blast radius, reversibility, data security, ops impact, verification gap, and change surface) 6. How I used Chrome browser use to handle Slack bot and GitHub app configuration so I never had to click through setup screens manually 7. Why auto-approved PRs can be SOC 2 compliant as long as the process is auditable, queryable, and in your risk policy 8. How to set up Slack escalation so low-risk PRs become a two-click merge with no manual review *Brought to you by:* WorkOS—Make your app Enterprise Ready today: https://workos.com?utm_source=lennys_howiai&utm_medium=podcast&utm_campaign=q22025 *In this episode, we cover:* (00:00) The PR review backlog problem nobody’s talking about (02:35) Why you don’t have to review every AI-generated PR (05:14) How Intercom built AI-approved PRs (and proved they’re safer) (06:10) How the Eve framework works (directory, skills, channels, connectors) (09:16) The Codex prompt I used to build the entire bot (11:36) What the agent actually does: read, score, approve, or escalate (13:07) Setting up your Eve agent (15:47) The six-component risk scoring model (17:23) Merge Mommy in action: three live PR examples (21:10) Recap and how to build your own version *Tools referenced:* • Vercel Eve: https://vercel.com/eve • Vercel AI SDK: https://sdk.vercel.ai/ • Vercel Chat SDK: https://chat-sdk.dev/ • Codex (OpenAI): https://openai.com/codex *Other references:* • AI is approving our pull requests: Here’s how we made it safe: https://www.intercom.com/blog/ai-is-approving-our-pull-requests-heres-how-we-made-it-safe/ • Review is the bottleneck now: How we let AI approve pull requests (safely): https://rewind.com/blog/ai-approve-pull-requests-safely/ *Where to find Claire Vo:* ChatPRD: https://www.chatprd.ai/ Website: https://clairevo.com/ LinkedIn: https://www.linkedin.com/in/clairevo/ X: https://x.com/clairevo _Production and marketing by https://penname.co/._ _For inquiries about sponsoring the podcast, email jordan@penname.co._

Claire Vohost
Aug 5, 202624mWatch on YouTube ↗

EVERY SPOKEN WORD

  1. 0:002:35

    The PR review backlog problem nobody’s talking about

    1. CV

      Everybody is drowning in AI-created PRs. When anyone can code, anyone can cook, and anyone can vibe anything to GitHub, that means that a lot of us are sitting on a big queue of pull requests that then we have to review. If you are an engineering leader or a software engineer in a company that has embraced AI in any way, shape, or form, you feel this pain, and I get this question all the time. "We've figured out how to code with AI. Now what do we do with all these PRs?" Well, people smarter than us have figured this out, and you know what the answer is? You don't have to review all your PRs. Yep, you heard it here first. You do not actually have to review one-on-one by a human all those PRs. So in today's episode, I'm gonna show you how to build your own PR review, risk scoring, and automatic approval bot so you can take all the low-risk PRs off your plate, get those to production, and focus on the ones that really require your human expertise. This episode is inspired by a couple folks, especially our past How I AI guest, Brian from Intercom, who has led the way in auto-scoring and auto-approval of PRs. But I'm gonna show you exactly how it gets done, and we're gonna get it done very quickly in this 30-minute How I AI mini episode. Let's get to it. This episode is brought to you by WorkOS. AI has already changed how we work. Tools are helping teams write better code, analyze customer data, and even handle support tickets automatically. But there's a catch. These tools only work well when they have deep access to company systems. Your copilot needs to see your entire code base. Your chatbot needs to search across internal docs. And for enterprise buyers, that raises serious security concerns. That's why these apps face intense IT scrutiny from day one. To pass, they need secure authentication, access controls, audit logs, the whole suite of enterprise features. Building all that from scratch, it's a massive lift. That's where WorkOS comes in. WorkOS gives you drop-in APIs for enterprise features so your app can become enterprise-ready and scale up market faster. Think of it like Stripe for enterprise features. OpenAI, Perplexity, and Cursor are already using WorkOS to move faster and meet enterprise demands. Join them and hundreds of other industry leaders at workos.com. Start building today.

  2. 2:355:14

    Why you don’t have to review every AI-generated PR

    1. CV

      Okay, I know what you all are thinking. You're thinking, "Claire, you are crazy. Of course I have to review every PR that comes out of AI. That's just how it's done. We review all of our human PR, so I have to review all of our AI PRs." And I am telling you, in 2026, the answer is you can safely not review PRs by putting AI in the loop. And I wanna call attention to two blog posts that have really inspired me in this process. One is from Intercom about how they made AI-approved PRs safe. If you don't know, Intercom has two X, three X their PR throughput. They are shipping a lot of code. That means they had a lot of code to review. And so they built a PR review agent that scores their PRs and then auto-approves them. And what I love about what Intercom has done here is they don't just worry about speed and velocity and volume. Yes, they've multiplied the PRs across their R&D organization. Yes, they wanna get those PR cycle time down and those reviews out quickly. But what they really think and what they've proven with their adoption of AI is that AI-approved PRs and AI-written code in general can be even safer and even higher quality than what you're doing with just a human in the loop. And so they have used AI as an advantage when it comes to safety and quality as opposed to a disadvantage for safety and quality. And to set the vision of what you can expect here, I love that they shared some metrics. One is that AI-approved PRs are approved faster, actually five times faster than their human PRs. So one, you are getting some speed. Two, they are seeing higher quality, so the revert rate, the amount of code that has to be fixed after it hits production, is much lower when they write that code with AI. And then they figured out how to label and trace and audit all those changes and approvals so that they are in compliance with all of their required compliance frameworks, whether those are SOC 2, HIPAA, et cetera. So I often get this objection from folks. They say, "Well, I'm in a SOC 2 environment. I couldn't possibly auto-approve PRs." But in fact, there are frameworks. As long as it's in your risk policies, as long as it's in your code review policies, as long as it's auditable, queryable, and defensible, you can do this within your compliance framework, although work with your security and compliance teams to figure out how this could work for you.

  3. 5:146:10

    How Intercom built AI-approved PRs (and proved they’re safer)

    1. CV

      So I really love just this whole concept. I also took some inspiration, who took inspiration from Intercom, on this Rewind bot, which is a little bit more of the technical way that they review PRs. And so this blog post about Diff Vader, which I love, shows a couple components of how they've scored risk, whether it's blast radius, how correct it is, if all the actions have run, et cetera. And so between these two blog posts, I had a really good starting point for building an agent. I knew that I wanted to do this for ChatPRD. I knew we had a lot of low-risk PRs that were just sitting in the queue because my colleague and I were not getting to review them. It was kind of boring, especially a lot of, like, dev and authored PRs. And so this was gonna be a really high impact thing that I knew I could build, and it also let me work with a new framework that I'm excited to demo for you all here on

  4. 6:109:16

    How the Eve framework works (directory, skills, channels, connectors)

    1. CV

      How I AI. So- We're gonna go to this Codex Vibe Coded deck, and we're gonna walk through how I built a code review risk scoring bot with Vercel's Eve. So if you have not heard about Eve, I'm a little bit obsessed with Eve. Why do I like Eve? Well, Eve has become the simplest way for me to deploy AI agents in the enterprise, in Slack and GitHub, without the torture and pain of something like Hermes Agent or my beloved OpenClaw. So when I'm working and helping other companies sort of like think about how to deploy agents, if they're using Vercel, I tell them to use Eve. Why do I tell them to use Eve? Well, what's awesome about Eve is a lot of it is just a directory. An Eve agent is very similar to OpenClaw, just a directory of instructions, skills, code, and it can talk to you in channels that are out of the box in Vercel. So again, it's like very easy to set up the agent. It's very easy to give it skills, which we all use. It's very easy to give it tools. It can even have a sandbox in which it can execute things, including your code if you're doing a code review. And then my favorite part is managing talking to the agent in specific channels and connecting it to enterprise data is super easy. So because Vercel has shipped, uh, Vercel connectors, which are like managed connections inside your Vercel account, you can just literally go through like a little wizard to hook up Slack to your Eve agent, little wizard to hook up GitHub to go through your agent, and it's all set up, the refresh tokens, all that stuff. Everything that's painful about creating an agent is just taken care of, and I sound totally like a Vercel shill. Um, I've just tried a bunch of stuff, and this has been the easiest framework to get up and running. It uses the chat SDK behind the scenes, and if you are creating any sort of chatbot in Slack, Teams, WhatsApp, whatever, I mean, bless. I have-- I was asking for this chat SDK for a long time. It got built. This is an open source framework that I think is so useful, whether or not you use Eve or not, to stand up a chatbot. It just, like, takes away all the complexities of managing, like, multi-channel agents. It handles all, like, the Slack configuration. It gives you a manifest for Slack. Like, I love that the ChatPRD Slack bot and Teams bot actually runs on the chat SDK, but it's even better when it's bundled into this Eve framework. And so, and I highly recommend you try Eve framework. Again, like, they didn't pay me to say this. I just really like it, and I found it super easy to use, and now every agent that I'm creating that I wanna interact with in Slack for an internal use case, if I don't already have an OpenClaw, I'm porting over to Eve.

  5. 9:1611:36

    The Codex prompt I used to build the entire bot

    1. CV

      So how did I actually build this? What does the agent do? Well, I built it in Codex. And so I'm gonna show you the amazing prompt where I started this PR review bot, which just says, "I want to make an internal GitHub bot/app that reviews PRs after all cchecks," that's checks, "are green, and grades low, medium, high risk, and approves the low rish..." Oh my God, you guys, I can't type. I'll, I'll type this. "Approves the low-risk PRs automatically." That's all I did, and then I interrupted it. I steered it and said, "We could design it as a Vercel Eve agent if you want," and it said, "Sure, that seems like a good, good idea," and it was off to the races. And so instead of going through kind of like the chat on Codex on how I built this, this took a couple turns, but really not that many. I would say a couple things that were, like, magical as I ran Codex is not that it did the code for the Eve agent and the repo. That was fine. That was interesting, and I'll tell you a little bit about how the code actually works in a sec. But what was actually awesome is if you've ever set up a Slack bot or a GitHub app, you have to like click through a bunch of configuration screens. You have to pick permissions. You have to do all this stuff. And so what I did is, my favorite hack is I had it use Chrome browser use, and I let it navigate Slack bot setup. I let it navigate, um, GitHub setup, and I just, like, clicked buttons and 2FA'd and just double-checked that it was right. And so I said, you know, "Is it configured yet?" It said, "No, it needs to configure all this stuff and the permissions on the GitHub bot." I was like, "Great, you're logged into Chrome." And then I was like, "I can press save." It was having a hard time, press save. And so if you're... Just sort of like meta tip, if you ever have to do, like, complex SaaS configuration, set up an app, you're like, "Ugh, I'm fine writing code, but I don't wanna do the configuration in somebody's third-party service," using Chrome browser use is such a useful hack to get that stuff done. So again, I just built this in Codex. I actually didn't give it any instructions on scoring. I didn't give it any instructions on configuration. I didn't give it any cons- instructions on risk. I just said kind of like o- one-ish shot it, few shot this into

  6. 11:3613:07

    What the agent actually does: read, score, approve, or escalate

    1. CV

      production. And so I wanna talk a little bit about what the agent does and how it works. So it's pretty simple. If you were building a PR review agent, this is what I would success- suggest you do, which is it reads the PR, it looks at the exact diff, um, and it scores the risk, and it publishes the evidence to the risk. If it's low risk, if it's assessed that it's a low risk PR, it submits an approval on the PR. If it needs a human, it escalates to human, and if there's a blocking, um, requirement- Then it stops and it w- it will require a, a request change. So it's, like, very similar to how a human would do code review. How does it work from a technical flow perspective? So the GitHub, I have a GitHub app. It keys off an event after all of the PR changes are done. Vercel's GitHub integration picks that up in the GitHub Vercel channel, and it sends it a little bit of information. Vercel spins up its sandbox, it checks out the repo, it runs it and looks at the diff. It runs a couple skills and tools to assess the risk and quality of the PR, and then on the end it outputs, like, a thumbs up check, uh, like it needs changes, and a comment. And then one fun thing that it does is after it does that review, it pings my colleague and I in Slack to say, "This PR is ready for review," or it needs

  7. 13:0715:47

    Setting up your Eve agent

    1. CV

      some help. So if you were to set up your Eve agent to be similar to mine, what would it have? Well, it would have a couple things. It needs to have the GitHub, um, channel. It needs to have instructions, which I can show you a little bit of the instructions. It needs a skill to review the PR. It needs two tools, read, like, all the files and information around the PR, and then how to actually put a risk decision in. And then it has, you know, a couple things like a Slack notifier. So this is not that many files. It's pretty simple. I will show you our instructions just to make this, like, very clear how easy it is to set this up. It's a ChatPRD engineering agent. It reviews PRs. It calls the risk context. It scores it, and then it has a couple instructions. This is it. There's no scrolling. It is, like, four, four or five paragraphs, a couple bullet points, and it's ready to go. You do not need to over-engineer this, and it works really, really well. So this is again why I like this Eve agent framework, because you're just working in natural text or in TypeScript, and it's super easy to implement. Setting up the GitHub app, you can ignore this. I mean, I guess, like, point your agents to this instructions. I did not do any of this. Again, Chrome browser use did this on our behalf, and so it just has to have access to the pull request, the contents of your files, um, CI checks and a- action checks, and then some metadata, and I just had Vercel set all that up. It has a couple rules on when it's triggered, so you don't want it triggered on every PR before checks are done, so I kind of had to, like, reduce some noise in the PR rules. And then there's just two basically steps to this. It reads the PR. It's like a skill to read the PR. I will show it to you. It's not that thrilling, but again, just showing you how simple it is. It reads and reviews the PR. It has a couple repo specific, uh, risk kind of categories. So, like, docs are low risk, feature logi- logic is medium risk, and then, like, authentication, billing is high risk. Diff size does not set risk. And then it gives some, like, instructions on writing. Again, this is it. It's, like, not that much. It's maybe one page of text. I did not write any of this. I refined it. And so what I'm trying to reinforce to you is, like, writing these agents is not that hard. It is literally just writing instructions and skills. That is what it takes to create an agent like this, and that's why I like this Eve framework, because you can do a lot of it in markdown.

  8. 15:4717:23

    The six-component risk scoring model

    1. CV

      And then once it reads the code, it scores the risk. And so it looks at six things. How big is the change surface and blast radius? Is it re- easily reversible, right? Like a huge data migrations may be harder to reverse. Does it touch data security and does it cover data security? Does it change anything about our operations? And verification gap is like, are our tests complete? Did CI complete? Can we actually test a couple ways that this is true? And then it has sort of like a script that it runs to calculate a score, and then anything under 24 points, I d- again, I did not, like, choose these thresholds. Anything below 24 points is low risk, medium risk is 25 to 64, and then 65 and above is high risk. Medium and high risk PRs require human approval. Um, so it's pretty simple. There's some logic in here to only review the latest changes, which I like. And then the final piece is it escalates us to us in Slack for final action. So we have repo rules probably very similar to all of you that requires a review in our GitHub to, like, match all of our, our SOC 2 compliance requirements. It just makes auditing and, uh, management of our compliance really easy. I went through a couple ways where the bot could like, quote-unquote, "act like a human" to do the review. It just didn't seem worth it. So what it does is escalate to Slack and then it says, "This one's been automatically reviewed. You can punch the approve button and merge and you're good, good to go." And so we sort of like built in an operational

  9. 17:2321:10

    Merge Mommy in action: three live PR examples

    1. CV

      process here as well. But let's see what this actually looks like in action. So I have three PRs for you, um, just to show you kind of how this works. Now, the, the PR bot's called Merge Mommy. She is Merge Mommy, the PR review bot. Um, you know, when you make internal bots, we don't have Diff Vader, we have Merge Mommy, 'cause we're fun at ChatPRD. And this was a docs only update automatically done by Devin. And typically I just, like, smash the approval button on these, merge them, but I found that, like, we were just getting queued up of a lot of docs changes that didn't really need a bunch of review. And so what happens on, um, once the PR is ready to go, Merge Mommy runs, it gives a risk score, six out of 10. It's very low risk. Because it only changes docs, but it's not auto-approved because it has merge conflicts. So that's one of the scoring issues it has to check. And then there are some detailed notes here about why it's blocked in the approval blocker is the pull request has merge conflicts. A cleaner example here is this doc which I already merged, which again, went through and said it's seven out of 10, low risk, it's auto-approved. And you can see up here, Merge Mommy gave a little check that said it's approved. Now, what we do with these approved PRs, as I said, is we send them to a Slack channel. And so the Slack channel says, "Hey, either of you can take this, approve it. The risk is low, the checks are green. You just need to smash that approve button and merge it." So it's just like a really nice automated flow. Now, why do we have to have a human do it? As you can see, this check mark is gray. A bot cannot actually meet our repository rules for required approval, and so we can either skip those rules, hack around it. We just decided this check would be a signal that our humans can approve it without really looking at it, and then merge it as we want. And then let's show one where Merge Mommy did not approve it. This is a deprecation PR, so we had Chat V1 and ChatPRD, and we're moving to Chat V2. We kind of like refactored a bunch of code, but we left the old stuff behind a feature flag, and it was like ready to delete. So there's like 35 changes, a big red diff that we wanted to delete. And you can see here, Merge Mommy... [laughs] Like, I'm sorry, I can't take myself seriously when I say it, but I'm gonna say it anyways. Merge Mommy gave it a 45 out of 100, a medium risk, and it was not approved by a human because both it had some code issues as well as the policy said it changed server API behavior. It was a large change surface, and so it's medium, not low, and it can't approve the PR. Now, we can run this against every PR that goes through our process, and again, we're gonna just keep getting these notifications in Slack, um, that just let us know, "Hey, this can be approved," or, "This requires human review." Again, I like to say this thing where we can put AI to work for us or we can have AI put us to work, and this is an example where you do both. I've put AI to work, this lovely Eve agent. I put AI to work to review and score the PR and tell me if there's any risk and like be detailed eyes on it. And then I have AI put me to work by escalating into Slack for the final action and making it like a two-click process to get this thing to production.

  10. 21:1024:12

    Recap and how to build your own version

    1. CV

      Now, I just have to say, this is something that I was really intimidated to build. I thought this was gonna take me like days and days and days. I was like, "I don't wanna set up the GitHub app." I actually had tried this before Codex like browser use was really good and before the Eve agents had come out, and it was just like not easy to do. But now that we have these open source frameworks, now that we have these agent building frameworks, now that kind of like everybody's agreed that we need Slack bots that do AI, a lot of these problems have been solved, and then Codex browser use was just like the cherry on top that made building this agent super, super, super simple. So to just recap for you all in this lightning fast mini episode about how to build a PR risk score and review bot, use Vercel's Eve agents, give it instructions and a skill to read a PR and calculate a score based on a couple components. Hook up that Vercel agent to GitHub and to Slack. Let it read from GitHub and give you a little gray check for approval, and then have it Slack you in Slack for that final human review and merge, and your cycle time will be super, super fast, and your PR velocity will go through the roof. Now, I wanna hear from you all. Is this crazy? Can you pull this off at your company? And what would you put into your risk scoring that I haven't thought of? The final bonus piece off this, which I didn't show, but a lot of great folks do, especially the, the folks at Intercom do as part of this process, is they run evals on this internal agent. So every time this review is run, it gets logged into, I think it's like an internal eval platform, and an engineer looks at it and says, "Did the agent get this right? Did the agent get this wrong? Are we happy with the scoring mechanism?" So very similar to how you'd use evals to improve your customer facing AI products, you're gonna wanna use evals to improve your internally facing AI bots, especially ones that touch really critical things like code. That has been my mini episode on how to build a PR approval and review bot here at How I AI. I cannot wait to hear if you think this is crazy or if this is the way of the future. Thank you so much for joining, and we'll see you soon. [upbeat music] Thanks so much for watching. If you enjoyed the show, please like and subscribe here on YouTube, or even better, leave us a comment with your thoughts. You can also find this podcast on Apple Podcasts, Spotify, or your favorite podcast app. Please consider leaving us a rating and review, which will help others find the show. You can see all our episodes and learn more about the show at howiaipod.com. See you next time.

Episode duration: 24:13

Install uListen for AI-powered chat & search across the full episode — Get Full Transcript

Transcript of episode cmATJGbA8bI

Get more out of YouTube videos.

High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.