Features
Repository access
Let agents inspect files, commits, blame, pull requests, branch rules, and repository metadata.
Pull request workflows
Allow agents to create, update, review, and close pull requests — including
as drafts — when their workflow needs to change code.
Response Agents as Code
Sync response-agent definitions from YAML files in a selected GitHub repo,
branch, and folder.
Scoped installation
Control exactly which GitHub organizations and repositories Cotool can
access through the GitHub App installation.
Bring your own GitHub App
Connect a GitHub App you register and own, so your organization chooses the permissions Cotool is granted — including read-only.
Choosing How to Connect
Either App can be installed on multiple GitHub organizations, and both Apps can be connected to the same Cotool organization at once — even on the same GitHub organization, as long as each repository is selected for only one of them. See Installing across GitHub organizations and Using both Apps together.
Setup with the Cotool-managed App
1
Open the GitHub integration
In Cotool, go to Settings > Integrations and open GitHub.
2
Install the GitHub App
Under Cotool-managed GitHub App, click Connect. GitHub will ask you
to install the Cotool GitHub App on an organization or user account. For a
GitHub organization, an organization owner must complete the installation.
3
Choose repository access
Select the repositories Cotool should be able to access. You can grant
access to all repositories or only selected repositories.
4
Authorize your GitHub user
After installing the app, authorize Cotool as a GitHub user who can access
the new installation. Cotool verifies this access before linking the
installation to your Cotool organization.
5
Finish the connection
After authorization, GitHub returns you to Cotool. The GitHub integration page will show the connection state and any feature cards that depend on GitHub.
You need permission to install GitHub Apps in the target GitHub
organization. In Cotool, connecting GitHub and configuring GitHub-dependent
sync settings require the
tool.manage permission.Setup with Your Own GitHub App
Use this when your organization wants to control the permissions Cotool is granted. You create the App in GitHub, give Cotool its credentials, then install it on your organization the same way as the managed App.1
Open the custom App setup
In Settings > Integrations > GitHub, find Bring your own GitHub App and click Set up custom App. The dialog shows the exact values to paste into GitHub’s Create GitHub App form.
2
Create the App in GitHub
In your GitHub organization, go to Settings > Developer settings > GitHub Apps > New GitHub App and fill in the form using the values from the Cotool dialog:
- Identifying and authorizing users — add Cotool’s callback URL as a Redirect URI. Leave Request user authorization (OAuth) during installation unchecked.
- Post installation — use the same callback URL as the Setup URL. Leave Redirect on update unchecked.
- Webhook — GitHub requires a Webhook URL before it will create the App. Paste the Cotool-provided URL now, leave Active unchecked and Secret blank for the moment.
- Permissions — choose what Cotool may do. See Permissions below.
3
Paste the App's credentials into Cotool
After GitHub creates the App, copy its App ID and Client ID,
generate a client secret, and generate and download a private key.
Paste all four into the Cotool dialog and save. Cotool verifies the
credentials against GitHub — the App ID, private key, and client ID must all
belong to the same App, and the required Members permission must be present
— before storing anything.
4
Finish the webhook
Once Cotool shows Credentials verified, it displays a Cotool-generated
webhook secret. Back in GitHub’s App settings, paste that secret into the
Webhook section, turn Active on, and subscribe to the
Installation, Installation target, and Installation repositories
events. These let Cotool keep repository routing current as you change the
App’s repository access.
5
Install the App
Click Add organization under Bring your own GitHub App. GitHub walks you through installing your App on an organization and choosing repositories, then Cotool verifies your GitHub user and links the installation — exactly as with the managed App.
Permissions on your own App
GitHub enforces your App’s permissions on every request Cotool makes, so choose them to match what you want agents to be able to do:Recipe: a read-only App
To guarantee agents can never modify a set of repositories, create your App with exactly:- Repository → Contents: Read
- Repository → Pull requests: Read
- Organization → Members: Read (required for setup)
github_listRepositories reports these repositories as read-only with every write capability false, so agents know not to attempt them — see What agents can see.
If you change the App’s permissions later, GitHub asks an organization owner to approve the new permissions for each existing installation. Cotool picks up the approved permissions on its next request; no reconnect is needed.
Managing your App
Manage App under Bring your own GitHub App lets you update the App’s credentials, rotate the Cotool-generated webhook secret, or remove the App configuration. Switching to a different App ID or removing the configuration is blocked while any of its installations are still connected — disconnect those first.Installing Across GitHub Organizations
A single GitHub App — managed or your own — can be installed on as many GitHub organizations (or user accounts) as you need, and Cotool treats each installation as a separate connection. Click Connect / Add organization again to install the same App on another organization. The integration page groups your installations by GitHub organization.Using Both Apps Together
Your Cotool organization can have the managed App and your own App connected at the same time, and the two Apps may be installed on different GitHub organizations or on the same one. Every repository is served by exactly one installation, so Cotool routes each repository as follows:- A repository visible to only one installation is routed through that installation.
- Two Apps may share a GitHub organization as long as they are installed on disjoint sets of repositories — each repository selected for one App and not the other. This is how you run a read-only App on sensitive repositories and the managed App on everything else within a single GitHub organization.
- If you install a second App on an organization and its selected repositories overlap an existing Cotool installation, the new installation is rejected and Cotool shows the exact overlapping repositories. If an already-connected installation later gains a repository that another installation already serves, that whole installation is marked Blocked — none of its repositories are used — until the overlap is resolved.
- To resolve an overlap, change the repository selection on one App in GitHub so each repository is selected for only one App. Cotool reconciles automatically via the installation webhooks and unblocks the installation; rejected installations are retried without any action in Cotool.
What Agents Can See About Their Access
When an agent lists repositories (github_listRepositories / github_searchRepositories), each repository includes a cotool_access block describing the App and installation that serve it and what Cotool is permitted to do there, based on the permissions GitHub actually granted that installation:
apps, with the permissions granted to each of its installations. Agents use this to answer questions like “which repositories are you read-only on?” directly, and to check before attempting a write that the serving App allows it.
Repository Access
Cotool uses the GitHub App installation token for the repositories you selected during setup. If a repository does not appear in Cotool:- Confirm a connected GitHub App (managed or your own) is installed on the organization or user account that owns the repo.
- Confirm that installation has access to that specific repository.
- Check the integration page for a Blocked installation — a repository selected for both Apps disables the affected installation until the overlap is removed.
- Reconnect or update the GitHub App installation if repository access changed after the original setup.
Response Agents as Code Sync
After GitHub is connected, the GitHub integration page includes a Response Agents as Code card. Use it to point Cotool at the folder that contains your agent YAML files:1
Select a repository
Choose from repositories available to the GitHub App installation.
2
Select a branch
Pick the branch Cotool should poll. The picker defaults to the repository’s
default branch when possible, otherwise
main.3
Select a path
Choose the folder containing one-agent-per-file YAML definitions. The
default path is
cotool/agents.4
Enable and save sync
Turn on Enable sync and click Save config. Cotool will include your
organization in the periodic sync.
5
Run an immediate sync
Click Sync now to sync without waiting for the next scheduled poll.
Disconnecting or Reconnecting
If GitHub is disconnected, synced agents keep running with their last synced definition, but Cotool cannot fetch new YAML changes until the integration is reconnected. Reconnect GitHub when:- the GitHub App installation was removed,
- repository access changed and Cotool cannot see a repo,
- the Response Agents as Code card shows a reconnect prompt,
- or agent GitHub tools fail because the installation is unavailable.
Related
Response Agents as Code — manage response agents as YAML in GitHub
Triggering Agents — configure agent triggers in the UI or YAML