# InteractionSwarmSettings

An interaction's opt-in to sub-interactions: the interactions its participants may start, which participants may, and how far the work may spread. A participant can start one only when this is set, it is among `participants`, and its own agent allows it (`allowSwarm`). The root's limits bound the whole tree; a sub-interaction's own settings can only narrow them for what it starts.

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

## In a request

| Field | Type | Required | Description |
|---|---|---|---|
| `interactions` | `uuid[]` |  | The ids of the interactions that may be started, at most 50. No other interaction can be. |
| `participants` | `string[] \| null` |  | The participants (by name) that may start them. Null: every participant whose agent allows it. |
| `maxDepth` | `integer \| null` |  | Levels of sub-interactions below this one, at most 4. Null: 1. |
| `maxConcurrent` | `integer \| null` |  | Sub-interactions running at once, across the whole tree, at most 20. Null: 5. |
| `maxTotal` | `integer \| null` |  | Sub-interactions started over the tree's life, at most 100. Null: 20. |

```json
{
  "interactions": [
    "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f"
  ],
  "participants": [
    "..."
  ],
  "maxDepth": 0,
  "maxConcurrent": 0,
  "maxTotal": 0
}
```

## In a response

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

| Field | Type | Description |
|---|---|---|
| `interactions` | `uuid[]` | The ids of the interactions that may be started, at most 50. No other interaction can be. |
| `participants` | `string[] \| null` | The participants (by name) that may start them. Null: every participant whose agent allows it. |
| `maxDepth` | `integer \| null` | Levels of sub-interactions below this one, at most 4. Null: 1. |
| `maxConcurrent` | `integer \| null` | Sub-interactions running at once, across the whole tree, at most 20. Null: 5. |
| `maxTotal` | `integer \| null` | Sub-interactions started over the tree's life, at most 100. Null: 20. |

```json
{
  "interactions": [
    "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f"
  ],
  "participants": [
    "..."
  ],
  "maxDepth": 0,
  "maxConcurrent": 0,
  "maxTotal": 0
}
```

## 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)
