GitHub Webhook Setup
This guide walks you through connecting your GitHub repository to the Xianix Agent — from inviting the agent as a collaborator to wiring up the Xians webhook URL so it starts receiving events automatically.
1. Invite the agent as a collaborator
Section titled “1. Invite the agent as a collaborator”The agent needs write access to your repository so it can post review comments on pull requests.
In your GitHub repository, go to Settings → Collaborators and teams and click Add people. If you’re using Agentri hosted services, invite the xianix-agent GitHub account and grant it the Write role.
2. Open Webhook Settings
Section titled “2. Open Webhook Settings”In your GitHub repository, navigate to Settings → Webhooks and click Add webhook.
3. Configure the webhook
Section titled “3. Configure the webhook”Enter your Xians webhook URL in the Payload URL field, then set Content type to application/json. Leave all other settings at their defaults.
| Field | Value |
|---|---|
| Payload URL | Paste the Xians webhook URL from the Agent Studio |
| Content type | application/json |
| SSL verification | Enable (recommended) |
4. Choose the trigger event
Section titled “4. Choose the trigger event”The default rules listen for pull request activity, so select Let me select individual events and enable Pull requests. This fires when a PR is opened, synchronized, or has its reviewers changed — exactly the signals the default rules act on.
| Event | When it fires |
|---|---|
| Pull requests | PR opened, closed, reopened, synchronized, or reviewer assignments changed |
The agent’s rules engine handles finer-grained filtering itself, so you don’t need to restrict events beyond this.
5. Activate
Section titled “5. Activate”Make sure Active is checked, then click Add webhook. GitHub will immediately send a ping event — a green checkmark confirms the agent is reachable.
6. Test the integration
Section titled “6. Test the integration”The default rules trigger the agent in three situations:
- A pull request is opened with the agent listed as a reviewer.
- New commits are pushed to a PR that already has the agent as a reviewer.
- The agent is requested as a reviewer on an existing PR.
See the PR Reviewer — GitHub rule example for the exact match-any filters and input mappings behind these triggers.
To run your first end-to-end test, open a pull request and request a review from the agent’s GitHub account (xianix-agent on Agentri). Then open the Activity Logs in the Agent Studio — you should see incoming task logs appear within 60 seconds. Within around 5 minutes, the agent will post a review comment directly on the PR.
Next steps
Section titled “Next steps”- Review the ready-to-use PR Reviewer GitHub rule that ships with the default agent.
- Configure agent rules to customise which events the agent acts on — see the complete example in the rules reference for the full file structure.
- Return to the Quick Start if you need a refresher on any earlier steps.