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

# Factories

# `synth_ai.research.factories`

`client.research.factories` — Factory domain (Tag under `factories.tag`).

## Classes

### `ResearchFactoriesTagSessionsMessagesAPI` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factories.py#L17" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Send steering messages to an active Factory Tag session.

**Methods:**

#### `send` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factories.py#L23" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
send(self, session_id: str, message: TagMessageRequest | Mapping[str, Any] | dict[str, Any] | str) -> TagSession
```

Post a message to a Tag session and return the updated session state.

**Args:**

* `session_id`: Tag session id from `sessions.create`.
* `message`: `TagMessageRequest`, mapping, or plain string body.
* `metadata`: Optional message metadata.
* `idempotency_key`: Optional idempotency key for safe retries.

**Returns:**

* Updated `TagSession` after the message is accepted.

### `ResearchFactoriesTagSessionsAPI` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factories.py#L50" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Create and inspect Factory Tag sessions.

**Methods:**

#### `messages` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factories.py#L58" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
messages(self) -> ResearchFactoriesTagSessionsMessagesAPI
```

Nested API for sending Tag session messages.

#### `create` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factories.py#L64" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
create(self, request: TagSessionCreateRequest | Mapping[str, Any] | dict[str, Any] | str) -> TagSession
```

Start a Factory Tag session for a one-off research task.

**Args:**

* `request`: `TagSessionCreateRequest`, mapping, or primary request
  string shown to the Tag worker.
* `definition_of_done`: Optional explicit DoD text.
* `scope_id`: Optional Tag scope override (defaults via `scopes`).
* `timebox_seconds`: Optional wall-clock cap for the session.
* `runbook_preset`: Optional runbook preset slug.
* `metadata`: Optional session metadata.

**Returns:**

* Created `TagSession` with ids needed for `messages.send`.

#### `get` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factories.py#L104" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
get(self, session_id: str) -> TagSession
```

Fetch the current Tag session state and terminal receipt fields.

### `ResearchFactoriesTagScopesAPI` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factories.py#L109" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Resolve default Tag scopes for an organization.

**Methods:**

#### `get_default` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factories.py#L115" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
get_default(self) -> TagScope
```

Return the org default Tag scope used when `scope_id` is omitted.

### `ResearchFactoriesTagAPI` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factories.py#L120" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Factory Tag namespace — delegate short research tasks from your IDE.

**Methods:**

#### `sessions` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factories.py#L129" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
sessions(self) -> ResearchFactoriesTagSessionsAPI
```

Create Tag sessions and send steering messages.

#### `scopes` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factories.py#L136" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
scopes(self) -> ResearchFactoriesTagScopesAPI
```

Read Tag scope defaults for the org.

### `ResearchFactoriesAPI` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factories.py#L143" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Factory domain namespace (Tag ships under `factories.tag`).

**Methods:**

#### `tag` <sup><a href="https://github.com/synth-laboratories/synth-ai/blob/main/synth_ai/research/factories.py#L151" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
tag(self) -> ResearchFactoriesTagAPI
```

Factory Tag — short-lived delegated research sessions.
