Skip to content
English

Agents

Connect GitHub: agents that code without personal tokens

Install Neurothread's GitHub App on the repositories you choose: your agents clone, push branches and open pull requests with a token that lasts one hour.

You need an agent that codes, with the team computer on (see Agents that code) and a GitHub account with access to the repositories. To install the app on an organization you must be an owner, or ask an owner to approve it.

  • You want an agent to work on your repositories without creating and saving a personal token.
  • You want to choose exactly which repositories it can reach, and change them on GitHub whenever you like.
  1. Open Secrets (from an agent’s chat or in Settings). At the top, in GitHub, select Connect GitHub: GitHub opens in a new tab.
  2. Accept the authorization. If the app isn’t installed yet, choose your account or an organization, then All repositories or Only select repositories, and select Install.
  3. That tab comes back to Neurothread with GitHub connected, and every account where the app is installed appears in GitHub.
  4. For another account or organization, select Connect another account or organization.
  5. Under each account, in Who works on GitHub, choose All agents, a team, or Specific agents… and tick them (the Software engineer role is made for it).
  6. On GitHub, add the label agent to an issue: the least busy of those agents picks it up. To give it to one in particular, use the label agent:Name (for example agent:Diego).
  7. Optional: in Pull request reviewer, choose an agent to review the others’ pull requests before you do.

You install the app on the organization acme, only on the repository acme/web. You tell your agent: “Fix the typo in the footer of acme/web and open a pull request”. The agent clones the repository, creates a branch, makes the change, runs the tests, pushes the branch and shares the pull request link. You review it and merge it on GitHub.

Each command the agent runs on its computer gets a GitHub token that lasts one hour and only reaches the repositories of the installation. The agent never sees it and doesn’t ask you for a token. It works in a branch and opens a pull request: merging is always up to you.

With an agent chosen for the account:

  • An issue labeled agent becomes a task in the agent’s chat, marked From GitHub. The agent opens a pull request with “Closes #N”.
  • Reviews and comments on its pull requests, from people with a role in the repository (owner, member or collaborator), start a new task for the agent that opened the pull request: it makes the changes in the same branch and answers.
  • Failing CI on its pull requests: it finds the error and fixes it, at most 3 times a day per pull request.
  • With a reviewer, each time an agent opens or updates a pull request the reviewer checks it out, reads the diff and runs the tests. If something must change it leaves a review with comments and the agent that opened it fixes it; if it’s fine it comments that it’s ready for you to merge. At most 2 review rounds a day per pull request.
  • When each task ends it comments on GitHub what it cost in credits and the total for that issue or pull request.
  • Connecting GitHub is free; the agent’s work costs credits as usual (model and computer time).
  • The agent only reaches the repositories you picked. To add one, select Manage on GitHub.
  • Disconnect removes the connection from Neurothread; to uninstall the app completely, also remove it on GitHub.
  • A token saved in Secrets as GH_TOKEN still works: when the agent uses it, it takes priority.
  • Tasks that come from GitHub don’t get your other secrets. To cap what one task can spend, use Autonomy (long tasks) in Agent settings.
  • We recommend protecting the main branch on GitHub so that every change goes through a reviewed pull request.
  • I don’t see GitHub in Secrets: it isn’t available for your account yet.
  • “The app isn’t installed on any account”: the GitHub user you authorized with can’t see an installation. Install it on the account or organization (or ask an owner) and select Connect GitHub again.
  • The agent can’t reach a repository: check it’s among the installation’s repositories in Manage on GitHub.
  • The organization has to approve it: an owner approves the request on GitHub; then select Connect GitHub again.
  • I labeled an issue and nothing happens: check that Who works on GitHub isn’t Nobody for that account (with Specific agents…, that at least one is ticked) and that you have credits. Comments from people without a role in the repository don’t start tasks.