Skip to content

Agent

Agent

Mention @trycodebot to hand it work. It answers questions, changes code and opens pull requests, following the same rules wherever you mention it.

Code review runs on its own. The agent is the other half of Codebot: it works when someone asks. Mention @trycodebot on a pull request, assign it a Linear issue, or tag it in Discord, and it picks up the request in a cloud sandbox with your repository checked out.

Turn it on

Admins set up the agent on the Agent page of the web app. Its tabs each hold one thing: General (the main switch, model, fast mode and instructions), Access (what it may do), Places (where you can mention it), Ambient (what it does without being asked) and Memory. Members can see its status but not change it.

Pick a model

On General, choose the model the agent runs on. Only models from providers with a key in Model providers are listed. The agent stays off until it has a model.

Turn on Take work when mentioned

This is the agent’s main switch. While it’s off, the agent takes no requests anywhere; on a pull request, a mention gets a reply saying so.

Choose where it can be mentioned

On Places, each place has its own row: pull requests on GitHub and Azure DevOps, Linear and Discord. Rows appear once you’ve connected that tool, and each can be switched off on its own.

Instructions

Free-form instructions on General that the agent follows on every request, wherever it was mentioned. A Discord channel can add its own. Use them for team conventions that aren’t in your repositories’ guideline files, which the agent also reads.

What it’s allowed to do

The Access tab has one row per system the agent works in, each with a level. They apply in every place the agent can be mentioned; a place can narrow them, never widen them.

RowLevels
RepositoryCode only; Read: also pull requests, their checks and CI logs, and issues (GitHub only for now); Read & push: also commit, push and open pull requests. Without push, the agent only answers.
Codebot’s past runsOff or Read: look at earlier reviews and runs, for example to explain a finding.
LinearOff, Read & comment, or Create & update: also create issues and change status, assignee and labels.
Each connected serviceOff, Read, or Read & change where the service allows it. See Connected services.

The agent never force-pushes. When it may push, it pushes to its own work branch, or to the pull request’s branch when it was mentioned on a pull request.

Add an Exa key in Model providers to let the agent search the web.

Connected services

An admin can connect Vercel and Sentry in Settings → Integrations: sign in to Sentry, and paste a Vercel access token (create one in Vercel under Account Settings → Tokens, scoped to your team). The agent can then answer questions such as “why did the last preview deploy fail?” or “what’s throwing in production?” by reading deployments and their logs, or Sentry issues and stack traces, next to the code. Code reviews don’t use them.

Each service has its own page in Settings → Integrations (open Settings on its row):

  • Repositories: the projects, databases or apps each repository uses there, the first as the default. Find automatically fills in the ones the service can match.
  • Places: where the agent can use it. All places gives it to every Discord channel, Linear, pull request mentions and routines, and a switch turns it off in one place. Selected places gives it only where you turn it on.
  • Reconnect and Disconnect are in the ⋯ menu at the top of the page.

Each connected service has a row on Agent → Access: set it to Off to stop the agent using the service without disconnecting it. The agent only reads Vercel. It only reads Sentry too, unless you set it to Read & change. In a Discord channel with Make changes here off, it only reads.

Your sign-in or token stays with Codebot, encrypted: the agent’s sandbox never sees it. Codebot makes each call for the agent; what it read shows in the run’s transcript like any other tool.

Memory

Codebot remembers short facts between requests: decisions, conventions, who owns what. You don’t need to ask: after each request, Codebot keeps what you told it that later requests will need, such as a decision, a convention or who owns what, without a word in the conversation. It reads only your message for this, never what it looked up. You can also tell it directly, like @trycodebot remember that staging deploys need a manual approval, or forget that.

Admins turn memory off with Remember team context on Agent → Memory.

In Discord, an admin can also turn on Listen to conversations on Agent → Ambient. Codebot then follows conversations in your channels and their threads, even when no one tags it, and keeps decisions, conventions and owners the same way. It never replies to them, and it reads only what was written after listening went on. It needs Remember team context. To keep one channel out, turn off Listen to conversations here in its settings. Admins see when it last read each channel and how many facts it kept, and Settings → Usage → Models shows how many reads it made and the tokens they used on your model key, or Codebot’s beta credit while you have it.

Each fact belongs to the place it was said in: a Discord channel, a Linear team, a repository (pull request mentions) or a routine. Requests there see it; requests elsewhere don’t. Facts for the whole organization are added by admins, on Agent → Memory.

Agent → Memory lists everything Codebot remembers, where each fact came from and how often it was used. Any member can add, edit or forget a fact; facts for the whole organization are for admins.

A memory is something your team said, not an instruction: it never changes what the agent may do, and code reviews don’t use it. Organizations that keep only run metadata have no memory. With self-hosted runners, facts are found by their words only, so they never leave for an embedding service.

How a request runs

  1. Codebot acknowledges the request where you asked (a reply, a reaction or a status message), with a link to follow the run.
  2. The agent works in a sandbox with your repository checked out: it reads code, runs commands, and makes changes if it’s allowed to.
  3. It answers where you asked, with what it found or did, plus any commit or pull request.

Each conversation (a pull request, a Linear issue or a Discord conversation) handles one request at a time. A message sent while the agent is busy waits its turn. Follow-ups continue in the same sandbox while it’s kept, so the agent remembers what it did.

All agent runs appear in Activity next to reviews.

Fast mode

With Fast mode on (on Agent → General, admins only), Codebot first tries a request without starting a sandbox. It answers with the tools that don’t need the repository: Linear, pull requests and checks, its past runs, and the services you connected, such as Vercel and Sentry. Questions like what failed in the last deploy? come back in seconds. A mention on a pull request can also be answered from its diff.

It has no copy of the repository, so it can’t read or search files, run commands or change code. When a request needs that, it hands it to a sandbox with what it already found, and you get the usual answer, a little later.

It tries pull request mentions, Linear mentions and follow-ups, Discord, and routines. Issues assigned to Codebot in Linear always start a sandbox, since they ask for code changes, and so do runs on your own runners.

Fast-mode time counts as compute at 1.5×: a 6-second answer counts as 9 seconds. A sandbox usually takes 20 seconds or more for the same answer. When fast mode hands a request to a sandbox, its part counts at 1×. The usage page marks fast answers.