Create a workspace
Sign in at sentrail.dev and create a workspace. Set the environment to test while you integrate — test workspaces run full policy evaluation but are labeled separately in audit logs.
Connect GitHub
Go to Tools → GitHub → Connect. Sentrail will redirect you through GitHub OAuth. After authorization, your workspace stores an access token server-side — the token is never exposed to agents.Copy the webhook URL shown after connecting:Add it to your GitHub repository or organization settings under Webhooks. Set the content type to
application/json and add a webhook secret — you will paste this secret into Sentrail’s tool configuration.Create an API key
Go to Settings → API Keys → New Key. Give the key a name and assign the
gateway scope. Copy the key — it starts with agk_ and is shown only once.Write your first gated action
Replace the GitHub API base URL in your agent with the Sentrail gateway. Pass your API key as a Bearer token and include an agent identifier header.If no matching policy exists, Sentrail defaults to allow and forwards the request. You will receive the GitHub API response directly with two extra headers:
Create a require_approval policy
Go to Policies → New Policy and configure:
Now repeat the request but for a pull request:You will receive a 202 response:The action is paused until a reviewer approves or denies it in the Sentrail dashboard.
| Field | Value |
|---|---|
| Tool | github |
| Action pattern | pull_request.create |
| Risk level | high |
| Mode | require_approval |
| Priority | 10 |