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

# Space settings

> Show and change a space's chat, reason and extraction settings from the anona CLI.

pip 0.25.0; npm 0.19.0

Three groups of per-space settings, each with the same three verbs:

| Command | Settings for |
| - | - |
| `chat-settings` | the [drop-in LLM proxy](https://docs.anonalabs.com/api-reference/chat.md#space-defaults): how many memories it injects, and whether it records each turn |
| `reason-settings` | [`reason`](https://docs.anonalabs.com/api-reference/reason#a-default-for-the-space): which model answers and how deep it reads |
| `extraction-settings` | [extraction](https://docs.anonalabs.com/api-reference/extraction-settings.md): how text written to the space becomes memories |

```bash theme={null}
anona chat-settings get --space notes
anona chat-settings set --memory-limit 5 --space notes
anona chat-settings reset --yes --space notes

anona reason-settings get --space notes
anona reason-settings set --depth thorough --space notes
anona reason-settings reset --yes --space notes

anona extraction-settings get --space notes
anona extraction-settings set --mode verbose --space notes
anona extraction-settings reset --yes --space notes
```

Every command addresses one space: `--space`, or `ANONA_SPACE_ID`. In every
`get`, a `null` field means "not set here: the platform default applies".

## How `set` works

`set` changes the fields you name **and keeps the rest**. The API's `PUT` is a
full replace, so sending only the changed field would clear every other one;
`set` reads the stored settings, applies your changes, and writes the whole
record back. Two consequences:

* `--clear FIELD` unsets one field so it follows the platform default again.
  It is repeatable. Setting and clearing the same field in one command exits
  `2`.
* `set` with no field named exits `2` and sends nothing.

Because it is a read followed by a write, two `set` commands racing on the same
space can each overwrite the other's change. Run them one after the other.

`reset --yes` clears every override in the group. Without `--yes` it exits `2`
and sends nothing.

**`--json`:** `get` and `set` print the stored settings (after the write, for
`set`). `reset` prints `{"reset": true, "space_id", "settings"}`, written by the
CLI, since the API answers with no body.

## chat-settings

| Flag | Field | |
| - | - | - |
| `--memory-limit N` | `memory_limit` | Memories injected per turn, 1-20 |
| `--memory-token-budget N` | `memory_token_budget` | Token cap on the injected block, 1-100000 |
| `--auto-record` / `--no-auto-record` | `auto_record` | Record each proxied turn |
| `--memory` / `--no-memory` | `memory` | Inject memories into proxied calls |
| `--chat-model ID` | `chat_model` | The LLM proxied calls use (see [`llm-models`](https://docs.anonalabs.com/cli/models#llm-models)) |
| `--clear FIELD` | | Any of the five field names |

```bash theme={null}
anona chat-settings set --memory-limit 5 --no-auto-record --space support
anona chat-settings set --clear chat_model --space support
```

**`--json`:** `{"space_id", "memory_limit", "memory_token_budget", "auto_record", "memory", "chat_model"}`.

## reason-settings

| Flag | Field | |
| - | - | - |
| `--model ID` | `model` | A model id or tier name from [`llm-models`](https://docs.anonalabs.com/cli/models#llm-models) |
| `--depth MODE` | `depth` | `fast` or `thorough`: the default for [`reason --depth`](https://docs.anonalabs.com/cli/memory#reason) |
| `--clear FIELD` | | `model` or `depth` |

```bash theme={null}
anona reason-settings set --depth thorough --space notes
anona reason-settings set --clear model --space notes
```

A `--depth` on the `reason` command itself still wins over the space's
setting.

**`--json`:** `{"space_id", "model", "depth"}`.

## extraction-settings

| Flag | Field | |
| - | - | - |
| `--mode MODE` | `mode` | `concise`, `verbose`, `verbatim` or `custom`: how much of the text becomes memories |
| `--guidance TEXT` | `guidance` | Added to the extraction rules. `@FILE` reads it from a file |
| `--custom-prompt TEXT` | `custom_prompt` | Replaces the rules; needs `--mode custom`. `@FILE` reads it |
| `--labels-file PATH` | `labels` | A JSON array of [label groups](https://docs.anonalabs.com/api-reference/extraction-settings.md#label-taxonomy) to classify memories by |
| `--free-form-entities` / `--no-free-form-entities` | `free_form_entities` | Keep entities outside the label groups. `--no-...` needs labels |
| `--clear FIELD` | | Any of the five field names |

```bash theme={null}
anona extraction-settings set --mode verbose --space research
anona extraction-settings set --guidance @guidance.md --space research
anona extraction-settings set --labels-file labels.json --no-free-form-entities --space research
```

`labels.json` is a JSON array of groups. Each entry in `values` is an object
with `value` (and an optional `description`), not a plain string:

```json labels.json theme={null}
[{"key": "team", "description": "Which team owns it", "type": "value",
  "values": [{"value": "billing", "description": "Billing team"}]}]
```

`type` is `value` (one of the listed values), `multi-values` (any number of
them), `text` (one free-form value) or `multi-text` (any number of free-form
values). The two enumerated types need `values`; the free-form ones take none.
`key` is lowercase letters, digits, `-` or `_`, with no colon or spaces, and
not `anona`. Add `"tag": true` to stamp `key:value` onto each memory as a tag,
so retrieve can filter on it.

A `--labels-file` that cannot be read or is not a JSON array exits `2`. The
server checks the rest (a label group's shape, a reserved key) and answers
`validation_error` (exit `1`). Settings change what future writes extract;
memories already stored are not re-extracted. See
[Verifying a change](https://docs.anonalabs.com/api-reference/extraction-settings.md#verifying-a-change).

**`--json`:** `{"space_id", "mode", "guidance", "custom_prompt", "labels", "free_form_entities"}`.

## Permissions

On a space shared with you, changing settings is owner only: a member gets
`space_owner_only` (exit `4`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.