GitHub integration

GitHub AI agents: issues, pull requests and developer debugging

GitHub's REST API works with a fine-grained personal access token or a GitHub App token, and most of what a debugging assistant needs is read-only: issues, pull request diffs, workflow runs, file contents. Pair it with the browser tool for public docs and a knowledge base for your runbooks.

Tool type
HTTP API
Auth type
bearer_token (fine-grained token)
Safety level
safe_read for reads, write_safe for comments

What you can build

A debugging assistant that reads a failing workflow run's logs summary and the related pull request before proposing next steps.

A triage agent that finds duplicate issues and drafts a comment for a maintainer to approve.

An internal helper that answers 'what changed in this release?' from merged pull requests.

How to connect GitHub

  1. 01Create a fine-grained token limited to the repositories the agent may read, with issues and pull requests read access. Store it on the tool's auth settings.
  2. 02Create HTTP API tools for the endpoints you need, for example GET https://api.github.com/repos/{{owner}}/{{repo}}/issues and GET .../pulls/{{number}}/files, with safe_read and an Accept header for the API version.
  3. 03Add a browser tool with the fetch_page action for public documentation pages the agent may read.
  4. 04For comments, create a separate POST tool with write_safe and requires approval.
  5. 05Attach the tools to the agent, ask it about a real issue in the test chat, and read the sequence of calls in the trace.

Example tool definition

The shape a tool takes in the AgentRow builder API. Credentials are stored on the tool's auth settings, not in its configuration, so they never reach a prompt. Placeholders in double braces are filled by the model from the input schema.

{
  "name": "github_list_issues",
  "type": "http_api",
  "description": "List open issues for a repository, optionally filtered by label. Use when the user asks what is open or whether an issue already exists.",
  "auth_type": "bearer_token",
  "safety_level": "safe_read",
  "is_readonly": true,
  "config": {
    "method": "GET",
    "url": "https://api.github.com/repos/{{owner}}/{{repo}}/issues",
    "headers": { "Accept": "application/vnd.github+json", "X-GitHub-Api-Version": "2022-11-28" },
    "query_params": { "state": "open", "labels": "{{labels}}", "per_page": "20" },
    "allowed_domains": ["api.github.com"]
  },
  "input_schema": {
    "type": "object",
    "properties": {
      "owner": { "type": "string" },
      "repo": { "type": "string" },
      "labels": { "type": "string", "description": "Comma-separated label names, optional" }
    },
    "required": ["owner", "repo"]
  }
}

What the run trace shows

Every call appears in the run trace with the rendered request, the response status and body, timing, retries and errors, plus what the model was shown of the result. If the model never called the tool, the toolbox step shows whether it was bound for that model call and why.

Frequently asked questions

Can the agent run code to reproduce a bug?

Not in a sandbox today. The code execution tool type evaluates a single safe expression; treat it as a calculator, not a runner. Reproduction stays with the developer, and the agent helps with reading, searching and summarising.

How do I stop the agent from reading private repositories?

Scope the token to the repositories you allow and restrict the tool's allowed domains. The tool can only reach what the credential can.

Can it read a very long diff?

Yes. Large results are stored in full and the model reads them in parts with the built-in tool_history tool, so a long diff does not blow the prompt budget.

Connect GitHub to your first agent

Join the waitlist for early access. Tell us which systems you need to connect and we will point you at the right tool definitions.