What you will build
You will create a GitHub pull request (PR) reviewer fleet from a Definition file. It will receive PR events and post review comments.Before you begin
If you need hosted access, join the waitlist. Public website access links open the waitlist, including Sign in links. If you already have access, sign in to the dashboard to manage your workspace. Choose Manage account for your profile and sign-in security. You can also open account settings directly. You need Bun 1.4 or later, anagentsfleet account, and a GitHub repository that you can manage.
Your workspace owner must enable a model with credentials, an API format, an endpoint, and token limits.
Copy its eligible ref from GET /v1/workspaces/{workspace_id}/models?purpose=authoring; step 6 calls this <MODEL_REF>.
Create a GitHub token that can read the repository and post comments. Keep the token ready for step 4.
These steps use a repository webhook and a saved token.
For a connected GitHub App, follow Configure a webhook instead.
Steps
-
Install the
agentsfleetcommand-line interface. -
Check the installed version.
-
Sign in through a browser on the same computer as your terminal.
Compare the check code in your browser with your terminal. Choose Authorize only if you started the sign-in and both codes match. For a remote terminal or another device, use
agentsfleet login --no-openand follow manual sign-in. Login keeps your previous workspace if it is still available; otherwise it selects the first available workspace. Checkagentsfleet workspace showbefore saving secrets. Useagentsfleet workspace use <WORKSPACE_ID>to switch, with an identifier fromagentsfleet workspace list. -
Save the GitHub secret in your active workspace.
Replace
<GITHUB_TOKEN>with your repository token. Generate<GITHUB_WEBHOOK_SECRET>as a random value of at least 32 bytes; GitHub will use the same value in step 9.hostbinds the outgoing token toapi.github.com. The client stores the values without printing them again. -
Write the fleet’s Definition to
pr-reviewer.json.daily_nanoscaps spending at 2 dollars a day. Fleet budgets explains the unit. -
Open a private draft from the file and review it.
Use the
<MODEL_REF>from Before you begin. This file starts a draft without making an authoring-model request.The review prints the setup, runtime model, and required access. Check them before you save. The authoring model and runtime model can differ. -
Save the fleet with the digest from the review.
A fleet that reads
installingis waiting on a setup check, such as an integration grant to approve. The lines after it name each check and its next step. -
Read the fleet’s webhook URL.
<FLEET_ID>comes fromagentsfleet list.Thewebhook_urlsentry withsourceset togithubholds the URL. -
Add the webhook in GitHub.
Open Repository settings → Webhooks → Add webhook. Use the webhook URL from step 8 as the payload URL.
Choose
application/jsonas the content type. Use the same webhook secret from step 4. Select Pull requests as the event. GitHub now sends PR events to your fleet. - Open a PR in the repository. GitHub sends the event after you open the PR. The fleet then attempts the review and posts its comment.
Verify it works
<FLEET_ID> comes from agentsfleet list.