Skip to main content
Integrations · GitHub
Guild gives agents authenticated access to the GitHub REST API through a GitHub App: tokens generated on demand and refreshed automatically, access limited to the repositories you choose, every operation policy-checked and logged. The same integration powers the Software Factory, where labeled issues come back as reviewed pull requests.

Book a demo

See how teams govern agents against their own repositories.

Start free

Connect the GitHub App and scope your first agent.

The whole GitHub API, with guardrails that read like English

Guild’s GitHub tools are generated from GitHub’s official OpenAPI specification, so tool names match GitHub’s own operation IDs: github_pulls_get is pulls_get. Your agent gets the real API surface, and your policies decide which slices of it each agent may use. Read issues but never close them. Open pull requests but never merge them. One YAML rule each, default deny underneath.

How it works

1

Connect the GitHub App

Authorize Guild on your organization, choose the repositories. Tokens are generated on demand and refreshed automatically; agents never see them.
2

Scope each agent

Credential policies decide which operations each agent may perform, per repository, per workspace. DENY beats ALLOW.
3

Put it to work

Triage issues, review pull requests, respond to events with GitHub event triggers, or run the full Software Factory: labeled issues in, reviewed pull requests out, with a person owning the merge.

Your repos are the crown jewels; treat agent access that way

An agent with GitHub access can read source, open branches, and touch CI. That is exactly why it is valuable, and exactly why “we gave it a PAT” is not a security model. On Guild the agent has an identity, the credential has a policy, every call lands in a tamper-evident audit log, and a running session can be stopped mid-task. The Factory proves the model at scale: 34% of Guild’s own merged PRs are written autonomously, at roughly $12 of model spend per merged PR, with building kept separate from reviewing so no agent merges its own work.

Authentication

  • Type: GitHub App
  • Token management: Generated on-demand and refreshed automatically
  • Scoping: Limited to repositories where the Guild GitHub App is installed

Setup

1

Open Credentials

Go to Credentials in Guild.
2

Connect GitHub

Click GitHub and authorize the Guild app on your organization or repository.
3

Select repositories

Choose which repositories to grant access to.
Guild has two other GitHub integrations. guildai~github-oauth connects your personal GitHub account with OAuth, using the repo, user:email, and admin:repo_hook scopes, so calls act as you rather than as the Guild GitHub App. guildai~github-graphql calls GitHub’s GraphQL API. The package, tools, and events on this page are for guildai~github.

Usage

Selecting specific tools

Agents perform better with fewer tools. Use pick() to include only what your agent needs. Tools are named with the github_ prefix — for example, pulls_get becomes github_pulls_get.

Trimming responses

GitHub API responses can be large. Use guildServiceTool() with githubSchemasLite to strip unnecessary fields before the LLM sees them.

Tools

Tools in the latest published version of guildai~github:

Webhook events

GitHub uses an app-scoped webhook model — a single webhook receives all events and Guild routes them to matching triggers. A trigger can narrow an event to one action, such as guild trigger create --event pull_request --action opened. Without an action it fires on every action of that event. Events marked Any take no action. Guild preprocesses webhook payloads before passing them to agents, removing avatar URLs, permalink URLs, and deeply nested metadata to reduce payload size. A run started by a GitHub event acts as the organization member mapped to the GitHub user who caused it, or as the trigger’s creator when there is no mapping. See Identity mapping.

Limitations

  • Access is scoped to repositories where the GitHub App is installed
  • Rate limits follow GitHub’s standard limits (5,000 requests/hour for authenticated apps)

Frequently asked questions

Through a GitHub App. Tokens are generated on demand and refreshed automatically, scoped to the repositories where the app is installed. Agents never hold long-lived credentials.
Yes, per operation. Credential policies are default-deny YAML rules scoped by operation, resource, agent, and workspace, and DENY always beats ALLOW.
Not in the Factory pattern. Building stays separate from reviewing, and a person owns the outcome. That separation is deliberate.
Yes. Event triggers run an agent automatically when something happens in a connected service, GitHub included.
On Guild’s own codebase, the published figure is roughly $12 of model spend per merged PR, visible per agent in Spend Explorer.

Put a governed agent on your repos this week

Book a demo

Walk through policies and the Factory with the team.

Start free

Connect the GitHub App and scope your first agent.
Also runs on Guild: Slack · OpenClaw · Goose · Jira Read: Docs: Software Factory · Credential policies · Software Factories, by the Numbers
Last modified on October 16, 2026