Agent SDK

Review and triage templates

View as Markdown

Each template is one model turn. A review template reads the diff and posts one comment, and the triage template comments on a ticket you already filed.

Template--template idWhat it postsChannel
Security reviewersecurity-reviewerOne comment on exploitable bugs, such as injection, authz bypass, secret leaks, SSRF, and RCEGitHub
Thermo reviewthermo-reviewOne comment on bugs, breaking side effects, and unintended feature exposureGitHub
Thermo quality reviewthermo-quality-reviewOne comment on structure, such as missing abstractions, deep nesting, and files past 1,000 linesGitHub
Triagetriage-linear, triage-jira, or triageA Triage: comment, a bug priority, and a duplicate link when titles matchLinear or Jira

triage is short for triage-linear. No review template comments on style, and the quality template doesn't argue about behavior.

The Agentic Approver template is separate. It applies an owners policy instead of posting one findings comment.

Scaffold

Text

agent-sdk init ./security-reviewer --template security-reviewer \
  --var repos=acme/api

Swap the folder and the --template id for the row you want. --var repos is only for security-reviewer. Name repositories already connected in Grok Build, separated by commas, and they must share one owner. init writes that list to bot/lib/repos.ts.

Try it locally

Connect GitHub for the repositories you watch (Grok Build Settings or grok.com/dashboard), then sign the host in with agent-sdk login. The GitHub guide covers cursorAccount.

Text

agent-sdk dev --cursor-events --repo acme/api
agent-sdk github replay https://github.com/acme/api/pull/12 --dir .

You need pull access to replay. The channel skips drafts, writes the diff to pr/diff.patch, and starts a turn. The model calls post_findings once, and that call writes the GitHub comment. Chat replies stay in the playground.

Text

agent-sdk eval

Eval sessions skip the GitHub write. Edit bot/instructions.md for what counts as a finding, and edit evals/review.eval.ts for the smoke cases.

Deploy

From the agent's git checkout:

Text

agent-sdk login
agent-sdk deploy --cursor-events-repo acme/api

Repeat --cursor-events-repo for each repository, and every repository must share one owner. The deployment watches those repositories through your team's Grok Build GitHub connection, and you can change the list later without a redeploy:

Text

agent-sdk deployment update my-agent --event-repo acme/api --event-repo acme/web

Triage a tracker

The template runs after someone files a ticket, so keep filing them as you do now. Connect Linear or Jira under MCP in the Grok Dashboard, then run agent-sdk dev and open /queue/issue in the playground.

Bash

curl -X POST http://127.0.0.1:3000/triage-agent/v1/channels/queue/issue \
  -H 'content-type: application/json' \
  -d '{
    "identifier": "ENG-142",
    "title": "CSV export returns 500",
    "description": "Export has returned 500 since this morning."
  }'

For create webhooks, set LINEAR_WEBHOOK_SECRET or JIRA_WEBHOOK_SECRET and point the provider at /v1/channels/webhook on the deployed alias. record_triage comments on the issue that started the session. Edit bot/skills/triage-rubric.md for kinds and what urgent means on your team. Eval sessions skip tracker writes.


Last updated: November 23, 2026