> ## Documentation Index
> Fetch the complete documentation index at: https://docs.seriora.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Settings and environment variables

> Every setting, the command that changes it in a session, and the variable that overrides it.

Almost every setting has two names for one thing. There is a slash command you use in a session,
and there is a variable name. They are the same setting because **`config.json` is keyed on the
variable names themselves**, so `/trajectory off` and `export SERI_TRAJECTORY_ENABLED=false`
write and read the same key.

Use the command. The variable is for scripting a machine you are not sitting at.

## Which wins

The environment, then `~/.seri/config.json`, then the built-in default. A variable set to the
empty string counts as unset and falls through to `config.json` rather than winning as a
valid-looking blank.

<Warning>
  **A variable exported in your shell beats the slash command, including afterwards.** Setting
  `SERI_TRAJECTORY_ENABLED` and then running `/trajectory on` writes `config.json` and changes
  nothing the next time you start, because the variable still wins. seri says so when you do it
  rather than letting the setting look changed when it is not. If a command appears to do nothing,
  check your environment first.
</Warning>

Every `true`/`false` setting is **on unless the value is exactly `false`.** A typo cannot silently
disable a feature.

## Provider credentials

| Setting           | In a session        | Variable                                                  |
| ----------------- | ------------------- | --------------------------------------------------------- |
| Groq key          | `/setup`            | `GROQ_API_KEY`                                            |
| OpenRouter key    | `/setup`            | `OPENROUTER_API_KEY`                                      |
| Anthropic key     | `/setup`            | `ANTHROPIC_API_KEY`                                       |
| OpenAI key        | `/setup`            | `OPENAI_API_KEY`                                          |
| Google key        | `/setup`            | `GOOGLE_GENERATIVE_AI_API_KEY`                            |
| xAI key           | `/setup`            | `XAI_API_KEY`                                             |
| Grok subscription | `/setup`            | none. It is a browser sign-in, stored in `xai-auth.json`. |
| Hosted account    | `/login`, `/signup` | none. Stored in `auth.json`.                              |

## Model

| Setting          | In a session         | Variable                                                                             |
| ---------------- | -------------------- | ------------------------------------------------------------------------------------ |
| Provider         | `/model`             | `SERI_PROVIDER`, one of `groq`, `openrouter`, `anthropic`, `openai`, `google`, `xai` |
| Model            | `/model`             | `SERI_MODEL`, that provider's own id. For OpenRouter, the OpenRouter slug.           |
| Reasoning effort | `/effort`, `/config` | `SERI_REASONING_EFFORT`, such as `low`, `medium` or `high`                           |

A `/model` pick persists both keys once a turn has actually succeeded on it, so setting them by
hand is the scripted equivalent of picking one.

## Subagent roles

| Setting           | In a session            | Variable                    |
| ----------------- | ----------------------- | --------------------------- |
| A role's model    | name it in the dispatch | `SERI_ROLE_<ROLE>_MODEL`    |
| A role's provider | name it in the dispatch | `SERI_ROLE_<ROLE>_PROVIDER` |

`<ROLE>` is the uppercased role name: `SERI_ROLE_ORACLE_MODEL`, `SERI_ROLE_CODE_PROVIDER`. These
supply a default for when a dispatch does not name a pair, which is how a script, and the
archivist, get a model of their own.

**Set both or neither.** They are one pin, not two settings. `_MODEL` on its own is inert, and a
`_PROVIDER` that is not one of the six provider ids drops the pin rather than half-applying it.
The role then falls back to the session model.

## Checking code after a write

| Setting            | In a session | Variable                                                             |
| ------------------ | ------------ | -------------------------------------------------------------------- |
| The check command  | `/config`    | `SERI_VERIFY_COMMAND`. Unset means nothing is spawned.               |
| Checking on or off | `/config`    | `SERI_VERIFY_ENABLED`, `false` to suspend without losing the command |

Both take effect on the next run rather than mid-session.

## Memory

| Setting           | In a session                | Variable                                                            |
| ----------------- | --------------------------- | ------------------------------------------------------------------- |
| The learning pass | `/memory archivist on\|off` | `SERI_ARCHIVIST_ENABLED`                                            |
| The approval gate | `/memory approval on\|off`  | `SERI_MEMORY_APPROVAL`, `false` applies writes without staging them |

## Trajectories

| Setting          | In a session          | Variable                                         |
| ---------------- | --------------------- | ------------------------------------------------ |
| Recording        | `/trajectory on\|off` | `SERI_TRAJECTORY_ENABLED`                        |
| Legacy retention | none                  | `SERI_TRAJECTORY_RETENTION_DAYS`, defaults to 30 |

A retention value that is not a positive whole number falls back to 30 rather than failing.

Retention applies only to `.jsonl` recordings left by an older release. Recordings now go into
`seri.db`, and rows there are not aged out.

## Profile

| Setting       | At launch          | Variable       |
| ------------- | ------------------ | -------------- |
| Which profile | `--profile <name>` | `SERI_PROFILE` |

The flag wins over the variable. `/profile new <name>` creates a profile from inside a session
but does not switch the running one.

## Settings with no variable

`/mode` and `/max-turns` last for the session and are never written to `config.json`.
`--dangerously-skip-permissions` and `--max-turns` are launch flags with no variable either. See
[Launching seri](/reference/cli).

## What this page leaves out

seri reads a handful of other `SERI_*` variables that point it at a different gateway, identity
service or model-catalog endpoint, or that skip a check during testing. They are deployment and
test escape hatches rather than settings, they have no stable contract, and setting one by
accident is a worse outcome than not knowing it exists.
