Wire your Cosmos Experts up to GitHub to listen for repository activity — a new PR, a push toDocumentation Index
Fetch the complete documentation index at: https://docs.augmentcode.com/llms.txt
Use this file to discover all available pages before exploring further.
main, a CI failure, or a slash command in a comment — and to read and update GitHub data through a built-in REST API tool.
Prerequisites
GitHub has two integration flavors. Pick the one that matches how your Expert should act:| Flavor | Capability | When to use |
|---|---|---|
| GitHub App (org install) | GITHUB_APP | Expert posts as Augment — acts as a tenant-wide bot identity across every repository in your organization |
| GitHub user OAuth | GITHUB | Expert acts as the human user who triggered it — e.g. a personal review Expert running under your own credentials |
- Go to Configuration → Integrations in the sidebar.
- On the GitHub tile, click Connect.
- Authorize the Augment Code GitHub App and pick which repositories it can access.
- Open My settings → Integrations from the user menu.
- On the GitHub card, click Connect and complete the OAuth flow.
GITHUB_APP and GITHUB are independent, and different Experts in the same tenant can use either.
Enabling GitHub as a Tool on an Expert
In the Expert editor, the Capabilities section lists every capability you can grant the Expert. Toggle on GitHub App (or GitHub for per-user) and save. Cosmos automatically wires up a GitHub API tool — a REST-style wrapper aroundapi.github.com — with no further setup required.
The capability mode determines authentication and the tool name:
- GitHub App → tool name
github-app-api, signed with the org-level GitHub App installation token - GitHub → tool name
github-api, signed with the invoking user’s OAuth token
method defaults to GET. summary is required and surfaces in run logs and the Expert UI. Set details: true to receive the full GitHub response payload instead of the trimmed default.
GitHub’s
/issues endpoints return both issues and pull requests. Filter on pull_request != null in the response if you only want one or the other.Configuring GitHub Triggers
GitHub triggers are added from the Triggers section of the Expert editor. Pick GitHub as the trigger type, set Event type to a GitHub webhook event name, and (optionally) write a Filter — a JSONLogic expression evaluated against the raw GitHub webhook payload. The trigger fires only when the filter returns true. Top-level keys available to filter on vary by event type, but commonly include:action, repository, sender, pull_request, issue, comment, ref, head_commit, workflow_run, installation.
Available event types:
- Pull requests:
pull_request,pull_request_review,pull_request_review_comment - Issues:
issues,issue_comment - Code:
push - CI / checks:
check_suite,status,workflow_run,workflow_job,workflow_dispatch
PRs Ready for Review
Pick Event typepull_request and use this filter to fire on direct opens of non-draft PRs and on ready_for_review transitions out of draft:
Push to main
Pick Event typepush and filter on the ref and repository:
Slash Command in a PR or Issue Comment
To match/augment <something> in a comment, pick Event type issue_comment and filter:
Workflow Failure on main
Pick Event typeworkflow_run and filter on the conclusion and branch:
Common Filter Recipes
Disabling GitHub Access
You can scale back GitHub access at three levels, from least to most disruptive:- Remove a single trigger. Delete the trigger row from the Expert editor and save. The Expert keeps the GitHub API tool but no longer wakes up on that event.
- Remove the GitHub capability. Toggle off GitHub App (or GitHub) in the Expert’s Capabilities section. The Expert loses the GitHub API tool and any remaining GitHub triggers will be rejected when you save.
- Disconnect the integration. From Configuration → Integrations, click Disconnect on the GitHub tile. For a GitHub App install, also uninstall the Augment Code app from GitHub → Organization Settings → Applications. This revokes the token for every Expert in the tenant using that capability.