# LoomConfiguration

Long-term memory for an interaction's agents (`loom = { ... }` in its definition file): whose loom each agent wakes up with, and how memories are recalled and made. Fields left null take their defaults; the fields whose names start with `effective` give the values in use.

**Kind:** an object, used in requests and responses. In a request it is called `LoomConfigurationInput`.

## In a request

| Field | Type | Required | Description |
|---|---|---|---|
| `enabled` | `boolean` |  | Whether memory is on. False keeps the settings but leaves memory off. |
| `scope` | [`LoomScope`](https://docs.maitento.com/reference/types/loom-scope.md)`\| null` |  | Whose loom an agent wakes up with, and so whether it remembers beyond one run. Null: `Process`. |
| `scopeInput` | `string \| null` |  | For the `Input` scope: the run input whose value picks the loom, such as `"userName"`. |
| `shared` | `boolean \| null` |  | True: all the interaction's agents share one loom. Null or false: each agent has its own. |
| `recall` | [`LoomRecallMode`](https://docs.maitento.com/reference/types/loom-recall-mode.md)`\| null` |  | How remembered threads come back into a conversation. Null: `Suggest`. |
| `weave` | [`LoomWeaveMode`](https://docs.maitento.com/reference/types/loom-weave-mode.md)`\| null` |  | How new threads are made from a conversation. Null: `Suggest`. |
| `tapestryTokens` | `integer \| null` |  | How long the "what you know" summary (the tapestry) an agent is given at the start of a conversation may be, in tokens, from 200 to 20,000. Null: 1,500. |
| `subjectInputs` | `string[] \| null` |  | Run inputs that name who the agents are working with, such as `"userName"`, so memories are about the right person (as well as the people who send messages). |
| `nightWeaving` | `boolean \| null` |  | Whether looms this interaction creates are tidied up by night weaving once a conversation goes quiet. |
| `quietMinutes` | `integer \| null` |  | For looms this interaction creates: minutes without activity before night weaving starts. |
| `weaverModel` | `string \| null` |  | The catalogue model that reads conversations to make memories and to night-weave. Null: the agent's own model. |
| `vetModel` | `string \| null` |  | A lightweight catalogue model that checks what the loom is about to offer an agent mid-conversation and drops what clearly does not belong, before the agent sees it. It can only take things away; if it fails or is slow, everything is offered as usual. A run can override it per agent. Null: nothing is checked. |
| `vetRecall` | `boolean \| null` |  | True: the `vetModel` also checks what an agent's own searches of its memory bring back. Null or false: a search the agent chose is its own to judge. |
| `seedFromLoomId` | `uuid \| null` |  | The id of a loom every loom this interaction creates starts from: a new person's loom starts knowing what that loom knows (its shared facts, how-tos and relationships, each marked as inherited). |
| `readFromLoomIds` | `uuid[] \| null` |  | The ids of looms every agent of this interaction may read but never change: recall and suggestions reach into them, each thread labelled with where it lives. |

```json
{
  "enabled": false,
  "scope": "Process",
  "scopeInput": "...",
  "shared": false,
  "recall": "Off",
  "weave": "Manual",
  "tapestryTokens": 0,
  "subjectInputs": [
    "..."
  ],
  "nightWeaving": false,
  "quietMinutes": 0,
  "weaverModel": "...",
  "vetModel": "...",
  "vetRecall": false,
  "seedFromLoomId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "readFromLoomIds": [
    "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f"
  ]
}
```

## In a response

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `enabled` | `boolean` | Whether memory is on. False keeps the settings but leaves memory off. |
| `scope` | [`LoomScope`](https://docs.maitento.com/reference/types/loom-scope.md)`\| null` | Whose loom an agent wakes up with, and so whether it remembers beyond one run. Null: `Process`. |
| `scopeInput` | `string \| null` | For the `Input` scope: the run input whose value picks the loom, such as `"userName"`. |
| `shared` | `boolean \| null` | True: all the interaction's agents share one loom. Null or false: each agent has its own. |
| `recall` | [`LoomRecallMode`](https://docs.maitento.com/reference/types/loom-recall-mode.md)`\| null` | How remembered threads come back into a conversation. Null: `Suggest`. |
| `weave` | [`LoomWeaveMode`](https://docs.maitento.com/reference/types/loom-weave-mode.md)`\| null` | How new threads are made from a conversation. Null: `Suggest`. |
| `tapestryTokens` | `integer \| null` | How long the "what you know" summary (the tapestry) an agent is given at the start of a conversation may be, in tokens, from 200 to 20,000. Null: 1,500. |
| `subjectInputs` | `string[] \| null` | Run inputs that name who the agents are working with, such as `"userName"`, so memories are about the right person (as well as the people who send messages). |
| `nightWeaving` | `boolean \| null` | Whether looms this interaction creates are tidied up by night weaving once a conversation goes quiet. |
| `quietMinutes` | `integer \| null` | For looms this interaction creates: minutes without activity before night weaving starts. |
| `weaverModel` | `string \| null` | The catalogue model that reads conversations to make memories and to night-weave. Null: the agent's own model. |
| `vetModel` | `string \| null` | A lightweight catalogue model that checks what the loom is about to offer an agent mid-conversation and drops what clearly does not belong, before the agent sees it. It can only take things away; if it fails or is slow, everything is offered as usual. A run can override it per agent. Null: nothing is checked. |
| `vetRecall` | `boolean \| null` | True: the `vetModel` also checks what an agent's own searches of its memory bring back. Null or false: a search the agent chose is its own to judge. |
| `seedFromLoomId` | `uuid \| null` | The id of a loom every loom this interaction creates starts from: a new person's loom starts knowing what that loom knows (its shared facts, how-tos and relationships, each marked as inherited). |
| `readFromLoomIds` | `uuid[] \| null` | The ids of looms every agent of this interaction may read but never change: recall and suggestions reach into them, each thread labelled with where it lives. |
| `effectiveScope` | [`LoomScope`](https://docs.maitento.com/reference/types/loom-scope.md) | The scope in use: `scope`, or `Process` when that is null. Set by Maitento. |
| `effectiveShared` | `boolean` | Whether the agents share one loom: `shared`, or false when that is null. Set by Maitento. |
| `effectiveRecall` | [`LoomRecallMode`](https://docs.maitento.com/reference/types/loom-recall-mode.md) | The recall mode in use: `recall`, or `Suggest` when that is null. Set by Maitento. |
| `effectiveWeave` | [`LoomWeaveMode`](https://docs.maitento.com/reference/types/loom-weave-mode.md) | The weave mode in use: `weave`, or `Suggest` when that is null. Set by Maitento. |
| `effectiveTapestryTokens` | `integer` | The tapestry length in use, in tokens: `tapestryTokens` (or 1,500), kept between 200 and 20,000. Set by Maitento. |
| `effectiveSubjectInputs` | `string[]` | The subject inputs in use: `subjectInputs`, or none when that is null. Set by Maitento. |
| `effectiveReadFromLoomIds` | `uuid[]` | The read-only looms in use: `readFromLoomIds`, or none when that is null. Set by Maitento. |
| `vets` | `boolean` | Whether a `vetModel` is set, so what the loom offers is checked. Set by Maitento. |
| `effectiveVetRecall` | `boolean` | Whether the agents' own searches are checked too: `vetRecall`, and only when there is a `vetModel`. Set by Maitento. |

```json
{
  "enabled": false,
  "scope": "Process",
  "scopeInput": "...",
  "shared": false,
  "recall": "Off",
  "weave": "Manual",
  "tapestryTokens": 0,
  "subjectInputs": [
    "..."
  ],
  "nightWeaving": false,
  "quietMinutes": 0,
  "weaverModel": "...",
  "vetModel": "...",
  "vetRecall": false,
  "seedFromLoomId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "readFromLoomIds": [
    "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f"
  ],
  "effectiveScope": "Process",
  "effectiveShared": false,
  "effectiveRecall": "Off",
  "effectiveWeave": "Manual",
  "effectiveTapestryTokens": 0,
  "effectiveSubjectInputs": [
    "..."
  ],
  "effectiveReadFromLoomIds": [
    "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f"
  ],
  "vets": false,
  "effectiveVetRecall": false
}
```

## Where it's used

- Inside [`ManagedInteractionCreateRequest`](https://docs.maitento.com/reference/types/managed-interaction-create-request.md)
- Inside [`ManagedInteractionUpdateRequest`](https://docs.maitento.com/reference/types/managed-interaction-update-request.md)
- Inside [`ManagedInteractionVersion`](https://docs.maitento.com/reference/types/managed-interaction-version.md)
- Inside [`OneShotInteractionCreateRequest`](https://docs.maitento.com/reference/types/one-shot-interaction-create-request.md)
- Inside [`OneShotInteractionUpdateRequest`](https://docs.maitento.com/reference/types/one-shot-interaction-update-request.md)
- Inside [`OneShotInteractionVersion`](https://docs.maitento.com/reference/types/one-shot-interaction-version.md)
- Inside [`RoundRobinInteractionCreateRequest`](https://docs.maitento.com/reference/types/round-robin-interaction-create-request.md)
- Inside [`RoundRobinInteractionUpdateRequest`](https://docs.maitento.com/reference/types/round-robin-interaction-update-request.md)
- Inside [`RoundRobinInteractionVersion`](https://docs.maitento.com/reference/types/round-robin-interaction-version.md)
