---
url: https://bishop.agentdeployment.co/reference/config.md
description: Every field in .bishop/config.json.
---

# Configuration

`.bishop/config.json` in Bishop's own directory holds everything except credentials, which is what lets you commit it. Setup writes it, and you can edit it by hand. A missing file is an empty config.

```json
{
  "permissions": {
    "default": "deny",
    "admins": ["slack:hayes.davis@example.com"]
  },
  "gmail": {
    "pollSeconds": 20
  },
  "agent": {
    "harness": "claude",
    "model": "claude-sonnet-5",
    "effort": "high"
  }
}
```

Every block is optional, but an interface runs only when its block is here. `"slack": {}` is enough to start Slack, and its [credentials](/reference/credentials) are then required. `"enabled": false` in a block stops that interface without removing its settings or credentials. Credentials with no block start nothing, and startup logs a warning naming the block to add. Setup writes the block for you.

Every key is checked at startup, so a typo fails with the path to it rather than being ignored. The exception is `agent.options`, which is passed to the harness unvalidated. Setup rewrites the file as formatted JSON, so key order and layout don't survive it.

## `permissions`

Who has which [permission level](/running/access). Levels set with `! permissions set` or `bishop permissions set` live in Bishop's database, not here.

| Key | What it does |
|---|---|
| `default` | The level of anyone with no level of their own and none from a group: `deny` (the default), `read`, `write`, or `admin`. |
| `admins` | Entries like `slack:you@example.com` that are admins whatever the database says. Bishop won't start with no admin anywhere while `default` is `deny`. See [Your first admin](/running/access#your-first-admin). |

