Assay PR Agentsingle-pass review
Pages

Settings reference

AbstractAssay PR Agent takes its configuration from a saved setup or from the environment, and an explicit environment setting takes precedence over a saved value. This page lists every variable, which service reads it, and the shape of a project entry.

Two sources

The wizard writes a saved setup under /state/setup/. A deployment with no wizard supplies the same facts as environment variables. Where both set something, the environment wins.

Three services read them: setup, which runs the manager, the wizard and sign-in; sync, which refreshes checkouts; and reviewer, which polls and runs each review.

Provider and sign-in

VariableDefaultRead byMeaning
REVIEW_PROVIDERcursorsetup, reviewercursor, claude or codex
REVIEW_AUTH_MODEapi-keysetup, reviewerapi-key or login. A new wizard configuration defaults to login.
REVIEW_MODELnonesetup, reviewerA model the selected provider offers
CURSOR_API_KEYnonesetup, reviewerThe Cursor key
ANTHROPIC_API_KEYnonesetup, reviewerThe Claude key
CODEX_API_KEYnonesetup, reviewerThe Codex key
REVIEW_CURSOR_TEAM_IDnonesetup, reviewerThe Cursor team to bill. Part of the cache key.
REVIEW_LOGIN_DIR<state>/provider-login, or /model-auth with Composesetup, reviewerWhere the provider's sign-in session lives
REVIEW_STATE_DIR~/.local/state/cursor-review, or /state in the imageallThe root of the state volume

Each provider key has a _FILE variant naming an absolute path to a mounted file. Only the selected provider's variant is read.

Budget, polling and history

VariableDefaultRead byMeaning
REVIEW_MAX_INPUT_TOKENS6000setup, reviewerThe prompt budget. Cost and coverage gives its precedence.
REVIEW_POLL_SECONDS120reviewerSeconds to wait after each polling cycle
REVIEW_SYNC_SECONDS120syncSeconds between checkout syncs
REVIEW_QUALGEN_INTERVAL_SECONDS86400reviewerSeconds between history mining runs. 0 disables mining and advisories.
REVIEW_WATCH_SETUPoffsync, reviewer1 makes both wait for the first setup, and exit when it is saved so they reload. Compose sets it.
XDG_CACHE_HOME/tmp/.cache in the imagereviewerThe parent of the default cache directory for a review run by hand
REVIEW_OSV_DOWNLOAD_DATABASES1reviewer0 forbids OSV-Scanner from downloading or refreshing advisory databases

Forge credentials

Supplying any of these configures the container without a wizard. Each container supports one GitHub App installation on github.com and one GitLab instance.

VariableWhat to supply
REVIEW_OPERATORThe responsible human's forge login:numeric-id. Assay uses it for posting attribution. The project's requester_ids separately control who can request reviews.
REVIEW_GITHUB_APP_ID, REVIEW_GITHUB_INSTALLATION_IDNumeric IDs for the GitHub App and for the installation covering your repositories. Use a reviewer installation with access to read PRs and diffs, and to write PR conversation comments.
REVIEW_GITHUB_PRIVATE_KEY, or REVIEW_GITHUB_PRIVATE_KEY_FILEThe App's unencrypted RSA PEM, or an absolute path to the mounted PEM. The value accepts real line breaks or a literal \n.
REVIEW_GITLAB_TOKEN, or REVIEW_GITLAB_TOKEN_FILEA dedicated GitLab reviewer token with API permission to read merge requests and post notes, or an absolute path to the mounted token
REVIEW_GITLAB_BASE_URLThe instance's HTTPS URL, including any port and path prefix. A project entry can carry its own gitlab_base.
REVIEW_GITLAB_CA_FILE, REVIEW_GITLAB_CRL_FILEOptional absolute paths to a PEM private CA bundle and a PEM revocation list. The variables without _FILE accept inline PEM. Supply the same paths to setup, sync and reviewer.
REVIEW_PROJECTSThe JSON project list. Its shape is below.

A project entry

REVIEW_PROJECTS is a JSON array. This example lists one GitHub project and one GitLab project:

A project list, set out one key per line. The same list fits on one line in an environment file.
  1. [
  2. {
  3. "provider": "github",

    Comment 1, on line 3: The forge: github or gitlab.

  4. "url": "https://github.com/example/api",
  5. "checkout": "/repos/api",
  6. "requester_ids": [101],

    Comment 2, on line 6: The accounts allowed to post /review, by numeric ID.

  7. "visibility": "public"

    Comment 3, on line 7: Set the visibility the project really has. It authorizes posting on a public or internal project.

  8. },
  9. {
  10. "provider": "gitlab",
  11. "url": "https://gitlab.example.com/example/web",
  12. "checkout": "/repos/web",
  13. "requester_ids": [202],
  14. "visibility": "private"
  15. }
  16. ]
