How to Build Your Own AI Code Review Bot A guide published on Omnara's site shows developers how to build a self-hosted AI code review bot that runs four cheap models from four different providers on each pull request, with one stronger model merging duplicates and verifying findings against the code before posting a single review; the guide says the bot can be built in Omnara in under five minutes. Each reviewer costs a tenth or less of the main agent per input token at standard rates, and the guide recommends running the bot only when tagged so every push does not trigger a paid review. The guide cites Cloudflare's internal reviewer, which uses up to seven specialized reviewers plus a coordinator on a top-tier model, and quotes Cloudflare's finding that "telling an LLM what not to do is where the actual prompt engineering value resides. All guides https://www.omnara.com/guides How to Build Your Own AI Code Review Bot Cheap models from different providers read the pull request, a stronger model checks what they found, and one review gets posted On this page Hosted AI review bots are easy to turn on, but you get their model, their price, and mostly just the comments they post. A pull request reviewer is an agent with a good prompt, a copy of the code, and a way to post a review, so you can build one in an agent harness https://www.omnara.com/guides/agent-framework-vs-harness-vs-runtime agent-harnesses you already use and own all of it. In the setup I use, four cheap models from different providers each review the pull request, and one stronger model checks what they found before anything gets posted. The video above builds it in Omnara in under five minutes. The Short Version Why Build Your Own - You pick the models. When a cheaper model comes out, you switch to it. You can also point a reviewer at your own fine-tuned or self-hosted model. - You add the tools. Give the reviewer an MCP server for your issue tracker or internal docs, and it can check a change against them. - You see everything it did. The whole trace is yours: every file it read and every command it ran. You can message the same session to dig into a finding. - You own the whole prompt. Hosted bots let you add rules on top of theirs. Here you decide what it looks for and what it ignores. - You pay per token. There's no review product to pay for on top of the models. Hosted review bots still make sense if you don't want to maintain prompts at all. They handle setup and code indexing for you, and most learn from which comments your team acts on. In exchange, you work within their model and their price, and you add rules on top of their prompt instead of owning it. How an AI Code Review Bot Works Most of what you pay for in an AI review is a model reading code: the diff and the files around it. So the cheap models do that reading. Each one reviews the whole pull request with the same prompt and sends back a short list of findings. I use four reviewers from four different providers. In my experience, mixing providers catches more than running the same model a few times, because each has different strengths and blind spots. I go into why in How to Build Subagent Systems https://www.omnara.com/guides/build-subagent-systems why-models-from-different-labs-catch-different-things . Several reviewers find more problems, but they also produce more false alarms and duplicates. The main agent fixes that. It merges findings that describe the same problem, notes how many reviewers flagged each one, and checks every finding against the code before keeping it. It only reads the lines each finding points to, which keeps the expensive model's share of the bill small. Cloudflare describes the same shape for its internal reviewer https://blog.cloudflare.com/ai-code-review/ : up to seven specialized reviewers, and a coordinator on a top-tier model that "deduplicates their findings, judges the actual severity of the issues, and posts a single structured review comment." Three choices in the prompts matter most: - Say what not to report. Style nits, anything a linter or type checker would catch, and problems that were already there. Cloudflare's team found that "telling an LLM what not to do is where the actual prompt engineering value resides." Without it, you get a pile of comments that's a slog to read. - Ask about the design, not just bugs. A bug or messy code is often a sign that something deeper needs a refactor. The reviewers can suggest a better approach the pull request didn't consider, and the main agent keeps at most two of these, in the review summary. - Run only when tagged. If the bot reviews every push, every push is another review you pay for. The Models At standard rates, each reviewer costs a tenth or less of the main agent per input token. Any four cheap models from different providers will do, and you can change them whenever prices move. I run the main agent at medium reasoning effort, since checking findings doesn't need the highest setting, and the reviewers at medium too. The Prompts Reviewer The same prompt goes to all four reviewers; only the model changes. Main agent This version uses the tool names from Omnara's GitHub integration. In another harness, swap in its tools or the gh CLI for reading the pull request and posting the review. Building It in Omnara Omnara https://github.com/omnara-ai/omnara is an open-source agent platform with a GitHub integration https://docs.omnara.com/integrations/github that registers a GitHub App, starts the agent from pull request events, sets up Git credentials for cloning, and gives the agent tools to post reviews. 1. Make four reviewer profiles. Under Agents → New agent, create haiku-review , luna-review , deepseek-review and gemini-review , each with its model, the reviewer prompt, medium reasoning effort, and default-pool under Machine sources. A reviewer runs on the main agent's machine, so it sees the repo the main agent cloned; the machine source is what gives it the tools to run commands. Nothing else goes under Tools. 2. Make the main agent. Create GitHub PR Reviewer on Claude Opus 5.5 at medium reasoning effort, with the main agent prompt and default-pool with working directory /workspace . 3. Add the reviewers as subagents. Under Subagents, add each reviewer profile as an Agent profile with the key the prompt uses haiku , luna , deepseek , gemini and Max instances 1, and set Max active subagents to 4. The configuration docs https://docs.omnara.com/agents/configuration cover the other subagent settings. 4. Connect GitHub. Under Integrations → GitHub PR review, name the integration github-bot so its tool names match the prompt, create the GitHub App, choose the repositories, and connect. In Pull requests, pick GitHub PR Reviewer , tick only Bot mentioned, and select Save changes. 5. Try it. From a GitHub account with write access to the repo, comment @