An `allow` key under `slack`, `gmail` or `teams` is from before permission levels and stops startup. See [Upgrading](/deploying/upgrading#from-allow-lists-to-permission-levels).

## `slack`

| Key | What it does |
|---|---|
| `enabled` | `false` stops Slack from starting. Defaults to `true`. |
| `verbosity` | `low`, `medium`, or `high` (the default). Where every thread starts. See [verbosity](/interfaces/commands#verbosity). |
| `bots.startConversations` | `true` lets a bot start a conversation with the agent in a channel that has a person in it, never in a DM. Defaults to `false`. Turn it on when agents should hand work to each other. A bot can then start work no person asked for. See [Other agents](/interfaces/slack#other-agents). |
| `bots.maxTurns` | How many turns in a row bots can start in one thread before Bishop waits for a person. Defaults to 3, minimum 1. Raise it for long exchanges between agents. |
| `bots.replyPolicy` | How the agent treats a bot's messages after the first in a thread. `optional` (the default) lets it ignore any of them. `standard` treats them like a person's, so the agent may ignore one only in a busy thread where it wasn't @mentioned. A bot's message that brings the agent into a thread is always treated like a person's. See [Other agents](/interfaces/slack#other-agents). |
| `workspace` | Written by setup to record which workspace the app belongs to. Nothing reads it. |
| `app` | `id`, `name`, `displayName`, `description`, written by setup. Changing them afterwards doesn't change the app in Slack. |

## `gmail`

| Key | What it does |
|---|---|
| `enabled` | `false` stops Gmail from starting. Defaults to `true`. |
| `pollSeconds` | How often the inbox is checked. Defaults to 20. |
| `labelPrefix` | Names the labels Bishop puts on threads. Defaults to `Bishop`, giving `Bishop/Working`, `Bishop/Done`, `Bishop/Failed`, and `Bishop/Refused`. |
| `markRead` | Marks a message read once the agent has been given it. Off by default, since a person may also be reading the mailbox. |
| `internalDomains` | The domains whose addresses count as inside the organization, which decides whether the agent is told a thread is internal or external. Defaults to the mailbox's own domain, except on `gmail.com` and `googlemail.com`, where nobody is. |

## `teams`

| Key | What it does |
|---|---|
| `enabled` | `false` stops Teams from starting, so nothing binds its port. Defaults to `true`. |
| `verbosity` | `low`, `medium`, or `high` (the default). `low` also drops the line saying what a turn cost. |
| `port` | Where the messaging endpoint listens. Defaults to 3978. |
| `host` | What it binds to. Defaults to loopback, which is where a tunnel reaches it. |
| `tls` | `cert` and `key`, paths to PEM files, for Bishop to terminate TLS itself. Leave it out behind a tunnel or proxy. |
| `healthPath` | Where the listener answers an unauthenticated `GET` or `HEAD` with `200`, for a supervisor or load balancer. Defaults to `/healthz`. |
| `app` | `id`, `name`, `displayName`, `description`, written by setup. Every `teams` command finds the app by `id`. |

The messaging endpoint isn't in the file. The Teams app holds it, and `bishop teams setup` reads it back and reports it.

## `agent`

| Key | What it does |
|---|---|
| `harness` | `claude` (the default) or `codex`. See [Harness and Model](/running/harness). |
| `model` | Passed to the harness as written. |
| `effort` | Passed to the harness as written. |
| `worktrees` | `true` gives each thread its own git worktree. See [Worktree Mode](/running/worktrees). |
| `projectSettings` | `false` stops Bishop applying the agent's committed harness config in full (`.claude/settings.json`, or `.codex/config.toml` and its hooks) and installing its plugins. On by default. See [The agent's own settings](/running/harness#the-agent-s-own-settings). |
| `sandbox` | `true`, or `{ "profile": "<name>" }` to add a nono profile's grants. Off by default. See [Sandbox](/running/sandbox). |
| `options` | The harness's own options, unvalidated. See [Agent options](/running/harness#agent-options). |
| `harnesses` | A block per harness, each taking `model`, `effort`, and `options`. See [One config for both harnesses](/running/harness#one-config-for-both-harnesses). |
| `env` | Which of Bishop's environment the agent gets: `allow` and `deny` lists of names, where `*` matches any run of characters, and `set` values, where `$NAME` copies from Bishop's environment. Everything passes when `allow` is absent. Variables starting `BISHOP_` never pass. See [What each level runs with](/running/access#what-each-level-runs-with). |
| `permissionLevels` | A block each for `read`, `write` and `admin`, layered over `agent` for conversations at that level. Each takes `model`, `effort`, `options`, `env`, `sandbox.profile` and `harnesses`, but not the harness, worktree mode or turning the sandbox on or off. |
| `harnesses.claude.keepAlive` | How long a thread's Claude Code process keeps running between turns: `idleMinutes` (default 10, at most 10080, a week) and `max` agents kept at once per permission level (default 4), or `false` to start one per turn. See [Keep alive](/running/harness#keep-alive). |

`--harness`, `--model` and `--effort` override these for one run. `model` and `effort` layer, weakest first: `agent.model`, then the running harness's block, then the flag. A block's `options` replaces `agent.options` rather than merging with it, except that a block holding only `keepAlive` leaves `agent.options` alone. A level's block goes on top of all of that: its `model` and `effort` win over the harness block's but not over the flags, and its `options` merge into `agent.options` and its `harnesses.<harness>.options` into that harness's block. A level's own `options` are ignored, with a warning, when the running harness has a block. Lists replace, except `disallowedTools`, which adds up.

## `files`

| Key | What it does |
|---|---|
| `maxMb` | The largest attachment Bishop downloads. Defaults to 100. A file over it reaches the agent as its name and the reason it isn't there. See [Files](/running/files). |

## `apiKeys`

A block per API domain, keyed by the lowercase domain, giving the agent a key that belongs to the person it is working for. Needs `agent.sandbox` on. See [Per-Person API Keys](/running/api-keys).

| Key | What it does |
|---|---|
| `command` | The script and its arguments, run without a shell. The script's path is relative to Bishop's own directory, and `{principal.email}`, `{thread.id}` and `{interface}` are replaced in each argument. Startup fails if the script doesn't exist or isn't executable, or an argument uses any other placeholder. |
| `env` | The script's whole environment. `$NAME` copies `NAME` from Bishop's environment, `BISHOP_` variables included, and startup fails if it isn't set. `PATH` is `/usr/local/bin:/usr/bin:/bin` unless set here. |
| `needs` | The lowest permission level a conversation needs to get a key: `read`, `write` or `admin`. Defaults to `write`. |
| `timeoutSeconds` | How long the script may run. Defaults to 20, at most 50. |

## `gc`

| Key | What it does |
|---|---|
| `maxAgeDays` | How long everything a quiet thread left behind is kept past its last turn. Defaults to 30. There's no switch to turn collection off. See [Cleaning Up](/deploying/cleanup). |

## `decisions`

Decisions Bishop asks a fast decision model to make, and which model makes them. Today there is one, `reply`: in a busy Slack or Teams thread, a message that didn't mention the agent, in a thread where more than one other person is talking, only starts the agent when the model judges a reply is likely wanted. Every message from another bot goes through the same check, even one that mentions the agent. The others are kept and given to the agent the next time it runs in that thread. Without this block, every such message starts the agent.

Turning it on sends the recent messages of those threads to the provider you pick.

| Key | What it does |
|---|---|
| `model.provider` | `jev` (TypeSafe), `openai`, `gemini`, or `openrouter`. Required. Its API key goes in `.env`; see [Credentials](/reference/credentials). |
| `model.name` | The provider's model id, if not its default: `jev-latest`, `gpt-6-luna`, `gemini-decision-1`, or for OpenRouter `~typesafe/jev-latest`. With OpenRouter this is the model's OpenRouter id, like `google/gemini-decision-1`. |
| `model.timeoutMs` | How long a decision may take before the message goes to the agent anyway. Defaults to 500. |
| `reply.threshold` | How likely a reply has to be, from 0 to 1, for the agent to start. Defaults to 0.3. Raise it to skip more. |
| `reply.instructions` | What the agent is for, in a sentence, so the model can tell what it would be asked. Optional, and worth setting: it makes the gap between messages for the agent and messages that aren't wider. Only the decision model reads it, so describe the same job the agent's own instructions give it. If the two disagree, the agent is woken for messages it then leaves alone. |

```json
{
  "decisions": {
    "model": { "provider": "gemini" },
    "reply": { "instructions": "Answers questions about deploys and on-call." }
  }
}
```

Every decision is logged with the thread and the probability the model returned. A model that fails or is slow sends the message to the agent, and says so in the log.
