---
sidebar:
  hidden: true
title: roboto.ai.core.record
---
## Module Contents

- [AGENT_CONTENT_MODEL_BY_TYPE](/docs/reference/python-sdk/roboto/ai/core/content#roboto.ai.core.content.AGENT_CONTENT_MODEL_BY_TYPE) (data): `AGENT_CONTENT_MODEL_BY_TYPE: dict[AgentContentType, type[AgentContent]]`. Model of each kind of content block other than text, keyed by its `content_type`.

- [AgentClientContextEntry](/docs/reference/python-sdk/roboto/ai/core/content#roboto.ai.core.content.AgentClientContextEntry) (class): What the caller had open when they sent a message, carried as a block on that message.

- [AgentCompressionFillerContent](/docs/reference/python-sdk/roboto/ai/core/content#roboto.ai.core.content.AgentCompressionFillerContent) (class): Stand-in for the content of a message Roboto emptied in the copy of a thread it sends to the AI model.

- [AgentContent](/docs/reference/python-sdk/roboto/ai/core/content#roboto.ai.core.content.AgentContent) (type alias): `type AgentContent = AgentTextContent | AgentToolUseContent | AgentToolResultContent | AgentErrorContent | AgentDeletedContent | AgentCompressionFillerContent | AgentClientContextEntry`. Content block of any kind: one of the content block models.

- [AgentContentType](/docs/reference/python-sdk/roboto/ai/core/content#roboto.ai.core.content.AgentContentType) (class): Kind of a content block in a message.

- [AgentDeletedContent](/docs/reference/python-sdk/roboto/ai/core/content#roboto.ai.core.content.AgentDeletedContent) (class): Placeholder for a content block Roboto removed from the shortened copy of a thread it sends to the AI model.

- [AgentErrorContent](/docs/reference/python-sdk/roboto/ai/core/content#roboto.ai.core.content.AgentErrorContent) (class): Error block of a message: why Roboto's AI failed to generate the message, or that it was cancelled.

- [AgentGoalStatus](/docs/reference/python-sdk/roboto/ai/goals/types#roboto.ai.goals.types.AgentGoalStatus) (class): Status of a goal: whether Roboto's AI has achieved it.

- [AgentSubtask](/docs/reference/python-sdk/roboto/ai/core/task#roboto.ai.core.task.AgentSubtask) (class): Sub-task of a task: one step of its work, tracked as a checklist item.

- [AgentSubtaskStatus](/docs/reference/python-sdk/roboto/ai/core/task#roboto.ai.core.task.AgentSubtaskStatus) (class): Status of a sub-task: whether Roboto's AI has done it.

- [AgentTask](/docs/reference/python-sdk/roboto/ai/core/task#roboto.ai.core.task.AgentTask) (class): Task in a thread's task list: a unit of work Roboto's AI plans, such as a question to answer or a deliverable.

- [AgentTaskBoundary](/docs/reference/python-sdk/roboto/ai/core/task#roboto.ai.core.task.AgentTaskBoundary) (class): Position in a thread of the tool use with which Roboto's AI started or completed a task.

- [AgentTaskMinimal](/docs/reference/python-sdk/roboto/ai/core/task#roboto.ai.core.task.AgentTaskMinimal) (class): ID and resulting status of a task that one of Roboto's AI task tools changed.

- [AgentTaskStatus](/docs/reference/python-sdk/roboto/ai/core/task#roboto.ai.core.task.AgentTaskStatus) (class): Status of a task in a thread's task list: whether Roboto's AI has started or completed it.

- [AgentTextContent](/docs/reference/python-sdk/roboto/ai/core/content#roboto.ai.core.content.AgentTextContent) (class): Text block of a message, from the caller or from Roboto's AI.

- [AgentToolResultContent](/docs/reference/python-sdk/roboto/ai/core/content#roboto.ai.core.content.AgentToolResultContent) (class): Tool result block of a message: what a tool returned when it ran for a tool use.

- [AgentToolUseContent](/docs/reference/python-sdk/roboto/ai/core/content#roboto.ai.core.content.AgentToolUseContent) (class): Tool use block of a message: a request from Roboto's AI to run a tool.

### AgentMessage

```python
class roboto.ai.core.record.AgentMessage(/, **data: Any)
```

`from roboto.ai.agent_thread import AgentMessage`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L221-L274)

Bases: `pydantic.BaseModel`

Message in a thread from one sender, made of content blocks such as text, tool uses, and tool results.

Carried in `AgentThreadRecord.messages`.

**Parameters**

- **data** (`Any`)

**Attributes**

- **AgentMessage.content** (`list[roboto.ai.core.content.AgentContent]`): Content blocks of the message, in order.

- **AgentMessage.created** (`datetime.datetime`) = `None`: Time the message was created.

- **AgentMessage.created_by** (`str | None`) = `None`: ID of the user who sent the message.

  Roboto sets it on user messages a person sent, so a thread shared with an organization shows which member asked what. `None` on assistant and Roboto messages, on messages an agent launch, trigger, or Slack mention wrote, and on messages sent before Roboto stored it. A fork keeps the authors of the messages it copied. Roboto ignores this field on messages a caller sends, and records the caller instead.

- **AgentMessage.role** (`AgentRole`): Role of the message's sender.

- **AgentMessage.status** (`AgentMessageStatus`): Status of the message's generation.

#### AgentMessage.is_complete()

```python
def is_complete() -> bool
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L262-L264)

Return whether generation of the message is complete.

**Returns**

- `bool`

#### AgentMessage.is_unsuccessful()

```python
def is_unsuccessful() -> bool
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L266-L274)

Return whether generation of the message failed or was cancelled.

Always `False` for a message with role `USER`.

**Returns**

- `bool`

#### AgentMessage.text()

```python
@classmethod
def text(text: str, role: AgentRole = AgentRole.USER) -> AgentMessage
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L249-L256)

Build a message holding only `text`.

**Parameters**

- **text** (`str`): Text of the message.
- **role** (`AgentRole`): Role of the message's sender. Defaults to `USER`.

**Returns**

- `AgentMessage`

### AgentMessageStatus

```python
class roboto.ai.core.record.AgentMessageStatus
```

`from roboto.ai.agent_thread import AgentMessageStatus`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L130-L154)

Bases: `roboto.compat.StrEnum`

Status of a message's generation.

**Attributes**

- **AgentMessageStatus.CANCELLED** = `'cancelled'`: Generation was cancelled before it finished.
- **AgentMessageStatus.COMPLETED** = `'completed'`: Generation finished, and the message's content is complete.
- **AgentMessageStatus.FAILED** = `'failed'`: Generation failed with an error.
- **AgentMessageStatus.GENERATING** = `'generating'`: Generation is in progress.
- **AgentMessageStatus.NOT_STARTED** = `'not_started'`: Generation has not begun.

#### AgentMessageStatus.is_terminal()

```python
def is_terminal() -> bool
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L148-L154)

Return whether generation has ended: `COMPLETED`, `FAILED`, or `CANCELLED`.

**Returns**

- `bool`

### AgentRole

```python
class roboto.ai.core.record.AgentRole
```

`from roboto.ai.agent_thread import AgentRole`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L117-L127)

Bases: `roboto.compat.StrEnum`

Role of a message's sender in a thread.

**Attributes**

- **AgentRole.ASSISTANT** = `'assistant'`: Roboto's AI, responding to the caller.
- **AgentRole.ROBOTO** = `'roboto'`: Roboto itself, sending tool results and system information.
- **AgentRole.USER** = `'user'`: Caller, a person or program, sending messages to Roboto's AI.

### AgentThreadDelta

```python
class roboto.ai.core.record.AgentThreadDelta(/, **data: Any)
```

`from roboto.ai.agent_thread import AgentThreadDelta`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L477-L553)

Bases: `pydantic.BaseModel`

Response body of `GET /v1/ai/threads/{thread_id}/delta`: a thread's changes since a continuation token.

Read by [`refresh()`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread.refresh) and [`events()`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread.events), which merge it into the thread they hold.

**Parameters**

- **data** (`Any`)

**Attributes**

- **AgentThreadDelta.activity** (`str | None`) = `None`: The thread's `AgentThreadRecord.activity` as of this delta.

  Unlike `status`, `title`, `goals` and `tasks`, `None` does not mean unchanged: every delta carries the thread's current activity, so `None` means there is none. A client replaces the activity it holds with this value on every delta.

- **AgentThreadDelta.continuation_token** (`str`): Token to pass as `next_token` on the next request for a delta.

- **AgentThreadDelta.goals** (`list[AgentThreadGoalRecord] | None`) = `None`: Every goal declared in the thread, in the order they were declared.

  `None` if none has changed since the previous delta. A list, even an empty one, replaces the goals the client holds.

- **AgentThreadDelta.has_more** (`bool`) = `False`: Whether the thread has changes after the ones this delta carries, for the client to fetch at once.

  `True` in two cases. For a request sent with `paged=true`, Roboto ends a delta early to keep the response small. A delta that sets `reset_from_message_sequence_num` carries none of the messages from that index on, whether or not the request was sent with `paged=true`.

  When it is `True`, the client requests the next delta with `continuation_token` without waiting, and repeats until a delta reports `False`; only then does it hold every message the thread had. `status` describes the whole thread, so a delta that reports `True` can say the turn is over before the client holds the turn's last message. A delta that Roboto ended early carries `goals` and `tasks` as `None`, changed or not; a later delta carries them.

- **AgentThreadDelta.messages_by_idx** (`dict[int, AgentMessage]`): Messages that are new or changed since the token, keyed by index in the thread's `messages`.

  At an index the client already holds, the message carries only the content blocks the client has not seen; the client appends them to the message it holds and takes the new `status`.

- **AgentThreadDelta.reset_from_message_sequence_num** (`int | None`) = `None`: Index from which the client discards the messages it holds before applying this delta.

  `None` means the client discards nothing. Roboto sets it when a turn stopped partway and Roboto regenerated it. The replacement message reuses the same index, so appending to the message the client holds there would join the reply onto text from the abandoned attempt. When it is set, the client:

  1. Drops the messages it holds at this index and after.
  2. Applies `messages_by_idx` and adopts `continuation_token`.

- **AgentThreadDelta.status** (`AgentThreadStatus | None`) = `None`: New status of the thread, or `None` if it has not changed.

- **AgentThreadDelta.tasks** (`list[roboto.ai.core.task.AgentTask] | None`) = `None`: Task list of the thread, ordered by [`position`](/docs/reference/python-sdk/roboto/ai/core/task#roboto.ai.core.task.AgentTask.position).

  `None` if it has not changed since the previous delta. A list, even an empty one, replaces the tasks the client holds.

- **AgentThreadDelta.title** (`str | None`) = `None`: New title of the thread, or `None` if it has not changed.

- **AgentThreadDelta.turn_notice** (`str | None`) = `None`: The thread's `AgentThreadRecord.turn_notice` as of this delta.

  Like `activity`, and unlike `status`, `title`, `goals` and `tasks`, `None` does not mean unchanged: every delta carries the thread's current notice, so `None` means there is nothing to report. A client replaces the notice it holds with this value on every delta.

### AgentThreadGoalRecord

```python
class roboto.ai.core.record.AgentThreadGoalRecord(/, **data: Any)
```

`from roboto.ai.agent_thread import AgentThreadGoalRecord`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L277-L330)

Bases: `pydantic.BaseModel`

Data record of a goal declared on a turn of a thread, as the Roboto API returns it.

A goal is a structured outcome attached to a turn of a thread, which Roboto's AI must achieve before the turn completes. Carried in `AgentThreadRecord.goals`. [`AgentThreadGoalView`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread_goal_view#roboto.ai.agent_thread.agent_thread_goal_view.AgentThreadGoalView) wraps this record, and [`goals`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread.goals) returns those wrappers.

**Parameters**

- **data** (`Any`)

**Attributes**

- **AgentThreadGoalRecord.achieve_tool_use_id** (`str | None`) = `None`: ID of the tool use in which the AI submitted the goal's result, through the tool Roboto gives it for that goal.

  It locates the matching [`AgentToolUseContent`](/docs/reference/python-sdk/roboto/ai/core/content#roboto.ai.core.content.AgentToolUseContent) and [`AgentToolResultContent`](/docs/reference/python-sdk/roboto/ai/core/content#roboto.ai.core.content.AgentToolResultContent) in the thread's messages without searching by tool name. Roboto records each attempt, so its value depends on the goal's `status`, a [`AgentGoalStatus`](/docs/reference/python-sdk/roboto/ai/goals/types#roboto.ai.goals.types.AgentGoalStatus):

  - `ACHIEVED`: the successful attempt.
  - `FAILED`: the last attempt, or `None` if the AI never attempted it before running out of retries.
  - `PENDING`: `None`, or the latest attempt so far.

  [`result`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread_goal_view#roboto.ai.agent_thread.agent_thread_goal_view.AgentThreadGoalView.result) reads the submitted result from that tool use.

- **AgentThreadGoalRecord.concluded_at** (`datetime.datetime | None`) = `None`: Time the goal was achieved or failed, or `None` while it is pending.

- **AgentThreadGoalRecord.created** (`datetime.datetime`): Time the goal was declared.

- **AgentThreadGoalRecord.goal_data** (`dict[str, Any]`): [`AgentGoal`](/docs/reference/python-sdk/roboto/ai/goals/types#roboto.ai.goals.types.AgentGoal) as a JSON-compatible dictionary.

  `to_agent_goal` builds the typed goal from it.

- **AgentThreadGoalRecord.goal_type** (`str`): Kind of goal, such as `"dataset_summary"`, which selects the model `goal_data` follows.

- **AgentThreadGoalRecord.message_sequence_num** (`int`): Index, in the thread's `messages`, of the user message that declared the goal.

- **AgentThreadGoalRecord.status** (`roboto.ai.goals.AgentGoalStatus`): Status of the goal.

#### AgentThreadGoalRecord.to_agent_goal()

```python
def to_agent_goal() -> roboto.ai.goals.AgentGoal
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L322-L330)

Build the typed goal from `goal_data`.

**Returns**

- `roboto.ai.goals.AgentGoal`: The goal as the [`AgentGoal`](/docs/reference/python-sdk/roboto/ai/goals/types#roboto.ai.goals.types.AgentGoal) member `goal_type` selects, such as [`DatasetSummaryAgentGoal`](/docs/reference/python-sdk/roboto/ai/goals/types#roboto.ai.goals.types.DatasetSummaryAgentGoal) for `"dataset_summary"` or [`DatasetTriageGoal`](/docs/reference/python-sdk/roboto/ai/goals/types#roboto.ai.goals.types.DatasetTriageGoal) for `"dataset_triage"`.

### AgentThreadRecord

```python
class roboto.ai.core.record.AgentThreadRecord(/, **data: Any)
```

`from roboto.ai import AgentThreadRecord`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L333-L474)

Bases: `pydantic.BaseModel`

Data record of a thread, as the Roboto API returns it.

A thread is a persistent, multi-turn conversation with Roboto's AI. [`AgentThread`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread) wraps this record with methods that act on the thread, and [`from_id()`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread.from_id) fetches it.

**Parameters**

- **data** (`Any`)

**Attributes**

- **AgentThreadRecord.activity** (`str | None`) = `None`: Sentence for display saying what Roboto's AI is doing that the thread's messages do not show yet.

  `None` when there is no such activity. While Roboto summarizes the thread's older messages so the conversation fits the AI model's context window, it is "Summarizing older messages to fit the model's context window". While a tool runs and reports its progress, it is that tool's latest report, such as "Starting the Python sandbox".

- **AgentThreadRecord.continuation_token** (`str`): Token marking how much of the thread this record holds.

  Pass it as `next_token` to `GET /v1/ai/threads/{thread_id}/delta` to fetch what changed since.

- **AgentThreadRecord.created** (`datetime.datetime`): Time the thread was created.

- **AgentThreadRecord.created_by** (`str`): ID of the user who created the thread.

- **AgentThreadRecord.created_by_principal** (`str | None`) = `None`: Principal that started the thread, as `<type>:<id>`.

  For example, `user:<user_id>` or `invocation:<invocation_id>`. Unlike `created_by`, it records whether a person, a device, or an action invocation started the thread. `None` on forks and on threads started before Roboto stored it.

- **AgentThreadRecord.created_from_agent_id** (`str | None`) = `None`: ID of the agent whose launch started the thread, or `None` if no agent launch started it.

  A fork does not inherit it.

- **AgentThreadRecord.created_from_trigger_id** (`str | None`) = `None`: ID of the trigger that started the thread, or `None` if no trigger started it.

  The trigger started the thread through its [`StartAgent`](/docs/reference/python-sdk/roboto/domain/triggers/targets#roboto.domain.triggers.targets.TriggerTargetType.StartAgent) target. It is `None` when a person launched the same agent. When it is set, `created_from_agent_id` names the agent the trigger launched. A fork does not inherit it.

- **AgentThreadRecord.forked_from_message_sequence_num** (`int | None`) = `None`: Index of the last message the fork copied from the source thread, or `None` if the thread is not a fork.

- **AgentThreadRecord.forked_from_thread_id** (`str | None`) = `None`: ID of the thread this thread was forked from, or `None` if it is not a fork.

  Also accepted under the key `forked_from_session_id`.

- **AgentThreadRecord.goals** (`list[AgentThreadGoalRecord] | None`) = `None`: Goals declared across the thread's turns, ordered by the turn that declared them.

  `None` when the record was returned without its goals; an empty list when the thread declared none.

- **AgentThreadRecord.has_more** (`bool`) = `False`: Whether Roboto left the thread's later messages out of `messages` to keep the response small.

  `True` only in a response to a request sent with `paged=true`. To fetch the messages left out, request `GET /v1/ai/threads/{thread_id}/delta` with `paged=true`, passing `continuation_token` as `next_token`, and repeat with each delta's token until a delta reports `has_more` as `False`. [`from_id()`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread.from_id) does this, so a thread it returns holds every message.

- **AgentThreadRecord.messages** (`list[AgentMessage]`) = `None`: Messages in the thread, oldest first.

  Empty when the thread was fetched with `load_messages=False`, as [`from_id()`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread.from_id) allows.

- **AgentThreadRecord.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

- **AgentThreadRecord.model_profile** (`str | None`) = `None`: ID of the model profile the thread runs on, such as `standard` or `advanced`.

- **AgentThreadRecord.org_id** (`str`): ID of the organization that owns the thread.

- **AgentThreadRecord.origin** (`ThreadOrigin | None`) = `None`: Origin of the thread: the surface it was started from, which owns it.

  Roboto sets it; no request does. When the origin is a surface outside Roboto, such as `ThreadOrigin.SLACK`, Roboto refuses new messages to the thread over the API with [`RobotoThreadReadOnlyException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoThreadReadOnlyException); reading, cancelling, and rating the thread still work. A fork does not inherit the origin, so a fork accepts new messages. `None` on forks and on threads started before Roboto stored it, and means the same as `API`.

- **AgentThreadRecord.pinned_at** (`datetime.datetime | None`) = `None`: Time the calling user pinned the thread, or `None` if they have not.

  A pin is a personal bookmark, so two users reading the same thread see different values. Pin and unpin with [`set_pinned()`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread.set_pinned). Only `GET /v1/ai/threads` and `POST /v1/ai/threads/search` report it; a read of a single thread leaves it `None` whatever the pin state.

- **AgentThreadRecord.status** (`AgentThreadStatus`): Status of the thread: whose turn it is, or why the thread stopped.

- **AgentThreadRecord.tasks** (`list[roboto.ai.core.task.AgentTask] | None`) = `None`: Task list of the thread, ordered by [`position`](/docs/reference/python-sdk/roboto/ai/core/task#roboto.ai.core.task.AgentTask.position).

  `None` when the record was returned without its tasks; an empty list when the thread has none.

- **AgentThreadRecord.thread_id** (`str`) = `None`: Unique ID of the thread.

  Also accepted under the key `session_id` or `chat_id`.

- **AgentThreadRecord.title** (`str | None`) = `None`: Title of the thread, or `None` if it has none.

- **AgentThreadRecord.turn_notice** (`str | None`) = `None`: Short, human-readable note about the turn in progress.

  For example, that the turn stopped unexpectedly and Roboto is retrying it. `None` when there is nothing to report, and always `None` unless `status` is `ROBOTO_TURN`. Roboto computes it on each read of a single thread and each delta, and does not store it with the thread.

- **AgentThreadRecord.visibility** (`ThreadVisibility`): Visibility of the thread: who can read it.

### AgentThreadStatus

```python
class roboto.ai.core.record.AgentThreadStatus
```

`from roboto.ai.agent_thread import AgentThreadStatus`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L157-L176)

Bases: `roboto.compat.StrEnum`

Status of a thread: whose turn it is, or why the thread stopped.

**Attributes**

- **AgentThreadStatus.CLIENT_TOOL_TURN** = `'client_tool_turn'`: Waiting for the caller to run the client tools the AI requested and submit their results.

- **AgentThreadStatus.GOALS_FAILED** = `'goals_failed'`: The AI used up its retries for the latest turn without achieving every goal declared for it.

  The thread needs a person to act before it can continue.

- **AgentThreadStatus.NOT_STARTED** = `'not_started'`: The thread exists, but no message has been sent to it.

- **AgentThreadStatus.ROBOTO_TURN** = `'roboto_turn'`: Roboto's AI is generating a response.

- **AgentThreadStatus.USER_TURN** = `'user_turn'`: Waiting for the caller's next message.

### CLIENT_TOOL_NAME_PREFIX

```python
roboto.ai.core.record.CLIENT_TOOL_NAME_PREFIX = 'client_'
```

`from roboto.ai.core.record import CLIENT_TOOL_NAME_PREFIX`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L87-L87)

Prefix every client tool's name must start with.

Roboto tells client tools from its own tools by this prefix. Tool names may contain only letters, digits, and underscores, so the prefix ends in an underscore. The full name must match `^client_[a-z][a-z0-9_]*$`.

### ClientToolSpec

```python
class roboto.ai.core.record.ClientToolSpec(/, **data: Any)
```

`from roboto import ClientToolSpec`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L179-L218)

Bases: `pydantic.BaseModel`

Specification of a client tool: a tool Roboto's AI can ask the caller to run, whose result the caller submits.

Carried in the `client_tools` field of [`StartAgentThreadRequest`](/docs/reference/python-sdk/roboto/ai/agent_thread/record#roboto.ai.agent_thread.record.StartAgentThreadRequest), [`SendMessageRequest`](/docs/reference/python-sdk/roboto/ai/agent_thread/record#roboto.ai.agent_thread.record.SendMessageRequest), and [`SubmitToolResultsRequest`](/docs/reference/python-sdk/roboto/ai/agent_thread/record#roboto.ai.agent_thread.record.SubmitToolResultsRequest). Roboto offers the tool to the AI but never runs it. [`ClientTool`](/docs/reference/python-sdk/roboto/ai/agent_thread/client_tool#roboto.ai.agent_thread.client_tool.ClientTool) pairs a specification with a function that [`run()`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread.run) calls for you; for a bare specification, submit the results yourself with [`submit_client_tool_results()`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread.submit_client_tool_results).

Building a specification raises `pydantic.ValidationError` when `name` does not match `^client_[a-z][a-z0-9_]*$`.

**Parameters**

- **data** (`Any`)

**Attributes**

- **ClientToolSpec.description** (`str`): Human-readable description of what the tool does, which the AI reads to decide when to use it.

- **ClientToolSpec.input_schema** (`dict[str, Any]`): JSON Schema of the tool's input.

- **ClientToolSpec.name** (`str`): Name of the tool, which the AI uses to request it.

  Starts with `CLIENT_TOOL_NAME_PREFIX`, followed by a lowercase letter and then lowercase letters, digits, and underscores.

### ModelProfileResponse

```python
class roboto.ai.core.record.ModelProfileResponse(/, **data: Any)
```

`from roboto.ai.core import ModelProfileResponse`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L98-L114)

Bases: `pydantic.BaseModel`

Item of the response body of `GET /v1/ai/model-profiles`: a model profile the organization can pick.

A model profile names the AI model a thread runs on.

**Parameters**

- **data** (`Any`)

**Attributes**

- **ModelProfileResponse.description** (`str`): Human-readable description of the model profile.
- **ModelProfileResponse.id** (`str`): ID of the model profile, such as `standard` or `advanced`.
- **ModelProfileResponse.is_default** (`bool`) = `False`: Whether a new thread runs on this model profile when it requests none.
- **ModelProfileResponse.label** (`str`): Human-readable name of the model profile.

### ThreadOrigin

```python
class roboto.ai.core.record.ThreadOrigin
```

`from roboto.ai.agent_thread import ThreadOrigin`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L45-L60)

Bases: `roboto.compat.StrEnum`

Origin of a thread: the surface it was started from, which owns it.

The origin decides whether the thread accepts new messages over the API. It differs from `AgentThreadRecord.created_by_principal`, which records who started the thread. Import it from `roboto.ai.agent_thread`.

**Attributes**

- **ThreadOrigin.API** = `'api'`: Roboto itself: the Roboto web app, the CLI, the SDK, or a direct REST request.

  These surfaces read the thread back from Roboto and keep no copy elsewhere, so the thread accepts new messages.

- **ThreadOrigin.SLACK** = `'slack'`: Slack, where a user started the thread by mentioning @Roboto, and where Roboto mirrors the conversation.

### ThreadVisibility

```python
class roboto.ai.core.record.ThreadVisibility
```

`from roboto.ai.agent_thread import ThreadVisibility`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/record.py#L63-L84)

Bases: `roboto.compat.StrEnum`

Visibility of a thread: who can read it.

Set when the thread is created. Only the thread's creator can change it, with [`set_visibility()`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread.set_visibility). Roboto administrators can read every thread but cannot change the visibility of one they did not create. Import it from `roboto.ai.agent_thread`.

**Attributes**

- **ThreadVisibility.ORG** = `'org'`: Every member of the thread's organization, and Roboto administrators, can read the thread.

  Default for threads started by [`launch()`](/docs/reference/python-sdk/roboto/ai/agent/agent#roboto.ai.agent.agent.Agent.launch), since agents exist to share work across an organization.

- **ThreadVisibility.PRIVATE** = `'private'`: Only the thread's creator and Roboto administrators can read the thread.

  Default for threads started with [`start()`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread.start), so a thread is not shared with the organization until its creator chooses to share it. Every fork is `PRIVATE`, whatever the visibility of the thread it was forked from.
