Review code changes in Chalk Sandboxes
This demo shows how to run PR review agents on Chalk to get comments tied to your code changes. Paste a public GitHub pull request or replay an example to try it, then explore the code to see how it works.
Connect review findings to a pull request
Start with the markupsafe example, or paste a public pull request or commit link. Follow the session as it reads the staged code and diff.
Inspect each finding’s file, line, and explanation in Feedback objects. Check it against the diff before using the payload; this demo does not post to GitHub.
Review the sample change, then compare each finding with its file and line. Chalk runs the agent in an isolated sandbox; this demo does not post comments.
Built on Chalk
Chalk provides the sandbox, network controls, credential handling, and versioned storage. The example’s agent tools check comment locations against the diff and produce the review payload.
Isolate each review
Chalk runs the agent in a sandbox with a restricted kernel and a fixed lifetime. Each fresh review starts its own sandbox.
Limit network access
Chalk’s network policy lets this sandbox reach only the model router. The example fetches the repository before starting the agent.
Model keys stay outside the sandbox
The sandbox receives a placeholder for the router key. Chalk inserts the real key only on requests to the configured host.
Pin the review input
Chalk Volumes mount a specific version of the staged code and diff as a read-only snapshot. The agent reviews that snapshot without changing the source files.
Run it on your own
Clone the example, log in to Chalk, and store a router key as a Chalk secret. Use the CLI to review a pull request, or run deploy.py to host the web demo in your environment.
The agent uses the Claude Agent SDK. Adapt its prompt and review tools to your team’s conventions. You will need uv and a Chalk environment with the model router enabled.
git clone https://github.com/chalk-ai/pr-review-agent
cd pr-review-agent
chalk login
# One time: store a router key the sandbox can use without ever seeing it.
# Paste the key that `chalk router api-key create` prints.
chalk secrets set CHALK_ROUTER_API_KEY
# Review a pull request from your terminal...
./review_cli.py https://github.com/pallets/markupsafe/pull/528
# ...or deploy this page as your own web app.
./deploy.pyBuild your code review workflow
Talk to an engineer about running review agents with controlled access to code, models, and credentials.