# The assistant

> The Assistant tab answers questions about one job and drafts scripts and input changes for you to copy. It is off until you give it an Anthropic API key.

Source: https://hiveboard.dev/docs/job/assistant · Section: One job, opened · HiveBoard 0.1.7 · Updated 2026-10-19

## In short

- The Assistant tab appears only when an Anthropic API key is set and the assistant is switched on; Settings says why it is off.
- It answers from the open job's details, and drafts submission scripts and input changes for you to review and copy.
- It never runs, submits or changes anything on a cluster — it has no way to.
- Only when you press Send, your question and the job's details go to Anthropic, with your key.

The assistant is an optional chat about the job that is open. It sees the job's details as
HiveBoard has read them, answers questions about them, and drafts submission scripts and input
changes for you to review and copy. It never runs or submits anything itself.

It is off until you give HiveBoard an Anthropic API key. Without one, the job pane has no
**Assistant** tab at all.

## Turning it on

1. Get an API key from Anthropic.
2. Put it in the environment variable `ANTHROPIC_API_KEY`. On Windows:

   ```
   setx ANTHROPIC_API_KEY sk-ant-...
   ```

   On Linux or macOS, in the shell you start HiveBoard from:

   ```
   export ANTHROPIC_API_KEY=sk-ant-...
   ```

3. Quit HiveBoard and start it again. On Windows, right-click the tray icon and choose **Quit
   HiveBoard**; closing the window leaves it running.
4. Open **Settings**. The **Assistant** card says **On** and "Every job you open has an
   Assistant tab."

The assistant also has to be switched on in `config.yaml`, in the data folder. The file
HiveBoard writes on its first start already has it on:

```yaml
ai:
  enabled: true
  api_key_env: ANTHROPIC_API_KEY
  model: claude-opus-4-8
  max_tokens: 2048
```

`api_key_env` names the variable the key is read from, `model` the model that answers, and
`max_tokens` how long an answer may be. A config with no `ai:` section, or with
`enabled: false`, keeps the assistant off. See [the config file](/docs/settings/config-file).

While the assistant is off, the **Assistant** card in Settings says **Off** and why, for
example: "No API key found. Set the ANTHROPIC_API_KEY environment variable and restart
HiveBoard to enable the assistant."

> [!BUILD]
> The Python build also needs Anthropic's Python package: `pip install anthropic`. Without it,
> Settings says the package is not installed.

## Asking

Type into the box and press **Send**, or <kbd>Enter</kbd>; <kbd>Shift</kbd>+<kbd>Enter</kbd>
starts a new line. Good questions are about this job: what its numbers mean, why it stopped,
what to change for the next run. For example:

- Why is this relaxation converging slowly?
- Draft an INCAR for a follow-up relaxation with a higher cutoff.
- Write a Slurm script that runs the same job on 72 cores.

The conversation belongs to the job that is open. Opening another job starts a new one, and
nothing of it is saved.

## What it can and cannot do

- It answers from the job's details. When something is not in them, it is told to say so
  rather than guess.
- It drafts scripts and input changes as blocks of text to copy.
- It cannot run commands, submit jobs or change any file on any cluster. HiveBoard gives it no
  way to, and it is told never to claim that it did.

Read a draft before you use it, as you would any script someone hands you.

## What is sent, and to whom

Nothing is sent when you open the tab. When you press **Send**, HiveBoard's own server on your
computer sends a request to Anthropic's API (`api.anthropic.com`), with your key. It holds:

- your question, and up to the last 20 messages of this conversation;
- the job's details: the scheduler's record of the job, as the Setup tab shows it (its name,
  state, times, partition, nodes, user, working directory, output file and the rest of the raw
  record), and what HiveBoard read from its folder for the Overview and Setup tabs — the status
  sentence, progress, estimate, figures, chart values, warnings and the settings read from its
  input — cut to 12,000 characters.

It does not send the job's files, its output or its structure. The assistant is one of only two
things that send anything anywhere but your clusters; see
[What leaves your computer](/docs/safety/what-leaves-your-computer).

If a question cannot be answered, the reply says so: "The assistant could not answer:" and the
reason.

## Check yourself

1. What can the assistant do on your cluster?
   - Nothing; it only drafts text for you to copy ← the answer
   - Submit the scripts it drafts, after asking
   - Edit INCAR in the job's folder
   - Cancel a job that is stuck
   Why: The assistant has no way to run or change anything; everything it gives is a draft for you to apply yourself.

2. When is anything sent to Anthropic?
   - Only when you press Send ← the answer
   - When you open the Assistant tab
   - Every 15 seconds while a job is open
   - When HiveBoard starts
   Why: Your question and the job's details go out when you press Send, and at no other time.

## Try it in the app

- Open Settings and read what the Assistant card says.
- If the assistant is on, open one of your jobs and ask what its last energy means.

## Related

- [What leaves your computer](https://hiveboard.dev/docs/safety/what-leaves-your-computer.md)
- [The Settings page](https://hiveboard.dev/docs/settings/settings-page.md)
- [The config.yaml file](https://hiveboard.dev/docs/settings/config-file.md)
- [The job pane](https://hiveboard.dev/docs/job/job-pane.md)