KeyRequiredTakes
providerYesgithub or gitlab. It names the forge, not the model.
urlYesThe project's full HTTPS URL
requester_idsYesA non-empty list of numeric account IDs allowed to request reviews
checkoutUnless managed is setAn absolute directory that exists inside the container
managedNotrue for a clone the sync service manages. The checkout path is then derived from the URL.
visibilityNoprivate by default, internal or public
go_analysisNoThe trusted CI workflow or job that publishes Assay's Go analysis report
scanner_ciNoPer-tool settings for reusing CI scanner reports. CI reports has them.
gitlab_baseNoThe instance's HTTPS base, for a GitLab project on a custom instance

Setup and Compose

VariableDefaultMeaning
REVIEW_SETUP_BIND127.0.0.1, or 0.0.0.0 with ComposeThe address the browser wizard listens on. The port is fixed at 8765.
REVIEW_IMAGEassay-pr-agent:localThe image Compose runs. With install.sh, setting it pulls the image instead of building it.
CONTAINER_RUNNERubuntu-latestA GitHub Actions repository variable naming a Docker-capable Linux x64 runner

A complete environment file

This review.env uses both forges, and reads two keys from a mounted secrets directory:

One project per forge, with credentials read from mounted files.
  1. REVIEW_OPERATOR=alice:101
  2. REVIEW_GITHUB_APP_ID=123456
  3. REVIEW_GITHUB_INSTALLATION_ID=789012
  4. REVIEW_GITHUB_PRIVATE_KEY_FILE=/run/secrets/github-reviewer.pem

    Comment 1, on line 4: The App's key, read from the mounted file.

  5. REVIEW_GITLAB_TOKEN_FILE=/run/secrets/gitlab-reviewer-token
  6. REVIEW_PROJECTS=[{"provider":"github","url":"https://github.com/example/api","checkout":"/repos/api","requester_ids":[101],"visibility":"public"},{"provider":"gitlab","url":"https://gitlab.example.com/example/web","checkout":"/repos/web","requester_ids":[202],"visibility":"private"}]

    Comment 2, on line 6: The same two projects as above, on one line.

  7. REVIEW_POLL_SECONDS=120
  8. REVIEW_MAX_INPUT_TOKENS=6000
docker run --rm --platform linux/amd64 --env-file review.env -e CURSOR_API_KEY \
  -v review-state:/state -v /path/to/checkouts:/repos:ro \
  -v /path/to/reviewer-secrets:/run/secrets:ro assay-pr-agent

For environment-only credentials, omit the two _FILE lines and the secrets volume, and pass -e REVIEW_GITHUB_PRIVATE_KEY -e REVIEW_GITLAB_TOKEN to forward exported values.

The same in a Pod

Argo CD and Flux can mount a Kubernetes Secret instead. The fragment adds a mounted key and an injected token to the reviewer container. The other settings can come from a ConfigMap.

A Pod fragment that mounts the GitHub App key and injects the GitLab token.
  1. spec:
  2. containers:
  3. - name: reviewer
  4. env:
  5. - name: REVIEW_GITHUB_PRIVATE_KEY_FILE

    Comment 1, on line 5: The key arrives as a file.

  6. value: /run/secrets/reviewer/github.pem
  7. - name: REVIEW_GITLAB_TOKEN

    Comment 2, on line 7: The token arrives as an environment variable, from the same Secret.

  8. valueFrom:
  9. secretKeyRef:
  10. name: reviewer-credentials
  11. key: gitlab-token
  12. volumeMounts:
  13. - name: reviewer-key
  14. mountPath: /run/secrets/reviewer

    Comment 3, on line 14: Mount the files so UID 10001 can read them.

  15. readOnly: true
  16. volumes:
  17. - name: reviewer-key
  18. secret:
  19. secretName: reviewer-credentials
  20. items:
  21. - key: github-private-key
  22. path: github.pem

Runtime copies

Assay keeps mode-0600 runtime copies of the credentials it is given. In Docker these live in /dev/shm. The keys are excluded from the project settings and the review database.

The normal /review path uses GitLab's token without rotating it. The poller derives GITLAB_API_BASE from the configured GitLab projects. An explicit value must match their HTTPS instance and end in /api/v4.