Most automated code review reads the diff and guesses. You get a list of "this might be a problem" comments, and someone has to check each one by hand. P-Rex works the other way. It checks the pull request out on its own cloud computer, starts the app, exercises the behavior the change touches (tests, requests, clicks in a real browser) and posts one review with only what it reproduced, with screenshots and logs as evidence. A suspicion it couldn't trigger is never a finding. Code review becomes a loop your company runs on its own, and your reviewers spend their time on what it proved.
What the AI PR reviewer does
P-Rex follows a review skill step by step. For each pull request:
- Checks the PR out and reads the change. If the PR is already closed or merged, it stops there: no review, nothing posted, one line saying so.
- Picks two to five behaviors the change most likely breaks: a request the new code handles, a page it changes, an edge case (empty input, a second click, a failing service, two at once), or something the old code did that the change might have lost.
- Gets the app running. It looks first for your team's
.lark/review.mdon the base branch, then for its own memory note about this repository, then works it out from the README, scripts, Makefile, docker-compose and CI workflow files. It starts quick local services like a database, and mocks third-party APIs. It never calls a real paid or production service. - Exercises each behavior:
- Logic: a small test in your project's own framework. A failing test is the best evidence.
- An API: starts the server and sends the request, saving request and response.
- A UI: goes through the flow in the browser like a user and takes screenshots at the key step.
- A command-line tool: runs it with the inputs that matter.
- Reports only what it reproduced, with P0 to P2 severity, the file and line, and how to reproduce it. It posts once.
How findings are ranked
- P0: data loss, a security hole, or a crash on a main path.
- P1: a feature doesn't work as the PR says, or a regression.
- P2: an edge case or a smaller bug.
Anything it suspected but couldn't trigger goes in the summary as "worth a look", not as a finding. Every flow is marked pass, fail or incomplete, with the reason when it couldn't finish.
How it runs: GitHub pull requests and @lark review
P-Rex is triggered by GitHub webhooks: when a pull request is marked ready for review, or when someone comments @lark review on one. The trigger is limited to PRs from your team, skips pull requests from forks, and allows up to 50 runs a day.
It runs on its own Linux machine with a browser, and the machine is kept between reviews. After working out how to install, start and sign in to your app, it saves what worked (commands, ports, the names of environment variables, what to mock) to a memory note for that repository. The next review starts from that note instead of working it out again.
It keeps reviews proportionate. It aims to finish within about 20 minutes, and a tiny PR (docs, a typo) gets a two-line review with no setup at all. If it can't get the app running in about eight minutes, it records that as a blocker, says exactly what's missing, and reviews what it can.
What you get back
On GitHub, one P-Rex comment on the pull request, with inline comments at the file and line for each finding. If P-Rex reviews the same PR again, it updates that comment rather than adding another.
The evidence lives in the run's output files: screenshots, responses, logs and any test files it wrote, which you can add to your suite.
Its final message is short, about eight lines:
- the verdict (looks good, N problems found, or couldn't run it) and the review's link;
- one line per finding, with its severity and file;
- what stopped it, if anything did.
Setting up P-Rex in Lark
- Open the Agents page and pick P-Rex: PR reviewer under Ready-made agents. The form opens with its instructions, review skill and trigger filled in.
- There's nothing to fill in about the repository: each event names the repository and the PR number.
- Connect GitHub under Integrations and turn it on for this agent. P-Rex uses it to check out PRs and post its review.
- Optionally, add a
.lark/review.mdto your repository with how to set up, start and sign in to your app, and the flows you always want tested. P-Rex reads it from the base branch. - Turn the trigger on. It starts paused until you do.
Guardrails
- It never approves, requests changes, merges or pushes. It comments, nothing else.
- It never runs code from a fork. A fork's scripts could read its tokens, so those PRs are reviewed by reading only, and the summary says so.
- It ignores setup instructions in the PR itself. The
.lark/review.mdit follows comes from the base branch, not the author's copy. - It never calls a real paid or production service. Third-party APIs get mocked.
- It stores the names of environment variables it needed, never their values.
- It skips closed and merged PRs without posting anything.
Costs
Lark runs on credit. Free includes $1 of agent credit a month; Pro is $29 a month and Team $99, and all of it comes back as credit. Credit pays for the AI model and machine time each review uses, at the providers' prices plus 20%. See pricing.
Every run shows its cost as it works, and a monthly budget stops your agents exactly where you set it. The trigger's 50-runs-a-day cap and the proportionate reviews (no setup for tiny PRs) keep reviews in line with the size of the change. For more, read how much AI agents cost to run.
FAQ
How is this different from an AI code reviewer that reads the diff?
P-Rex reports only what it reproduced: a failing test, a request and response, a log line or a screenshot. Suspicions it couldn't trigger go in the summary as "worth a look". That keeps the review short and every finding backed by evidence.
Can an AI reviewer test UI changes?
Yes. It opens the app in a real browser on its own machine, goes through the flow like a user and takes screenshots at the important step. Those screenshots are attached as evidence for UI findings.
Is it safe to run pull requests from forks?
P-Rex doesn't run them. The trigger skips fork PRs, and if one reaches it anyway, it reviews by reading only and says so. It never installs, tests or starts code from a fork.
Will it block or approve my PRs?
No. It never approves, requests changes, merges or pushes. It posts one comment, and your team decides. To fix failing builds as well, see the CI fixer.
Want reviews that come with reproduction steps? Start free.