# Agents

## Get Agent by ID

`agents.retrieve(stragent_id)  -> Agent`

**get** `/agents/{agent_id}`

Get an agent by its unique ID.

### Parameters

- `agent_id: str`

### Returns

- `class Agent: …`

  - `id: str`

    The unique identifier of the agent.

  - `acp_type: AcpType`

    The type of the ACP Server (Either sync or async)

    - `"sync"`

    - `"async"`

    - `"agentic"`

  - `created_at: datetime`

    The timestamp when the agent was created

  - `description: str`

    The description of the action.

  - `name: str`

    The unique name of the agent.

  - `updated_at: datetime`

    The timestamp when the agent was last updated

  - `agent_input_type: Optional[Literal["text", "json"]]`

    The type of input the agent expects.

    - `"text"`

    - `"json"`

  - `production_deployment_id: Optional[str]`

    ID of the current production deployment.

  - `registered_at: Optional[datetime]`

    The timestamp when the agent was last registered

  - `registration_metadata: Optional[Dict[str, object]]`

    The metadata for the agent's registration.

  - `status: Optional[Literal["Ready", "Failed", "Unknown", 3 more]]`

    The status of the action, indicating if it's building, ready, failed, etc.

    - `"Ready"`

    - `"Failed"`

    - `"Unknown"`

    - `"Deleted"`

    - `"Unhealthy"`

    - `"BuildOnly"`

  - `status_reason: Optional[str]`

    The reason for the status of the action.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
agent = client.agents.retrieve(
    "agent_id",
)
print(agent.id)
```

#### Response

```json
{
  "id": "id",
  "acp_type": "sync",
  "created_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "name": "name",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "agent_input_type": "text",
  "production_deployment_id": "production_deployment_id",
  "registered_at": "2019-12-27T18:11:19.117Z",
  "registration_metadata": {
    "foo": "bar"
  },
  "status": "Ready",
  "status_reason": "status_reason"
}
```

## Delete Agent by ID

`agents.delete(stragent_id)  -> DeleteResponse`

**delete** `/agents/{agent_id}`

Delete an agent by its unique ID.

### Parameters

- `agent_id: str`

### Returns

- `class DeleteResponse: …`

  - `id: str`

  - `message: str`

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
delete_response = client.agents.delete(
    "agent_id",
)
print(delete_response.id)
```

#### Response

```json
{
  "id": "id",
  "message": "message"
}
```

## List Agents

`agents.list(AgentListParams**kwargs)  -> AgentListResponse`

**get** `/agents`

List all registered agents, optionally filtered by query parameters.

### Parameters

- `agent_card_metadata: Optional[str]`

  JSON-encoded object used to filter agents on `registration_metadata.agent_card.metadata` via JSONB containment. Example: {"permits_capable": true}. Only matches cards published through the direct registration path: registrations that carry a `deployment_id` write the card to the deployment record instead of `registration_metadata`, so those agents never match this filter.

- `limit: Optional[int]`

  Limit

- `order_by: Optional[str]`

  Field to order by

- `order_direction: Optional[str]`

  Order direction (asc or desc)

- `page_number: Optional[int]`

  Page number

- `task_id: Optional[str]`

  Task ID

### Returns

- `List[Agent]`

  - `id: str`

    The unique identifier of the agent.

  - `acp_type: AcpType`

    The type of the ACP Server (Either sync or async)

    - `"sync"`

    - `"async"`

    - `"agentic"`

  - `created_at: datetime`

    The timestamp when the agent was created

  - `description: str`

    The description of the action.

  - `name: str`

    The unique name of the agent.

  - `updated_at: datetime`

    The timestamp when the agent was last updated

  - `agent_input_type: Optional[Literal["text", "json"]]`

    The type of input the agent expects.

    - `"text"`

    - `"json"`

  - `production_deployment_id: Optional[str]`

    ID of the current production deployment.

  - `registered_at: Optional[datetime]`

    The timestamp when the agent was last registered

  - `registration_metadata: Optional[Dict[str, object]]`

    The metadata for the agent's registration.

  - `status: Optional[Literal["Ready", "Failed", "Unknown", 3 more]]`

    The status of the action, indicating if it's building, ready, failed, etc.

    - `"Ready"`

    - `"Failed"`

    - `"Unknown"`

    - `"Deleted"`

    - `"Unhealthy"`

    - `"BuildOnly"`

  - `status_reason: Optional[str]`

    The reason for the status of the action.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
agents = client.agents.list()
print(agents)
```

#### Response

```json
[
  {
    "id": "id",
    "acp_type": "sync",
    "created_at": "2019-12-27T18:11:19.117Z",
    "description": "description",
    "name": "name",
    "updated_at": "2019-12-27T18:11:19.117Z",
    "agent_input_type": "text",
    "production_deployment_id": "production_deployment_id",
    "registered_at": "2019-12-27T18:11:19.117Z",
    "registration_metadata": {
      "foo": "bar"
    },
    "status": "Ready",
    "status_reason": "status_reason"
  }
]
```

## Handle Agent RPC by ID

`agents.rpc(stragent_id, AgentRpcParams**kwargs)  -> AgentRpcResponse`

**post** `/agents/{agent_id}/rpc`

Handle JSON-RPC requests for an agent by its unique ID.

### Parameters

- `agent_id: str`

- `method: Literal["event/send", "task/create", "message/send", 2 more]`

  - `"event/send"`

  - `"task/create"`

  - `"message/send"`

  - `"task/cancel"`

  - `"task/interrupt"`

- `params: Params`

  The parameters for the agent RPC request

  - `class ParamsCreateTaskRequest: …`

    - `name: Optional[str]`

      Optional human-readable name for the task. When set it must be globally unique. task/create is get-or-create by name: reusing an existing name returns the existing task (with its prior history) instead of creating a new one, so omit name (or make it unique, e.g. by appending a UUID) whenever each call should produce a fresh task.

    - `params: Optional[Dict[str, object]]`

      The parameters for the task. On a get-or-create by name, providing params overwrites the existing task's params (it is not a pure read).

    - `task_metadata: Optional[Dict[str, object]]`

      Caller-provided metadata to persist on the task row. Only applied at task creation; ignored if a task with this name already exists. Forwarded to the agent inside the ACP payload for backward compatibility.

  - `class ParamsCancelTaskRequest: …`

    - `task_id: Optional[str]`

      The ID of the task to cancel. Either this or task_name must be provided.

    - `task_name: Optional[str]`

      The name of the task to cancel. Either this or task_id must be provided.

  - `class ParamsInterruptTaskRequest: …`

    - `task_id: Optional[str]`

      The ID of the task to interrupt. Either this or task_name must be provided.

    - `task_name: Optional[str]`

      The name of the task to interrupt. Either this or task_id must be provided.

  - `class ParamsSendMessageRequest: …`

    - `content: TaskMessageContentParam`

      The message that was sent to the agent

      - `class TextContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `"user"`

          - `"agent"`

        - `content: str`

          The contents of the text message.

        - `attachments: Optional[List[Attachment]]`

          Optional list of file attachments with structured metadata.

          - `file_id: str`

            The unique ID of the attached file

          - `name: str`

            The name of the file

          - `size: int`

            The size of the file in bytes

          - `type: str`

            The MIME type or content type of the file

        - `format: Optional[TextFormat]`

          The format of the message. This is used by the client to determine how to display the message.

          - `"markdown"`

          - `"plain"`

          - `"code"`

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

          - `"static"`

          - `"active"`

        - `type: Optional[Literal["text"]]`

          The type of the message, in this case `text`.

          - `"text"`

      - `class ReasoningContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `summary: List[str]`

          A list of short reasoning summaries

        - `content: Optional[List[str]]`

          The reasoning content or chain-of-thought text

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["reasoning"]]`

          The type of the message, in this case `reasoning`.

          - `"reasoning"`

      - `class DataContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `data: Dict[str, object]`

          The contents of the data message.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["data"]]`

          The type of the message, in this case `data`.

          - `"data"`

      - `class ToolRequestContent: …`

        - `arguments: Dict[str, object]`

          The arguments to the tool.

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `name: str`

          The name of the tool that is being requested.

        - `tool_call_id: str`

          The ID of the tool call that is being requested.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["tool_request"]]`

          The type of the message, in this case `tool_request`.

          - `"tool_request"`

      - `class ToolResponseContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `content: object`

          The result of the tool.

        - `name: str`

          The name of the tool that is being responded to.

        - `tool_call_id: str`

          The ID of the tool call that is being responded to.

        - `is_error: Optional[bool]`

          Whether the tool call resulted in an error. `None` when the harness does not report a status.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["tool_response"]]`

          The type of the message, in this case `tool_response`.

          - `"tool_response"`

    - `stream: Optional[bool]`

      Whether to stream the response message back to the client

    - `task_id: Optional[str]`

      The ID of the task that the message was sent to

    - `task_name: Optional[str]`

      The name of the task that the message was sent to

    - `task_params: Optional[Dict[str, object]]`

      The parameters for the task (only used when creating new tasks)

  - `class ParamsSendEventRequest: …`

    - `content: Optional[TaskMessageContentParam]`

      The content to send to the event

    - `task_id: Optional[str]`

      The ID of the task that the event was sent to

    - `task_name: Optional[str]`

      The name of the task that the event was sent to

- `id: Optional[Union[int, str, null]]`

  - `int`

  - `str`

- `jsonrpc: Optional[Literal["2.0"]]`

  - `"2.0"`

### Returns

- `class AgentRpcResponse: …`

  - `result: Optional[AgentRpcResult]`

    The result of the agent RPC request

    - `List[TaskMessage]`

      - `content: TaskMessageContent`

        The content of the message. This content is not OpenAI compatible. These are messages that are meant to be displayed to the user.

        - `class TextContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

            - `"user"`

            - `"agent"`

          - `content: str`

            The contents of the text message.

          - `attachments: Optional[List[Attachment]]`

            Optional list of file attachments with structured metadata.

            - `file_id: str`

              The unique ID of the attached file

            - `name: str`

              The name of the file

            - `size: int`

              The size of the file in bytes

            - `type: str`

              The MIME type or content type of the file

          - `format: Optional[TextFormat]`

            The format of the message. This is used by the client to determine how to display the message.

            - `"markdown"`

            - `"plain"`

            - `"code"`

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

            - `"static"`

            - `"active"`

          - `type: Optional[Literal["text"]]`

            The type of the message, in this case `text`.

            - `"text"`

        - `class ReasoningContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `summary: List[str]`

            A list of short reasoning summaries

          - `content: Optional[List[str]]`

            The reasoning content or chain-of-thought text

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["reasoning"]]`

            The type of the message, in this case `reasoning`.

            - `"reasoning"`

        - `class DataContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `data: Dict[str, object]`

            The contents of the data message.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["data"]]`

            The type of the message, in this case `data`.

            - `"data"`

        - `class ToolRequestContent: …`

          - `arguments: Dict[str, object]`

            The arguments to the tool.

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `name: str`

            The name of the tool that is being requested.

          - `tool_call_id: str`

            The ID of the tool call that is being requested.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["tool_request"]]`

            The type of the message, in this case `tool_request`.

            - `"tool_request"`

        - `class ToolResponseContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `content: object`

            The result of the tool.

          - `name: str`

            The name of the tool that is being responded to.

          - `tool_call_id: str`

            The ID of the tool call that is being responded to.

          - `is_error: Optional[bool]`

            Whether the tool call resulted in an error. `None` when the harness does not report a status.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["tool_response"]]`

            The type of the message, in this case `tool_response`.

            - `"tool_response"`

      - `task_id: str`

        ID of the task this message belongs to

      - `id: Optional[str]`

        The task message's unique id

      - `created_at: Optional[datetime]`

        The timestamp when the message was created

      - `streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]]`

        - `"IN_PROGRESS"`

        - `"DONE"`

      - `updated_at: Optional[datetime]`

        The timestamp when the message was last updated

    - `class StreamTaskMessageStart: …`

      Event for starting a streaming message

      - `content: TaskMessageContent`

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

        - `content: TaskMessageContent`

          The content of the message. This content is not OpenAI compatible. These are messages that are meant to be displayed to the user.

        - `task_id: str`

          ID of the task this message belongs to

        - `id: Optional[str]`

          The task message's unique id

        - `created_at: Optional[datetime]`

          The timestamp when the message was created

        - `streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]]`

        - `updated_at: Optional[datetime]`

          The timestamp when the message was last updated

      - `type: Optional[Literal["start"]]`

        - `"start"`

    - `class StreamTaskMessageDelta: …`

      Event for streaming chunks of content

      - `delta: Optional[TaskMessageDelta]`

        Delta for text updates

        - `class TextDelta: …`

          Delta for text updates

          - `text_delta: Optional[str]`

          - `type: Optional[Literal["text"]]`

            - `"text"`

        - `class DataDelta: …`

          Delta for data updates

          - `data_delta: Optional[str]`

          - `type: Optional[Literal["data"]]`

            - `"data"`

        - `class ToolRequestDelta: …`

          Delta for tool request updates

          - `name: str`

          - `tool_call_id: str`

          - `arguments_delta: Optional[str]`

          - `type: Optional[Literal["tool_request"]]`

            - `"tool_request"`

        - `class ToolResponseDelta: …`

          Delta for tool response updates

          - `name: str`

          - `tool_call_id: str`

          - `content_delta: Optional[str]`

          - `type: Optional[Literal["tool_response"]]`

            - `"tool_response"`

        - `class ReasoningSummaryDelta: …`

          Delta for reasoning summary updates

          - `summary_index: int`

          - `summary_delta: Optional[str]`

          - `type: Optional[Literal["reasoning_summary"]]`

            - `"reasoning_summary"`

        - `class ReasoningContentDelta: …`

          Delta for reasoning content updates

          - `content_index: int`

          - `content_delta: Optional[str]`

          - `type: Optional[Literal["reasoning_content"]]`

            - `"reasoning_content"`

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

      - `type: Optional[Literal["delta"]]`

        - `"delta"`

    - `class StreamTaskMessageFull: …`

      Event for streaming the full content

      - `content: TaskMessageContent`

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

      - `type: Optional[Literal["full"]]`

        - `"full"`

    - `class StreamTaskMessageDone: …`

      Event for indicating the task is done

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

      - `type: Optional[Literal["done"]]`

        - `"done"`

    - `class Task: …`

      - `id: str`

      - `cleaned_at: Optional[datetime]`

      - `created_at: Optional[datetime]`

      - `name: Optional[str]`

      - `params: Optional[Dict[str, object]]`

      - `status: Optional[Literal["CANCELED", "COMPLETED", "FAILED", 5 more]]`

        - `"CANCELED"`

        - `"COMPLETED"`

        - `"FAILED"`

        - `"RUNNING"`

        - `"INTERRUPTED"`

        - `"TERMINATED"`

        - `"TIMED_OUT"`

        - `"DELETED"`

      - `status_reason: Optional[str]`

      - `task_metadata: Optional[Dict[str, object]]`

      - `updated_at: Optional[datetime]`

    - `class Event: …`

      - `id: str`

        The UUID of the event

      - `agent_id: str`

        The UUID of the agent that the event belongs to

      - `sequence_id: int`

        The sequence ID of the event

      - `task_id: str`

        The UUID of the task that the event belongs to

      - `content: Optional[TaskMessageContent]`

        The content of the event

      - `created_at: Optional[datetime]`

        The timestamp of the event

  - `id: Optional[Union[int, str, null]]`

    - `int`

    - `str`

  - `error: Optional[object]`

  - `jsonrpc: Optional[Literal["2.0"]]`

    - `"2.0"`

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
agent_rpc_response = client.agents.rpc(
    agent_id="agent_id",
    method="event/send",
    params={},
)
print(agent_rpc_response.id)
```

#### Response

```json
{
  "result": [
    {
      "content": {
        "author": "user",
        "content": "content",
        "attachments": [
          {
            "file_id": "file_id",
            "name": "name",
            "size": 0,
            "type": "type"
          }
        ],
        "format": "markdown",
        "style": "static",
        "type": "text"
      },
      "task_id": "task_id",
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "streaming_status": "IN_PROGRESS",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "id": 0,
  "error": {},
  "jsonrpc": "2.0"
}
```

## Get Agent by Name

`agents.retrieve_by_name(stragent_name)  -> Agent`

**get** `/agents/name/{agent_name}`

Get an agent by its unique name.

### Parameters

- `agent_name: str`

### Returns

- `class Agent: …`

  - `id: str`

    The unique identifier of the agent.

  - `acp_type: AcpType`

    The type of the ACP Server (Either sync or async)

    - `"sync"`

    - `"async"`

    - `"agentic"`

  - `created_at: datetime`

    The timestamp when the agent was created

  - `description: str`

    The description of the action.

  - `name: str`

    The unique name of the agent.

  - `updated_at: datetime`

    The timestamp when the agent was last updated

  - `agent_input_type: Optional[Literal["text", "json"]]`

    The type of input the agent expects.

    - `"text"`

    - `"json"`

  - `production_deployment_id: Optional[str]`

    ID of the current production deployment.

  - `registered_at: Optional[datetime]`

    The timestamp when the agent was last registered

  - `registration_metadata: Optional[Dict[str, object]]`

    The metadata for the agent's registration.

  - `status: Optional[Literal["Ready", "Failed", "Unknown", 3 more]]`

    The status of the action, indicating if it's building, ready, failed, etc.

    - `"Ready"`

    - `"Failed"`

    - `"Unknown"`

    - `"Deleted"`

    - `"Unhealthy"`

    - `"BuildOnly"`

  - `status_reason: Optional[str]`

    The reason for the status of the action.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
agent = client.agents.retrieve_by_name(
    "agent_name",
)
print(agent.id)
```

#### Response

```json
{
  "id": "id",
  "acp_type": "sync",
  "created_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "name": "name",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "agent_input_type": "text",
  "production_deployment_id": "production_deployment_id",
  "registered_at": "2019-12-27T18:11:19.117Z",
  "registration_metadata": {
    "foo": "bar"
  },
  "status": "Ready",
  "status_reason": "status_reason"
}
```

## Delete Agent by Name

`agents.delete_by_name(stragent_name)  -> DeleteResponse`

**delete** `/agents/name/{agent_name}`

Delete an agent by its unique name.

### Parameters

- `agent_name: str`

### Returns

- `class DeleteResponse: …`

  - `id: str`

  - `message: str`

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
delete_response = client.agents.delete_by_name(
    "agent_name",
)
print(delete_response.id)
```

#### Response

```json
{
  "id": "id",
  "message": "message"
}
```

## Handle Agent RPC by Name

`agents.rpc_by_name(stragent_name, AgentRpcByNameParams**kwargs)  -> AgentRpcResponse`

**post** `/agents/name/{agent_name}/rpc`

Handle JSON-RPC requests for an agent by its unique name.

### Parameters

- `agent_name: str`

- `method: Literal["event/send", "task/create", "message/send", 2 more]`

  - `"event/send"`

  - `"task/create"`

  - `"message/send"`

  - `"task/cancel"`

  - `"task/interrupt"`

- `params: Params`

  The parameters for the agent RPC request

  - `class ParamsCreateTaskRequest: …`

    - `name: Optional[str]`

      Optional human-readable name for the task. When set it must be globally unique. task/create is get-or-create by name: reusing an existing name returns the existing task (with its prior history) instead of creating a new one, so omit name (or make it unique, e.g. by appending a UUID) whenever each call should produce a fresh task.

    - `params: Optional[Dict[str, object]]`

      The parameters for the task. On a get-or-create by name, providing params overwrites the existing task's params (it is not a pure read).

    - `task_metadata: Optional[Dict[str, object]]`

      Caller-provided metadata to persist on the task row. Only applied at task creation; ignored if a task with this name already exists. Forwarded to the agent inside the ACP payload for backward compatibility.

  - `class ParamsCancelTaskRequest: …`

    - `task_id: Optional[str]`

      The ID of the task to cancel. Either this or task_name must be provided.

    - `task_name: Optional[str]`

      The name of the task to cancel. Either this or task_id must be provided.

  - `class ParamsInterruptTaskRequest: …`

    - `task_id: Optional[str]`

      The ID of the task to interrupt. Either this or task_name must be provided.

    - `task_name: Optional[str]`

      The name of the task to interrupt. Either this or task_id must be provided.

  - `class ParamsSendMessageRequest: …`

    - `content: TaskMessageContentParam`

      The message that was sent to the agent

      - `class TextContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `"user"`

          - `"agent"`

        - `content: str`

          The contents of the text message.

        - `attachments: Optional[List[Attachment]]`

          Optional list of file attachments with structured metadata.

          - `file_id: str`

            The unique ID of the attached file

          - `name: str`

            The name of the file

          - `size: int`

            The size of the file in bytes

          - `type: str`

            The MIME type or content type of the file

        - `format: Optional[TextFormat]`

          The format of the message. This is used by the client to determine how to display the message.

          - `"markdown"`

          - `"plain"`

          - `"code"`

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

          - `"static"`

          - `"active"`

        - `type: Optional[Literal["text"]]`

          The type of the message, in this case `text`.

          - `"text"`

      - `class ReasoningContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `summary: List[str]`

          A list of short reasoning summaries

        - `content: Optional[List[str]]`

          The reasoning content or chain-of-thought text

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["reasoning"]]`

          The type of the message, in this case `reasoning`.

          - `"reasoning"`

      - `class DataContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `data: Dict[str, object]`

          The contents of the data message.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["data"]]`

          The type of the message, in this case `data`.

          - `"data"`

      - `class ToolRequestContent: …`

        - `arguments: Dict[str, object]`

          The arguments to the tool.

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `name: str`

          The name of the tool that is being requested.

        - `tool_call_id: str`

          The ID of the tool call that is being requested.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["tool_request"]]`

          The type of the message, in this case `tool_request`.

          - `"tool_request"`

      - `class ToolResponseContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `content: object`

          The result of the tool.

        - `name: str`

          The name of the tool that is being responded to.

        - `tool_call_id: str`

          The ID of the tool call that is being responded to.

        - `is_error: Optional[bool]`

          Whether the tool call resulted in an error. `None` when the harness does not report a status.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["tool_response"]]`

          The type of the message, in this case `tool_response`.

          - `"tool_response"`

    - `stream: Optional[bool]`

      Whether to stream the response message back to the client

    - `task_id: Optional[str]`

      The ID of the task that the message was sent to

    - `task_name: Optional[str]`

      The name of the task that the message was sent to

    - `task_params: Optional[Dict[str, object]]`

      The parameters for the task (only used when creating new tasks)

  - `class ParamsSendEventRequest: …`

    - `content: Optional[TaskMessageContentParam]`

      The content to send to the event

    - `task_id: Optional[str]`

      The ID of the task that the event was sent to

    - `task_name: Optional[str]`

      The name of the task that the event was sent to

- `id: Optional[Union[int, str, null]]`

  - `int`

  - `str`

- `jsonrpc: Optional[Literal["2.0"]]`

  - `"2.0"`

### Returns

- `class AgentRpcResponse: …`

  - `result: Optional[AgentRpcResult]`

    The result of the agent RPC request

    - `List[TaskMessage]`

      - `content: TaskMessageContent`

        The content of the message. This content is not OpenAI compatible. These are messages that are meant to be displayed to the user.

        - `class TextContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

            - `"user"`

            - `"agent"`

          - `content: str`

            The contents of the text message.

          - `attachments: Optional[List[Attachment]]`

            Optional list of file attachments with structured metadata.

            - `file_id: str`

              The unique ID of the attached file

            - `name: str`

              The name of the file

            - `size: int`

              The size of the file in bytes

            - `type: str`

              The MIME type or content type of the file

          - `format: Optional[TextFormat]`

            The format of the message. This is used by the client to determine how to display the message.

            - `"markdown"`

            - `"plain"`

            - `"code"`

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

            - `"static"`

            - `"active"`

          - `type: Optional[Literal["text"]]`

            The type of the message, in this case `text`.

            - `"text"`

        - `class ReasoningContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `summary: List[str]`

            A list of short reasoning summaries

          - `content: Optional[List[str]]`

            The reasoning content or chain-of-thought text

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["reasoning"]]`

            The type of the message, in this case `reasoning`.

            - `"reasoning"`

        - `class DataContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `data: Dict[str, object]`

            The contents of the data message.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["data"]]`

            The type of the message, in this case `data`.

            - `"data"`

        - `class ToolRequestContent: …`

          - `arguments: Dict[str, object]`

            The arguments to the tool.

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `name: str`

            The name of the tool that is being requested.

          - `tool_call_id: str`

            The ID of the tool call that is being requested.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["tool_request"]]`

            The type of the message, in this case `tool_request`.

            - `"tool_request"`

        - `class ToolResponseContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `content: object`

            The result of the tool.

          - `name: str`

            The name of the tool that is being responded to.

          - `tool_call_id: str`

            The ID of the tool call that is being responded to.

          - `is_error: Optional[bool]`

            Whether the tool call resulted in an error. `None` when the harness does not report a status.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["tool_response"]]`

            The type of the message, in this case `tool_response`.

            - `"tool_response"`

      - `task_id: str`

        ID of the task this message belongs to

      - `id: Optional[str]`

        The task message's unique id

      - `created_at: Optional[datetime]`

        The timestamp when the message was created

      - `streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]]`

        - `"IN_PROGRESS"`

        - `"DONE"`

      - `updated_at: Optional[datetime]`

        The timestamp when the message was last updated

    - `class StreamTaskMessageStart: …`

      Event for starting a streaming message

      - `content: TaskMessageContent`

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

        - `content: TaskMessageContent`

          The content of the message. This content is not OpenAI compatible. These are messages that are meant to be displayed to the user.

        - `task_id: str`

          ID of the task this message belongs to

        - `id: Optional[str]`

          The task message's unique id

        - `created_at: Optional[datetime]`

          The timestamp when the message was created

        - `streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]]`

        - `updated_at: Optional[datetime]`

          The timestamp when the message was last updated

      - `type: Optional[Literal["start"]]`

        - `"start"`

    - `class StreamTaskMessageDelta: …`

      Event for streaming chunks of content

      - `delta: Optional[TaskMessageDelta]`

        Delta for text updates

        - `class TextDelta: …`

          Delta for text updates

          - `text_delta: Optional[str]`

          - `type: Optional[Literal["text"]]`

            - `"text"`

        - `class DataDelta: …`

          Delta for data updates

          - `data_delta: Optional[str]`

          - `type: Optional[Literal["data"]]`

            - `"data"`

        - `class ToolRequestDelta: …`

          Delta for tool request updates

          - `name: str`

          - `tool_call_id: str`

          - `arguments_delta: Optional[str]`

          - `type: Optional[Literal["tool_request"]]`

            - `"tool_request"`

        - `class ToolResponseDelta: …`

          Delta for tool response updates

          - `name: str`

          - `tool_call_id: str`

          - `content_delta: Optional[str]`

          - `type: Optional[Literal["tool_response"]]`

            - `"tool_response"`

        - `class ReasoningSummaryDelta: …`

          Delta for reasoning summary updates

          - `summary_index: int`

          - `summary_delta: Optional[str]`

          - `type: Optional[Literal["reasoning_summary"]]`

            - `"reasoning_summary"`

        - `class ReasoningContentDelta: …`

          Delta for reasoning content updates

          - `content_index: int`

          - `content_delta: Optional[str]`

          - `type: Optional[Literal["reasoning_content"]]`

            - `"reasoning_content"`

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

      - `type: Optional[Literal["delta"]]`

        - `"delta"`

    - `class StreamTaskMessageFull: …`

      Event for streaming the full content

      - `content: TaskMessageContent`

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

      - `type: Optional[Literal["full"]]`

        - `"full"`

    - `class StreamTaskMessageDone: …`

      Event for indicating the task is done

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

      - `type: Optional[Literal["done"]]`

        - `"done"`

    - `class Task: …`

      - `id: str`

      - `cleaned_at: Optional[datetime]`

      - `created_at: Optional[datetime]`

      - `name: Optional[str]`

      - `params: Optional[Dict[str, object]]`

      - `status: Optional[Literal["CANCELED", "COMPLETED", "FAILED", 5 more]]`

        - `"CANCELED"`

        - `"COMPLETED"`

        - `"FAILED"`

        - `"RUNNING"`

        - `"INTERRUPTED"`

        - `"TERMINATED"`

        - `"TIMED_OUT"`

        - `"DELETED"`

      - `status_reason: Optional[str]`

      - `task_metadata: Optional[Dict[str, object]]`

      - `updated_at: Optional[datetime]`

    - `class Event: …`

      - `id: str`

        The UUID of the event

      - `agent_id: str`

        The UUID of the agent that the event belongs to

      - `sequence_id: int`

        The sequence ID of the event

      - `task_id: str`

        The UUID of the task that the event belongs to

      - `content: Optional[TaskMessageContent]`

        The content of the event

      - `created_at: Optional[datetime]`

        The timestamp of the event

  - `id: Optional[Union[int, str, null]]`

    - `int`

    - `str`

  - `error: Optional[object]`

  - `jsonrpc: Optional[Literal["2.0"]]`

    - `"2.0"`

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
agent_rpc_response = client.agents.rpc_by_name(
    agent_name="agent_name",
    method="event/send",
    params={},
)
print(agent_rpc_response.id)
```

#### Response

```json
{
  "result": [
    {
      "content": {
        "author": "user",
        "content": "content",
        "attachments": [
          {
            "file_id": "file_id",
            "name": "name",
            "size": 0,
            "type": "type"
          }
        ],
        "format": "markdown",
        "style": "static",
        "type": "text"
      },
      "task_id": "task_id",
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "streaming_status": "IN_PROGRESS",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "id": 0,
  "error": {},
  "jsonrpc": "2.0"
}
```

## Register Build

`agents.register_build(AgentRegisterBuildParams**kwargs)  -> Agent`

**post** `/agents/register-build`

Register an agent at build time, before it is deployed, so it can be permissioned and shared prior to deploy. Idempotent by name.

### Parameters

- `description: str`

  The description of the agent.

- `name: str`

  The unique name of the agent.

- `agent_input_type: Optional[Literal["text", "json"]]`

  The type of input the agent expects.

  - `"text"`

  - `"json"`

- `registration_metadata: Optional[Dict[str, object]]`

  The metadata for the agent's build registration.

### Returns

- `class Agent: …`

  - `id: str`

    The unique identifier of the agent.

  - `acp_type: AcpType`

    The type of the ACP Server (Either sync or async)

    - `"sync"`

    - `"async"`

    - `"agentic"`

  - `created_at: datetime`

    The timestamp when the agent was created

  - `description: str`

    The description of the action.

  - `name: str`

    The unique name of the agent.

  - `updated_at: datetime`

    The timestamp when the agent was last updated

  - `agent_input_type: Optional[Literal["text", "json"]]`

    The type of input the agent expects.

    - `"text"`

    - `"json"`

  - `production_deployment_id: Optional[str]`

    ID of the current production deployment.

  - `registered_at: Optional[datetime]`

    The timestamp when the agent was last registered

  - `registration_metadata: Optional[Dict[str, object]]`

    The metadata for the agent's registration.

  - `status: Optional[Literal["Ready", "Failed", "Unknown", 3 more]]`

    The status of the action, indicating if it's building, ready, failed, etc.

    - `"Ready"`

    - `"Failed"`

    - `"Unknown"`

    - `"Deleted"`

    - `"Unhealthy"`

    - `"BuildOnly"`

  - `status_reason: Optional[str]`

    The reason for the status of the action.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
agent = client.agents.register_build(
    description="description",
    name="name",
)
print(agent.id)
```

#### Response

```json
{
  "id": "id",
  "acp_type": "sync",
  "created_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "name": "name",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "agent_input_type": "text",
  "production_deployment_id": "production_deployment_id",
  "registered_at": "2019-12-27T18:11:19.117Z",
  "registration_metadata": {
    "foo": "bar"
  },
  "status": "Ready",
  "status_reason": "status_reason"
}
```

## Domain Types

### Acp Type

- `Literal["sync", "async", "agentic"]`

  - `"sync"`

  - `"async"`

  - `"agentic"`

### Agent

- `class Agent: …`

  - `id: str`

    The unique identifier of the agent.

  - `acp_type: AcpType`

    The type of the ACP Server (Either sync or async)

    - `"sync"`

    - `"async"`

    - `"agentic"`

  - `created_at: datetime`

    The timestamp when the agent was created

  - `description: str`

    The description of the action.

  - `name: str`

    The unique name of the agent.

  - `updated_at: datetime`

    The timestamp when the agent was last updated

  - `agent_input_type: Optional[Literal["text", "json"]]`

    The type of input the agent expects.

    - `"text"`

    - `"json"`

  - `production_deployment_id: Optional[str]`

    ID of the current production deployment.

  - `registered_at: Optional[datetime]`

    The timestamp when the agent was last registered

  - `registration_metadata: Optional[Dict[str, object]]`

    The metadata for the agent's registration.

  - `status: Optional[Literal["Ready", "Failed", "Unknown", 3 more]]`

    The status of the action, indicating if it's building, ready, failed, etc.

    - `"Ready"`

    - `"Failed"`

    - `"Unknown"`

    - `"Deleted"`

    - `"Unhealthy"`

    - `"BuildOnly"`

  - `status_reason: Optional[str]`

    The reason for the status of the action.

### Agent Rpc Request

- `class AgentRpcRequest: …`

  - `method: Literal["event/send", "task/create", "message/send", 2 more]`

    - `"event/send"`

    - `"task/create"`

    - `"message/send"`

    - `"task/cancel"`

    - `"task/interrupt"`

  - `params: Params`

    The parameters for the agent RPC request

    - `class ParamsCreateTaskRequest: …`

      - `name: Optional[str]`

        Optional human-readable name for the task. When set it must be globally unique. task/create is get-or-create by name: reusing an existing name returns the existing task (with its prior history) instead of creating a new one, so omit name (or make it unique, e.g. by appending a UUID) whenever each call should produce a fresh task.

      - `params: Optional[Dict[str, object]]`

        The parameters for the task. On a get-or-create by name, providing params overwrites the existing task's params (it is not a pure read).

      - `task_metadata: Optional[Dict[str, object]]`

        Caller-provided metadata to persist on the task row. Only applied at task creation; ignored if a task with this name already exists. Forwarded to the agent inside the ACP payload for backward compatibility.

    - `class ParamsCancelTaskRequest: …`

      - `task_id: Optional[str]`

        The ID of the task to cancel. Either this or task_name must be provided.

      - `task_name: Optional[str]`

        The name of the task to cancel. Either this or task_id must be provided.

    - `class ParamsInterruptTaskRequest: …`

      - `task_id: Optional[str]`

        The ID of the task to interrupt. Either this or task_name must be provided.

      - `task_name: Optional[str]`

        The name of the task to interrupt. Either this or task_id must be provided.

    - `class ParamsSendMessageRequest: …`

      - `content: TaskMessageContent`

        The message that was sent to the agent

        - `class TextContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

            - `"user"`

            - `"agent"`

          - `content: str`

            The contents of the text message.

          - `attachments: Optional[List[Attachment]]`

            Optional list of file attachments with structured metadata.

            - `file_id: str`

              The unique ID of the attached file

            - `name: str`

              The name of the file

            - `size: int`

              The size of the file in bytes

            - `type: str`

              The MIME type or content type of the file

          - `format: Optional[TextFormat]`

            The format of the message. This is used by the client to determine how to display the message.

            - `"markdown"`

            - `"plain"`

            - `"code"`

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

            - `"static"`

            - `"active"`

          - `type: Optional[Literal["text"]]`

            The type of the message, in this case `text`.

            - `"text"`

        - `class ReasoningContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `summary: List[str]`

            A list of short reasoning summaries

          - `content: Optional[List[str]]`

            The reasoning content or chain-of-thought text

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["reasoning"]]`

            The type of the message, in this case `reasoning`.

            - `"reasoning"`

        - `class DataContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `data: Dict[str, object]`

            The contents of the data message.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["data"]]`

            The type of the message, in this case `data`.

            - `"data"`

        - `class ToolRequestContent: …`

          - `arguments: Dict[str, object]`

            The arguments to the tool.

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `name: str`

            The name of the tool that is being requested.

          - `tool_call_id: str`

            The ID of the tool call that is being requested.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["tool_request"]]`

            The type of the message, in this case `tool_request`.

            - `"tool_request"`

        - `class ToolResponseContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `content: object`

            The result of the tool.

          - `name: str`

            The name of the tool that is being responded to.

          - `tool_call_id: str`

            The ID of the tool call that is being responded to.

          - `is_error: Optional[bool]`

            Whether the tool call resulted in an error. `None` when the harness does not report a status.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["tool_response"]]`

            The type of the message, in this case `tool_response`.

            - `"tool_response"`

      - `stream: Optional[bool]`

        Whether to stream the response message back to the client

      - `task_id: Optional[str]`

        The ID of the task that the message was sent to

      - `task_name: Optional[str]`

        The name of the task that the message was sent to

      - `task_params: Optional[Dict[str, object]]`

        The parameters for the task (only used when creating new tasks)

    - `class ParamsSendEventRequest: …`

      - `content: Optional[TaskMessageContent]`

        The content to send to the event

      - `task_id: Optional[str]`

        The ID of the task that the event was sent to

      - `task_name: Optional[str]`

        The name of the task that the event was sent to

  - `id: Optional[Union[int, str, null]]`

    - `int`

    - `str`

  - `jsonrpc: Optional[Literal["2.0"]]`

    - `"2.0"`

### Agent Rpc Response

- `class AgentRpcResponse: …`

  - `result: Optional[AgentRpcResult]`

    The result of the agent RPC request

    - `List[TaskMessage]`

      - `content: TaskMessageContent`

        The content of the message. This content is not OpenAI compatible. These are messages that are meant to be displayed to the user.

        - `class TextContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

            - `"user"`

            - `"agent"`

          - `content: str`

            The contents of the text message.

          - `attachments: Optional[List[Attachment]]`

            Optional list of file attachments with structured metadata.

            - `file_id: str`

              The unique ID of the attached file

            - `name: str`

              The name of the file

            - `size: int`

              The size of the file in bytes

            - `type: str`

              The MIME type or content type of the file

          - `format: Optional[TextFormat]`

            The format of the message. This is used by the client to determine how to display the message.

            - `"markdown"`

            - `"plain"`

            - `"code"`

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

            - `"static"`

            - `"active"`

          - `type: Optional[Literal["text"]]`

            The type of the message, in this case `text`.

            - `"text"`

        - `class ReasoningContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `summary: List[str]`

            A list of short reasoning summaries

          - `content: Optional[List[str]]`

            The reasoning content or chain-of-thought text

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["reasoning"]]`

            The type of the message, in this case `reasoning`.

            - `"reasoning"`

        - `class DataContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `data: Dict[str, object]`

            The contents of the data message.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["data"]]`

            The type of the message, in this case `data`.

            - `"data"`

        - `class ToolRequestContent: …`

          - `arguments: Dict[str, object]`

            The arguments to the tool.

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `name: str`

            The name of the tool that is being requested.

          - `tool_call_id: str`

            The ID of the tool call that is being requested.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["tool_request"]]`

            The type of the message, in this case `tool_request`.

            - `"tool_request"`

        - `class ToolResponseContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `content: object`

            The result of the tool.

          - `name: str`

            The name of the tool that is being responded to.

          - `tool_call_id: str`

            The ID of the tool call that is being responded to.

          - `is_error: Optional[bool]`

            Whether the tool call resulted in an error. `None` when the harness does not report a status.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["tool_response"]]`

            The type of the message, in this case `tool_response`.

            - `"tool_response"`

      - `task_id: str`

        ID of the task this message belongs to

      - `id: Optional[str]`

        The task message's unique id

      - `created_at: Optional[datetime]`

        The timestamp when the message was created

      - `streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]]`

        - `"IN_PROGRESS"`

        - `"DONE"`

      - `updated_at: Optional[datetime]`

        The timestamp when the message was last updated

    - `class StreamTaskMessageStart: …`

      Event for starting a streaming message

      - `content: TaskMessageContent`

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

        - `content: TaskMessageContent`

          The content of the message. This content is not OpenAI compatible. These are messages that are meant to be displayed to the user.

        - `task_id: str`

          ID of the task this message belongs to

        - `id: Optional[str]`

          The task message's unique id

        - `created_at: Optional[datetime]`

          The timestamp when the message was created

        - `streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]]`

        - `updated_at: Optional[datetime]`

          The timestamp when the message was last updated

      - `type: Optional[Literal["start"]]`

        - `"start"`

    - `class StreamTaskMessageDelta: …`

      Event for streaming chunks of content

      - `delta: Optional[TaskMessageDelta]`

        Delta for text updates

        - `class TextDelta: …`

          Delta for text updates

          - `text_delta: Optional[str]`

          - `type: Optional[Literal["text"]]`

            - `"text"`

        - `class DataDelta: …`

          Delta for data updates

          - `data_delta: Optional[str]`

          - `type: Optional[Literal["data"]]`

            - `"data"`

        - `class ToolRequestDelta: …`

          Delta for tool request updates

          - `name: str`

          - `tool_call_id: str`

          - `arguments_delta: Optional[str]`

          - `type: Optional[Literal["tool_request"]]`

            - `"tool_request"`

        - `class ToolResponseDelta: …`

          Delta for tool response updates

          - `name: str`

          - `tool_call_id: str`

          - `content_delta: Optional[str]`

          - `type: Optional[Literal["tool_response"]]`

            - `"tool_response"`

        - `class ReasoningSummaryDelta: …`

          Delta for reasoning summary updates

          - `summary_index: int`

          - `summary_delta: Optional[str]`

          - `type: Optional[Literal["reasoning_summary"]]`

            - `"reasoning_summary"`

        - `class ReasoningContentDelta: …`

          Delta for reasoning content updates

          - `content_index: int`

          - `content_delta: Optional[str]`

          - `type: Optional[Literal["reasoning_content"]]`

            - `"reasoning_content"`

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

      - `type: Optional[Literal["delta"]]`

        - `"delta"`

    - `class StreamTaskMessageFull: …`

      Event for streaming the full content

      - `content: TaskMessageContent`

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

      - `type: Optional[Literal["full"]]`

        - `"full"`

    - `class StreamTaskMessageDone: …`

      Event for indicating the task is done

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

      - `type: Optional[Literal["done"]]`

        - `"done"`

    - `class Task: …`

      - `id: str`

      - `cleaned_at: Optional[datetime]`

      - `created_at: Optional[datetime]`

      - `name: Optional[str]`

      - `params: Optional[Dict[str, object]]`

      - `status: Optional[Literal["CANCELED", "COMPLETED", "FAILED", 5 more]]`

        - `"CANCELED"`

        - `"COMPLETED"`

        - `"FAILED"`

        - `"RUNNING"`

        - `"INTERRUPTED"`

        - `"TERMINATED"`

        - `"TIMED_OUT"`

        - `"DELETED"`

      - `status_reason: Optional[str]`

      - `task_metadata: Optional[Dict[str, object]]`

      - `updated_at: Optional[datetime]`

    - `class Event: …`

      - `id: str`

        The UUID of the event

      - `agent_id: str`

        The UUID of the agent that the event belongs to

      - `sequence_id: int`

        The sequence ID of the event

      - `task_id: str`

        The UUID of the task that the event belongs to

      - `content: Optional[TaskMessageContent]`

        The content of the event

      - `created_at: Optional[datetime]`

        The timestamp of the event

  - `id: Optional[Union[int, str, null]]`

    - `int`

    - `str`

  - `error: Optional[object]`

  - `jsonrpc: Optional[Literal["2.0"]]`

    - `"2.0"`

### Agent Rpc Result

- `Optional[AgentRpcResult]`

  Event for starting a streaming message

  - `List[TaskMessage]`

    - `content: TaskMessageContent`

      The content of the message. This content is not OpenAI compatible. These are messages that are meant to be displayed to the user.

      - `class TextContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `"user"`

          - `"agent"`

        - `content: str`

          The contents of the text message.

        - `attachments: Optional[List[Attachment]]`

          Optional list of file attachments with structured metadata.

          - `file_id: str`

            The unique ID of the attached file

          - `name: str`

            The name of the file

          - `size: int`

            The size of the file in bytes

          - `type: str`

            The MIME type or content type of the file

        - `format: Optional[TextFormat]`

          The format of the message. This is used by the client to determine how to display the message.

          - `"markdown"`

          - `"plain"`

          - `"code"`

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

          - `"static"`

          - `"active"`

        - `type: Optional[Literal["text"]]`

          The type of the message, in this case `text`.

          - `"text"`

      - `class ReasoningContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `summary: List[str]`

          A list of short reasoning summaries

        - `content: Optional[List[str]]`

          The reasoning content or chain-of-thought text

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["reasoning"]]`

          The type of the message, in this case `reasoning`.

          - `"reasoning"`

      - `class DataContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `data: Dict[str, object]`

          The contents of the data message.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["data"]]`

          The type of the message, in this case `data`.

          - `"data"`

      - `class ToolRequestContent: …`

        - `arguments: Dict[str, object]`

          The arguments to the tool.

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `name: str`

          The name of the tool that is being requested.

        - `tool_call_id: str`

          The ID of the tool call that is being requested.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["tool_request"]]`

          The type of the message, in this case `tool_request`.

          - `"tool_request"`

      - `class ToolResponseContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `content: object`

          The result of the tool.

        - `name: str`

          The name of the tool that is being responded to.

        - `tool_call_id: str`

          The ID of the tool call that is being responded to.

        - `is_error: Optional[bool]`

          Whether the tool call resulted in an error. `None` when the harness does not report a status.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["tool_response"]]`

          The type of the message, in this case `tool_response`.

          - `"tool_response"`

    - `task_id: str`

      ID of the task this message belongs to

    - `id: Optional[str]`

      The task message's unique id

    - `created_at: Optional[datetime]`

      The timestamp when the message was created

    - `streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]]`

      - `"IN_PROGRESS"`

      - `"DONE"`

    - `updated_at: Optional[datetime]`

      The timestamp when the message was last updated

  - `class StreamTaskMessageStart: …`

    Event for starting a streaming message

    - `content: TaskMessageContent`

    - `index: Optional[int]`

    - `parent_task_message: Optional[TaskMessage]`

      Represents a message in the agent system.

      This entity is used to store messages in MongoDB, with each message
      associated with a specific task.

      - `content: TaskMessageContent`

        The content of the message. This content is not OpenAI compatible. These are messages that are meant to be displayed to the user.

      - `task_id: str`

        ID of the task this message belongs to

      - `id: Optional[str]`

        The task message's unique id

      - `created_at: Optional[datetime]`

        The timestamp when the message was created

      - `streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]]`

      - `updated_at: Optional[datetime]`

        The timestamp when the message was last updated

    - `type: Optional[Literal["start"]]`

      - `"start"`

  - `class StreamTaskMessageDelta: …`

    Event for streaming chunks of content

    - `delta: Optional[TaskMessageDelta]`

      Delta for text updates

      - `class TextDelta: …`

        Delta for text updates

        - `text_delta: Optional[str]`

        - `type: Optional[Literal["text"]]`

          - `"text"`

      - `class DataDelta: …`

        Delta for data updates

        - `data_delta: Optional[str]`

        - `type: Optional[Literal["data"]]`

          - `"data"`

      - `class ToolRequestDelta: …`

        Delta for tool request updates

        - `name: str`

        - `tool_call_id: str`

        - `arguments_delta: Optional[str]`

        - `type: Optional[Literal["tool_request"]]`

          - `"tool_request"`

      - `class ToolResponseDelta: …`

        Delta for tool response updates

        - `name: str`

        - `tool_call_id: str`

        - `content_delta: Optional[str]`

        - `type: Optional[Literal["tool_response"]]`

          - `"tool_response"`

      - `class ReasoningSummaryDelta: …`

        Delta for reasoning summary updates

        - `summary_index: int`

        - `summary_delta: Optional[str]`

        - `type: Optional[Literal["reasoning_summary"]]`

          - `"reasoning_summary"`

      - `class ReasoningContentDelta: …`

        Delta for reasoning content updates

        - `content_index: int`

        - `content_delta: Optional[str]`

        - `type: Optional[Literal["reasoning_content"]]`

          - `"reasoning_content"`

    - `index: Optional[int]`

    - `parent_task_message: Optional[TaskMessage]`

      Represents a message in the agent system.

      This entity is used to store messages in MongoDB, with each message
      associated with a specific task.

    - `type: Optional[Literal["delta"]]`

      - `"delta"`

  - `class StreamTaskMessageFull: …`

    Event for streaming the full content

    - `content: TaskMessageContent`

    - `index: Optional[int]`

    - `parent_task_message: Optional[TaskMessage]`

      Represents a message in the agent system.

      This entity is used to store messages in MongoDB, with each message
      associated with a specific task.

    - `type: Optional[Literal["full"]]`

      - `"full"`

  - `class StreamTaskMessageDone: …`

    Event for indicating the task is done

    - `index: Optional[int]`

    - `parent_task_message: Optional[TaskMessage]`

      Represents a message in the agent system.

      This entity is used to store messages in MongoDB, with each message
      associated with a specific task.

    - `type: Optional[Literal["done"]]`

      - `"done"`

  - `class Task: …`

    - `id: str`

    - `cleaned_at: Optional[datetime]`

    - `created_at: Optional[datetime]`

    - `name: Optional[str]`

    - `params: Optional[Dict[str, object]]`

    - `status: Optional[Literal["CANCELED", "COMPLETED", "FAILED", 5 more]]`

      - `"CANCELED"`

      - `"COMPLETED"`

      - `"FAILED"`

      - `"RUNNING"`

      - `"INTERRUPTED"`

      - `"TERMINATED"`

      - `"TIMED_OUT"`

      - `"DELETED"`

    - `status_reason: Optional[str]`

    - `task_metadata: Optional[Dict[str, object]]`

    - `updated_at: Optional[datetime]`

  - `class Event: …`

    - `id: str`

      The UUID of the event

    - `agent_id: str`

      The UUID of the agent that the event belongs to

    - `sequence_id: int`

      The sequence ID of the event

    - `task_id: str`

      The UUID of the task that the event belongs to

    - `content: Optional[TaskMessageContent]`

      The content of the event

    - `created_at: Optional[datetime]`

      The timestamp of the event

### Data Delta

- `class DataDelta: …`

  Delta for data updates

  - `data_delta: Optional[str]`

  - `type: Optional[Literal["data"]]`

    - `"data"`

### Reasoning Content Delta

- `class ReasoningContentDelta: …`

  Delta for reasoning content updates

  - `content_index: int`

  - `content_delta: Optional[str]`

  - `type: Optional[Literal["reasoning_content"]]`

    - `"reasoning_content"`

### Reasoning Summary Delta

- `class ReasoningSummaryDelta: …`

  Delta for reasoning summary updates

  - `summary_index: int`

  - `summary_delta: Optional[str]`

  - `type: Optional[Literal["reasoning_summary"]]`

    - `"reasoning_summary"`

### Task Message Content

- `TaskMessageContent`

  - `class TextContent: …`

    - `author: MessageAuthor`

      The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

      - `"user"`

      - `"agent"`

    - `content: str`

      The contents of the text message.

    - `attachments: Optional[List[Attachment]]`

      Optional list of file attachments with structured metadata.

      - `file_id: str`

        The unique ID of the attached file

      - `name: str`

        The name of the file

      - `size: int`

        The size of the file in bytes

      - `type: str`

        The MIME type or content type of the file

    - `format: Optional[TextFormat]`

      The format of the message. This is used by the client to determine how to display the message.

      - `"markdown"`

      - `"plain"`

      - `"code"`

    - `style: Optional[MessageStyle]`

      The style of the message. This is used by the client to determine how to display the message.

      - `"static"`

      - `"active"`

    - `type: Optional[Literal["text"]]`

      The type of the message, in this case `text`.

      - `"text"`

  - `class ReasoningContent: …`

    - `author: MessageAuthor`

      The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

    - `summary: List[str]`

      A list of short reasoning summaries

    - `content: Optional[List[str]]`

      The reasoning content or chain-of-thought text

    - `style: Optional[MessageStyle]`

      The style of the message. This is used by the client to determine how to display the message.

    - `type: Optional[Literal["reasoning"]]`

      The type of the message, in this case `reasoning`.

      - `"reasoning"`

  - `class DataContent: …`

    - `author: MessageAuthor`

      The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

    - `data: Dict[str, object]`

      The contents of the data message.

    - `style: Optional[MessageStyle]`

      The style of the message. This is used by the client to determine how to display the message.

    - `type: Optional[Literal["data"]]`

      The type of the message, in this case `data`.

      - `"data"`

  - `class ToolRequestContent: …`

    - `arguments: Dict[str, object]`

      The arguments to the tool.

    - `author: MessageAuthor`

      The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

    - `name: str`

      The name of the tool that is being requested.

    - `tool_call_id: str`

      The ID of the tool call that is being requested.

    - `style: Optional[MessageStyle]`

      The style of the message. This is used by the client to determine how to display the message.

    - `type: Optional[Literal["tool_request"]]`

      The type of the message, in this case `tool_request`.

      - `"tool_request"`

  - `class ToolResponseContent: …`

    - `author: MessageAuthor`

      The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

    - `content: object`

      The result of the tool.

    - `name: str`

      The name of the tool that is being responded to.

    - `tool_call_id: str`

      The ID of the tool call that is being responded to.

    - `is_error: Optional[bool]`

      Whether the tool call resulted in an error. `None` when the harness does not report a status.

    - `style: Optional[MessageStyle]`

      The style of the message. This is used by the client to determine how to display the message.

    - `type: Optional[Literal["tool_response"]]`

      The type of the message, in this case `tool_response`.

      - `"tool_response"`

### Task Message Delta

- `TaskMessageDelta`

  Delta for text updates

  - `class TextDelta: …`

    Delta for text updates

    - `text_delta: Optional[str]`

    - `type: Optional[Literal["text"]]`

      - `"text"`

  - `class DataDelta: …`

    Delta for data updates

    - `data_delta: Optional[str]`

    - `type: Optional[Literal["data"]]`

      - `"data"`

  - `class ToolRequestDelta: …`

    Delta for tool request updates

    - `name: str`

    - `tool_call_id: str`

    - `arguments_delta: Optional[str]`

    - `type: Optional[Literal["tool_request"]]`

      - `"tool_request"`

  - `class ToolResponseDelta: …`

    Delta for tool response updates

    - `name: str`

    - `tool_call_id: str`

    - `content_delta: Optional[str]`

    - `type: Optional[Literal["tool_response"]]`

      - `"tool_response"`

  - `class ReasoningSummaryDelta: …`

    Delta for reasoning summary updates

    - `summary_index: int`

    - `summary_delta: Optional[str]`

    - `type: Optional[Literal["reasoning_summary"]]`

      - `"reasoning_summary"`

  - `class ReasoningContentDelta: …`

    Delta for reasoning content updates

    - `content_index: int`

    - `content_delta: Optional[str]`

    - `type: Optional[Literal["reasoning_content"]]`

      - `"reasoning_content"`

### Task Message Update

- `TaskMessageUpdate`

  Event for starting a streaming message

  - `class StreamTaskMessageStart: …`

    Event for starting a streaming message

    - `content: TaskMessageContent`

      - `class TextContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `"user"`

          - `"agent"`

        - `content: str`

          The contents of the text message.

        - `attachments: Optional[List[Attachment]]`

          Optional list of file attachments with structured metadata.

          - `file_id: str`

            The unique ID of the attached file

          - `name: str`

            The name of the file

          - `size: int`

            The size of the file in bytes

          - `type: str`

            The MIME type or content type of the file

        - `format: Optional[TextFormat]`

          The format of the message. This is used by the client to determine how to display the message.

          - `"markdown"`

          - `"plain"`

          - `"code"`

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

          - `"static"`

          - `"active"`

        - `type: Optional[Literal["text"]]`

          The type of the message, in this case `text`.

          - `"text"`

      - `class ReasoningContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `summary: List[str]`

          A list of short reasoning summaries

        - `content: Optional[List[str]]`

          The reasoning content or chain-of-thought text

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["reasoning"]]`

          The type of the message, in this case `reasoning`.

          - `"reasoning"`

      - `class DataContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `data: Dict[str, object]`

          The contents of the data message.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["data"]]`

          The type of the message, in this case `data`.

          - `"data"`

      - `class ToolRequestContent: …`

        - `arguments: Dict[str, object]`

          The arguments to the tool.

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `name: str`

          The name of the tool that is being requested.

        - `tool_call_id: str`

          The ID of the tool call that is being requested.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["tool_request"]]`

          The type of the message, in this case `tool_request`.

          - `"tool_request"`

      - `class ToolResponseContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `content: object`

          The result of the tool.

        - `name: str`

          The name of the tool that is being responded to.

        - `tool_call_id: str`

          The ID of the tool call that is being responded to.

        - `is_error: Optional[bool]`

          Whether the tool call resulted in an error. `None` when the harness does not report a status.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["tool_response"]]`

          The type of the message, in this case `tool_response`.

          - `"tool_response"`

    - `index: Optional[int]`

    - `parent_task_message: Optional[TaskMessage]`

      Represents a message in the agent system.

      This entity is used to store messages in MongoDB, with each message
      associated with a specific task.

      - `content: TaskMessageContent`

        The content of the message. This content is not OpenAI compatible. These are messages that are meant to be displayed to the user.

      - `task_id: str`

        ID of the task this message belongs to

      - `id: Optional[str]`

        The task message's unique id

      - `created_at: Optional[datetime]`

        The timestamp when the message was created

      - `streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]]`

        - `"IN_PROGRESS"`

        - `"DONE"`

      - `updated_at: Optional[datetime]`

        The timestamp when the message was last updated

    - `type: Optional[Literal["start"]]`

      - `"start"`

  - `class StreamTaskMessageDelta: …`

    Event for streaming chunks of content

    - `delta: Optional[TaskMessageDelta]`

      Delta for text updates

      - `class TextDelta: …`

        Delta for text updates

        - `text_delta: Optional[str]`

        - `type: Optional[Literal["text"]]`

          - `"text"`

      - `class DataDelta: …`

        Delta for data updates

        - `data_delta: Optional[str]`

        - `type: Optional[Literal["data"]]`

          - `"data"`

      - `class ToolRequestDelta: …`

        Delta for tool request updates

        - `name: str`

        - `tool_call_id: str`

        - `arguments_delta: Optional[str]`

        - `type: Optional[Literal["tool_request"]]`

          - `"tool_request"`

      - `class ToolResponseDelta: …`

        Delta for tool response updates

        - `name: str`

        - `tool_call_id: str`

        - `content_delta: Optional[str]`

        - `type: Optional[Literal["tool_response"]]`

          - `"tool_response"`

      - `class ReasoningSummaryDelta: …`

        Delta for reasoning summary updates

        - `summary_index: int`

        - `summary_delta: Optional[str]`

        - `type: Optional[Literal["reasoning_summary"]]`

          - `"reasoning_summary"`

      - `class ReasoningContentDelta: …`

        Delta for reasoning content updates

        - `content_index: int`

        - `content_delta: Optional[str]`

        - `type: Optional[Literal["reasoning_content"]]`

          - `"reasoning_content"`

    - `index: Optional[int]`

    - `parent_task_message: Optional[TaskMessage]`

      Represents a message in the agent system.

      This entity is used to store messages in MongoDB, with each message
      associated with a specific task.

    - `type: Optional[Literal["delta"]]`

      - `"delta"`

  - `class StreamTaskMessageFull: …`

    Event for streaming the full content

    - `content: TaskMessageContent`

    - `index: Optional[int]`

    - `parent_task_message: Optional[TaskMessage]`

      Represents a message in the agent system.

      This entity is used to store messages in MongoDB, with each message
      associated with a specific task.

    - `type: Optional[Literal["full"]]`

      - `"full"`

  - `class StreamTaskMessageDone: …`

    Event for indicating the task is done

    - `index: Optional[int]`

    - `parent_task_message: Optional[TaskMessage]`

      Represents a message in the agent system.

      This entity is used to store messages in MongoDB, with each message
      associated with a specific task.

    - `type: Optional[Literal["done"]]`

      - `"done"`

### Text Delta

- `class TextDelta: …`

  Delta for text updates

  - `text_delta: Optional[str]`

  - `type: Optional[Literal["text"]]`

    - `"text"`

### Tool Request Delta

- `class ToolRequestDelta: …`

  Delta for tool request updates

  - `name: str`

  - `tool_call_id: str`

  - `arguments_delta: Optional[str]`

  - `type: Optional[Literal["tool_request"]]`

    - `"tool_request"`

### Tool Response Delta

- `class ToolResponseDelta: …`

  Delta for tool response updates

  - `name: str`

  - `tool_call_id: str`

  - `content_delta: Optional[str]`

  - `type: Optional[Literal["tool_response"]]`

    - `"tool_response"`

### Agent List Response

- `List[Agent]`

  - `id: str`

    The unique identifier of the agent.

  - `acp_type: AcpType`

    The type of the ACP Server (Either sync or async)

    - `"sync"`

    - `"async"`

    - `"agentic"`

  - `created_at: datetime`

    The timestamp when the agent was created

  - `description: str`

    The description of the action.

  - `name: str`

    The unique name of the agent.

  - `updated_at: datetime`

    The timestamp when the agent was last updated

  - `agent_input_type: Optional[Literal["text", "json"]]`

    The type of input the agent expects.

    - `"text"`

    - `"json"`

  - `production_deployment_id: Optional[str]`

    ID of the current production deployment.

  - `registered_at: Optional[datetime]`

    The timestamp when the agent was last registered

  - `registration_metadata: Optional[Dict[str, object]]`

    The metadata for the agent's registration.

  - `status: Optional[Literal["Ready", "Failed", "Unknown", 3 more]]`

    The status of the action, indicating if it's building, ready, failed, etc.

    - `"Ready"`

    - `"Failed"`

    - `"Unknown"`

    - `"Deleted"`

    - `"Unhealthy"`

    - `"BuildOnly"`

  - `status_reason: Optional[str]`

    The reason for the status of the action.

# Deployments

## Create Deployment

`agents.deployments.create(stragent_id, DeploymentCreateParams**kwargs)  -> DeploymentCreateResponse`

**post** `/agents/{agent_id}/deployments`

Create a new deployment record in PENDING status.

### Parameters

- `agent_id: str`

- `docker_image: str`

  Full Docker image URI.

- `helm_release_name: Optional[str]`

  Helm release name.

- `registration_metadata: Optional[Dict[str, object]]`

  Git/build metadata (commit_hash, branch_name, author_name, author_email, build_timestamp).

- `sgp_deploy_id: Optional[str]`

  SGP deployment ID.

### Returns

- `class DeploymentCreateResponse: …`

  - `id: str`

    The unique identifier of the deployment.

  - `agent_id: str`

    The agent this deployment belongs to.

  - `docker_image: str`

    Full Docker image URI.

  - `is_production: bool`

    Whether this is the production deployment.

  - `status: Literal["Pending", "Ready", "Failed"]`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url: Optional[str]`

    ACP URL set when agent registers.

  - `created_at: Optional[datetime]`

    When the deployment was created.

  - `expires_at: Optional[datetime]`

    When marked for cleanup.

  - `helm_release_name: Optional[str]`

    Helm release name for cleanup.

  - `promoted_at: Optional[datetime]`

    When promoted to production.

  - `registration_metadata: Optional[Dict[str, object]]`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id: Optional[str]`

    Correlates to SGP's agentex_deploys.id.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
deployment = client.agents.deployments.create(
    agent_id="agent_id",
    docker_image="docker_image",
)
print(deployment.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "docker_image": "docker_image",
  "is_production": true,
  "status": "Pending",
  "acp_url": "acp_url",
  "created_at": "2019-12-27T18:11:19.117Z",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "helm_release_name": "helm_release_name",
  "promoted_at": "2019-12-27T18:11:19.117Z",
  "registration_metadata": {
    "foo": "bar"
  },
  "sgp_deploy_id": "sgp_deploy_id"
}
```

## List Deployments

`agents.deployments.list(stragent_id, DeploymentListParams**kwargs)  -> DeploymentListResponse`

**get** `/agents/{agent_id}/deployments`

List deployments for an agent, newest first.

### Parameters

- `agent_id: str`

- `limit: Optional[int]`

  Limit

- `order_by: Optional[str]`

  Field to order by

- `order_direction: Optional[str]`

  Order direction (asc or desc)

- `page_number: Optional[int]`

  Page number

### Returns

- `List[DeploymentListResponseItem]`

  - `id: str`

    The unique identifier of the deployment.

  - `agent_id: str`

    The agent this deployment belongs to.

  - `docker_image: str`

    Full Docker image URI.

  - `is_production: bool`

    Whether this is the production deployment.

  - `status: Literal["Pending", "Ready", "Failed"]`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url: Optional[str]`

    ACP URL set when agent registers.

  - `created_at: Optional[datetime]`

    When the deployment was created.

  - `expires_at: Optional[datetime]`

    When marked for cleanup.

  - `helm_release_name: Optional[str]`

    Helm release name for cleanup.

  - `promoted_at: Optional[datetime]`

    When promoted to production.

  - `registration_metadata: Optional[Dict[str, object]]`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id: Optional[str]`

    Correlates to SGP's agentex_deploys.id.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
deployments = client.agents.deployments.list(
    agent_id="agent_id",
)
print(deployments)
```

#### Response

```json
[
  {
    "id": "id",
    "agent_id": "agent_id",
    "docker_image": "docker_image",
    "is_production": true,
    "status": "Pending",
    "acp_url": "acp_url",
    "created_at": "2019-12-27T18:11:19.117Z",
    "expires_at": "2019-12-27T18:11:19.117Z",
    "helm_release_name": "helm_release_name",
    "promoted_at": "2019-12-27T18:11:19.117Z",
    "registration_metadata": {
      "foo": "bar"
    },
    "sgp_deploy_id": "sgp_deploy_id"
  }
]
```

## Get Deployment

`agents.deployments.retrieve(strdeployment_id, DeploymentRetrieveParams**kwargs)  -> DeploymentRetrieveResponse`

**get** `/agents/{agent_id}/deployments/{deployment_id}`

Get a specific deployment by ID.

### Parameters

- `agent_id: str`

- `deployment_id: str`

### Returns

- `class DeploymentRetrieveResponse: …`

  - `id: str`

    The unique identifier of the deployment.

  - `agent_id: str`

    The agent this deployment belongs to.

  - `docker_image: str`

    Full Docker image URI.

  - `is_production: bool`

    Whether this is the production deployment.

  - `status: Literal["Pending", "Ready", "Failed"]`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url: Optional[str]`

    ACP URL set when agent registers.

  - `created_at: Optional[datetime]`

    When the deployment was created.

  - `expires_at: Optional[datetime]`

    When marked for cleanup.

  - `helm_release_name: Optional[str]`

    Helm release name for cleanup.

  - `promoted_at: Optional[datetime]`

    When promoted to production.

  - `registration_metadata: Optional[Dict[str, object]]`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id: Optional[str]`

    Correlates to SGP's agentex_deploys.id.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
deployment = client.agents.deployments.retrieve(
    deployment_id="deployment_id",
    agent_id="agent_id",
)
print(deployment.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "docker_image": "docker_image",
  "is_production": true,
  "status": "Pending",
  "acp_url": "acp_url",
  "created_at": "2019-12-27T18:11:19.117Z",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "helm_release_name": "helm_release_name",
  "promoted_at": "2019-12-27T18:11:19.117Z",
  "registration_metadata": {
    "foo": "bar"
  },
  "sgp_deploy_id": "sgp_deploy_id"
}
```

## Delete Deployment

`agents.deployments.delete(strdeployment_id, DeploymentDeleteParams**kwargs)  -> DeleteResponse`

**delete** `/agents/{agent_id}/deployments/{deployment_id}`

Delete a non-production deployment.

### Parameters

- `agent_id: str`

- `deployment_id: str`

### Returns

- `class DeleteResponse: …`

  - `id: str`

  - `message: str`

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
delete_response = client.agents.deployments.delete(
    deployment_id="deployment_id",
    agent_id="agent_id",
)
print(delete_response.id)
```

#### Response

```json
{
  "id": "id",
  "message": "message"
}
```

## Promote Deployment

`agents.deployments.promote(strdeployment_id, DeploymentPromoteParams**kwargs)  -> DeploymentPromoteResponse`

**post** `/agents/{agent_id}/deployments/{deployment_id}/promote`

Promote a deployment to production with atomic cutover.

### Parameters

- `agent_id: str`

- `deployment_id: str`

### Returns

- `class DeploymentPromoteResponse: …`

  - `id: str`

    The unique identifier of the deployment.

  - `agent_id: str`

    The agent this deployment belongs to.

  - `docker_image: str`

    Full Docker image URI.

  - `is_production: bool`

    Whether this is the production deployment.

  - `status: Literal["Pending", "Ready", "Failed"]`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url: Optional[str]`

    ACP URL set when agent registers.

  - `created_at: Optional[datetime]`

    When the deployment was created.

  - `expires_at: Optional[datetime]`

    When marked for cleanup.

  - `helm_release_name: Optional[str]`

    Helm release name for cleanup.

  - `promoted_at: Optional[datetime]`

    When promoted to production.

  - `registration_metadata: Optional[Dict[str, object]]`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id: Optional[str]`

    Correlates to SGP's agentex_deploys.id.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
response = client.agents.deployments.promote(
    deployment_id="deployment_id",
    agent_id="agent_id",
)
print(response.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "docker_image": "docker_image",
  "is_production": true,
  "status": "Pending",
  "acp_url": "acp_url",
  "created_at": "2019-12-27T18:11:19.117Z",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "helm_release_name": "helm_release_name",
  "promoted_at": "2019-12-27T18:11:19.117Z",
  "registration_metadata": {
    "foo": "bar"
  },
  "sgp_deploy_id": "sgp_deploy_id"
}
```

## Preview RPC

`agents.deployments.preview_rpc(strdeployment_id, DeploymentPreviewRpcParams**kwargs)  -> AgentRpcResponse`

**post** `/agents/{agent_id}/deployments/{deployment_id}/rpc`

Send an RPC request to a specific deployment (for preview testing).

### Parameters

- `agent_id: str`

- `deployment_id: str`

- `method: Literal["event/send", "task/create", "message/send", 2 more]`

  - `"event/send"`

  - `"task/create"`

  - `"message/send"`

  - `"task/cancel"`

  - `"task/interrupt"`

- `params: Params`

  The parameters for the agent RPC request

  - `class ParamsCreateTaskRequest: …`

    - `name: Optional[str]`

      Optional human-readable name for the task. When set it must be globally unique. task/create is get-or-create by name: reusing an existing name returns the existing task (with its prior history) instead of creating a new one, so omit name (or make it unique, e.g. by appending a UUID) whenever each call should produce a fresh task.

    - `params: Optional[Dict[str, object]]`

      The parameters for the task. On a get-or-create by name, providing params overwrites the existing task's params (it is not a pure read).

    - `task_metadata: Optional[Dict[str, object]]`

      Caller-provided metadata to persist on the task row. Only applied at task creation; ignored if a task with this name already exists. Forwarded to the agent inside the ACP payload for backward compatibility.

  - `class ParamsCancelTaskRequest: …`

    - `task_id: Optional[str]`

      The ID of the task to cancel. Either this or task_name must be provided.

    - `task_name: Optional[str]`

      The name of the task to cancel. Either this or task_id must be provided.

  - `class ParamsInterruptTaskRequest: …`

    - `task_id: Optional[str]`

      The ID of the task to interrupt. Either this or task_name must be provided.

    - `task_name: Optional[str]`

      The name of the task to interrupt. Either this or task_id must be provided.

  - `class ParamsSendMessageRequest: …`

    - `content: TaskMessageContentParam`

      The message that was sent to the agent

      - `class TextContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `"user"`

          - `"agent"`

        - `content: str`

          The contents of the text message.

        - `attachments: Optional[List[Attachment]]`

          Optional list of file attachments with structured metadata.

          - `file_id: str`

            The unique ID of the attached file

          - `name: str`

            The name of the file

          - `size: int`

            The size of the file in bytes

          - `type: str`

            The MIME type or content type of the file

        - `format: Optional[TextFormat]`

          The format of the message. This is used by the client to determine how to display the message.

          - `"markdown"`

          - `"plain"`

          - `"code"`

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

          - `"static"`

          - `"active"`

        - `type: Optional[Literal["text"]]`

          The type of the message, in this case `text`.

          - `"text"`

      - `class ReasoningContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `summary: List[str]`

          A list of short reasoning summaries

        - `content: Optional[List[str]]`

          The reasoning content or chain-of-thought text

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["reasoning"]]`

          The type of the message, in this case `reasoning`.

          - `"reasoning"`

      - `class DataContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `data: Dict[str, object]`

          The contents of the data message.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["data"]]`

          The type of the message, in this case `data`.

          - `"data"`

      - `class ToolRequestContent: …`

        - `arguments: Dict[str, object]`

          The arguments to the tool.

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `name: str`

          The name of the tool that is being requested.

        - `tool_call_id: str`

          The ID of the tool call that is being requested.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["tool_request"]]`

          The type of the message, in this case `tool_request`.

          - `"tool_request"`

      - `class ToolResponseContent: …`

        - `author: MessageAuthor`

          The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

        - `content: object`

          The result of the tool.

        - `name: str`

          The name of the tool that is being responded to.

        - `tool_call_id: str`

          The ID of the tool call that is being responded to.

        - `is_error: Optional[bool]`

          Whether the tool call resulted in an error. `None` when the harness does not report a status.

        - `style: Optional[MessageStyle]`

          The style of the message. This is used by the client to determine how to display the message.

        - `type: Optional[Literal["tool_response"]]`

          The type of the message, in this case `tool_response`.

          - `"tool_response"`

    - `stream: Optional[bool]`

      Whether to stream the response message back to the client

    - `task_id: Optional[str]`

      The ID of the task that the message was sent to

    - `task_name: Optional[str]`

      The name of the task that the message was sent to

    - `task_params: Optional[Dict[str, object]]`

      The parameters for the task (only used when creating new tasks)

  - `class ParamsSendEventRequest: …`

    - `content: Optional[TaskMessageContentParam]`

      The content to send to the event

    - `task_id: Optional[str]`

      The ID of the task that the event was sent to

    - `task_name: Optional[str]`

      The name of the task that the event was sent to

- `id: Optional[Union[int, str, null]]`

  - `int`

  - `str`

- `jsonrpc: Optional[Literal["2.0"]]`

  - `"2.0"`

### Returns

- `class AgentRpcResponse: …`

  - `result: Optional[AgentRpcResult]`

    The result of the agent RPC request

    - `List[TaskMessage]`

      - `content: TaskMessageContent`

        The content of the message. This content is not OpenAI compatible. These are messages that are meant to be displayed to the user.

        - `class TextContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

            - `"user"`

            - `"agent"`

          - `content: str`

            The contents of the text message.

          - `attachments: Optional[List[Attachment]]`

            Optional list of file attachments with structured metadata.

            - `file_id: str`

              The unique ID of the attached file

            - `name: str`

              The name of the file

            - `size: int`

              The size of the file in bytes

            - `type: str`

              The MIME type or content type of the file

          - `format: Optional[TextFormat]`

            The format of the message. This is used by the client to determine how to display the message.

            - `"markdown"`

            - `"plain"`

            - `"code"`

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

            - `"static"`

            - `"active"`

          - `type: Optional[Literal["text"]]`

            The type of the message, in this case `text`.

            - `"text"`

        - `class ReasoningContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `summary: List[str]`

            A list of short reasoning summaries

          - `content: Optional[List[str]]`

            The reasoning content or chain-of-thought text

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["reasoning"]]`

            The type of the message, in this case `reasoning`.

            - `"reasoning"`

        - `class DataContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `data: Dict[str, object]`

            The contents of the data message.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["data"]]`

            The type of the message, in this case `data`.

            - `"data"`

        - `class ToolRequestContent: …`

          - `arguments: Dict[str, object]`

            The arguments to the tool.

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `name: str`

            The name of the tool that is being requested.

          - `tool_call_id: str`

            The ID of the tool call that is being requested.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["tool_request"]]`

            The type of the message, in this case `tool_request`.

            - `"tool_request"`

        - `class ToolResponseContent: …`

          - `author: MessageAuthor`

            The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.

          - `content: object`

            The result of the tool.

          - `name: str`

            The name of the tool that is being responded to.

          - `tool_call_id: str`

            The ID of the tool call that is being responded to.

          - `is_error: Optional[bool]`

            Whether the tool call resulted in an error. `None` when the harness does not report a status.

          - `style: Optional[MessageStyle]`

            The style of the message. This is used by the client to determine how to display the message.

          - `type: Optional[Literal["tool_response"]]`

            The type of the message, in this case `tool_response`.

            - `"tool_response"`

      - `task_id: str`

        ID of the task this message belongs to

      - `id: Optional[str]`

        The task message's unique id

      - `created_at: Optional[datetime]`

        The timestamp when the message was created

      - `streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]]`

        - `"IN_PROGRESS"`

        - `"DONE"`

      - `updated_at: Optional[datetime]`

        The timestamp when the message was last updated

    - `class StreamTaskMessageStart: …`

      Event for starting a streaming message

      - `content: TaskMessageContent`

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

        - `content: TaskMessageContent`

          The content of the message. This content is not OpenAI compatible. These are messages that are meant to be displayed to the user.

        - `task_id: str`

          ID of the task this message belongs to

        - `id: Optional[str]`

          The task message's unique id

        - `created_at: Optional[datetime]`

          The timestamp when the message was created

        - `streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]]`

        - `updated_at: Optional[datetime]`

          The timestamp when the message was last updated

      - `type: Optional[Literal["start"]]`

        - `"start"`

    - `class StreamTaskMessageDelta: …`

      Event for streaming chunks of content

      - `delta: Optional[TaskMessageDelta]`

        Delta for text updates

        - `class TextDelta: …`

          Delta for text updates

          - `text_delta: Optional[str]`

          - `type: Optional[Literal["text"]]`

            - `"text"`

        - `class DataDelta: …`

          Delta for data updates

          - `data_delta: Optional[str]`

          - `type: Optional[Literal["data"]]`

            - `"data"`

        - `class ToolRequestDelta: …`

          Delta for tool request updates

          - `name: str`

          - `tool_call_id: str`

          - `arguments_delta: Optional[str]`

          - `type: Optional[Literal["tool_request"]]`

            - `"tool_request"`

        - `class ToolResponseDelta: …`

          Delta for tool response updates

          - `name: str`

          - `tool_call_id: str`

          - `content_delta: Optional[str]`

          - `type: Optional[Literal["tool_response"]]`

            - `"tool_response"`

        - `class ReasoningSummaryDelta: …`

          Delta for reasoning summary updates

          - `summary_index: int`

          - `summary_delta: Optional[str]`

          - `type: Optional[Literal["reasoning_summary"]]`

            - `"reasoning_summary"`

        - `class ReasoningContentDelta: …`

          Delta for reasoning content updates

          - `content_index: int`

          - `content_delta: Optional[str]`

          - `type: Optional[Literal["reasoning_content"]]`

            - `"reasoning_content"`

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

      - `type: Optional[Literal["delta"]]`

        - `"delta"`

    - `class StreamTaskMessageFull: …`

      Event for streaming the full content

      - `content: TaskMessageContent`

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

      - `type: Optional[Literal["full"]]`

        - `"full"`

    - `class StreamTaskMessageDone: …`

      Event for indicating the task is done

      - `index: Optional[int]`

      - `parent_task_message: Optional[TaskMessage]`

        Represents a message in the agent system.

        This entity is used to store messages in MongoDB, with each message
        associated with a specific task.

      - `type: Optional[Literal["done"]]`

        - `"done"`

    - `class Task: …`

      - `id: str`

      - `cleaned_at: Optional[datetime]`

      - `created_at: Optional[datetime]`

      - `name: Optional[str]`

      - `params: Optional[Dict[str, object]]`

      - `status: Optional[Literal["CANCELED", "COMPLETED", "FAILED", 5 more]]`

        - `"CANCELED"`

        - `"COMPLETED"`

        - `"FAILED"`

        - `"RUNNING"`

        - `"INTERRUPTED"`

        - `"TERMINATED"`

        - `"TIMED_OUT"`

        - `"DELETED"`

      - `status_reason: Optional[str]`

      - `task_metadata: Optional[Dict[str, object]]`

      - `updated_at: Optional[datetime]`

    - `class Event: …`

      - `id: str`

        The UUID of the event

      - `agent_id: str`

        The UUID of the agent that the event belongs to

      - `sequence_id: int`

        The sequence ID of the event

      - `task_id: str`

        The UUID of the task that the event belongs to

      - `content: Optional[TaskMessageContent]`

        The content of the event

      - `created_at: Optional[datetime]`

        The timestamp of the event

  - `id: Optional[Union[int, str, null]]`

    - `int`

    - `str`

  - `error: Optional[object]`

  - `jsonrpc: Optional[Literal["2.0"]]`

    - `"2.0"`

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
agent_rpc_response = client.agents.deployments.preview_rpc(
    deployment_id="deployment_id",
    agent_id="agent_id",
    method="event/send",
    params={},
)
print(agent_rpc_response.id)
```

#### Response

```json
{
  "result": [
    {
      "content": {
        "author": "user",
        "content": "content",
        "attachments": [
          {
            "file_id": "file_id",
            "name": "name",
            "size": 0,
            "type": "type"
          }
        ],
        "format": "markdown",
        "style": "static",
        "type": "text"
      },
      "task_id": "task_id",
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "streaming_status": "IN_PROGRESS",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "id": 0,
  "error": {},
  "jsonrpc": "2.0"
}
```

## Domain Types

### Deployment Create Response

- `class DeploymentCreateResponse: …`

  - `id: str`

    The unique identifier of the deployment.

  - `agent_id: str`

    The agent this deployment belongs to.

  - `docker_image: str`

    Full Docker image URI.

  - `is_production: bool`

    Whether this is the production deployment.

  - `status: Literal["Pending", "Ready", "Failed"]`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url: Optional[str]`

    ACP URL set when agent registers.

  - `created_at: Optional[datetime]`

    When the deployment was created.

  - `expires_at: Optional[datetime]`

    When marked for cleanup.

  - `helm_release_name: Optional[str]`

    Helm release name for cleanup.

  - `promoted_at: Optional[datetime]`

    When promoted to production.

  - `registration_metadata: Optional[Dict[str, object]]`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id: Optional[str]`

    Correlates to SGP's agentex_deploys.id.

### Deployment List Response

- `List[DeploymentListResponseItem]`

  - `id: str`

    The unique identifier of the deployment.

  - `agent_id: str`

    The agent this deployment belongs to.

  - `docker_image: str`

    Full Docker image URI.

  - `is_production: bool`

    Whether this is the production deployment.

  - `status: Literal["Pending", "Ready", "Failed"]`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url: Optional[str]`

    ACP URL set when agent registers.

  - `created_at: Optional[datetime]`

    When the deployment was created.

  - `expires_at: Optional[datetime]`

    When marked for cleanup.

  - `helm_release_name: Optional[str]`

    Helm release name for cleanup.

  - `promoted_at: Optional[datetime]`

    When promoted to production.

  - `registration_metadata: Optional[Dict[str, object]]`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id: Optional[str]`

    Correlates to SGP's agentex_deploys.id.

### Deployment Retrieve Response

- `class DeploymentRetrieveResponse: …`

  - `id: str`

    The unique identifier of the deployment.

  - `agent_id: str`

    The agent this deployment belongs to.

  - `docker_image: str`

    Full Docker image URI.

  - `is_production: bool`

    Whether this is the production deployment.

  - `status: Literal["Pending", "Ready", "Failed"]`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url: Optional[str]`

    ACP URL set when agent registers.

  - `created_at: Optional[datetime]`

    When the deployment was created.

  - `expires_at: Optional[datetime]`

    When marked for cleanup.

  - `helm_release_name: Optional[str]`

    Helm release name for cleanup.

  - `promoted_at: Optional[datetime]`

    When promoted to production.

  - `registration_metadata: Optional[Dict[str, object]]`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id: Optional[str]`

    Correlates to SGP's agentex_deploys.id.

### Deployment Promote Response

- `class DeploymentPromoteResponse: …`

  - `id: str`

    The unique identifier of the deployment.

  - `agent_id: str`

    The agent this deployment belongs to.

  - `docker_image: str`

    Full Docker image URI.

  - `is_production: bool`

    Whether this is the production deployment.

  - `status: Literal["Pending", "Ready", "Failed"]`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url: Optional[str]`

    ACP URL set when agent registers.

  - `created_at: Optional[datetime]`

    When the deployment was created.

  - `expires_at: Optional[datetime]`

    When marked for cleanup.

  - `helm_release_name: Optional[str]`

    Helm release name for cleanup.

  - `promoted_at: Optional[datetime]`

    When promoted to production.

  - `registration_metadata: Optional[Dict[str, object]]`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id: Optional[str]`

    Correlates to SGP's agentex_deploys.id.

# Schedules

## Create Run Schedule

`agents.schedules.create(stragent_id, ScheduleCreateParams**kwargs)  -> ScheduleCreateResponse`

**post** `/agents/{agent_id}/schedules`

Create a recurring schedule that starts a fresh agent run on each fire.

### Parameters

- `agent_id: str`

- `initial_input: InitialInput`

  The first input delivered to each created task.

  - `content: str`

    The initial prompt delivered to the task.

  - `author: Optional[MessageAuthor]`

    The author attributed to the initial input.

    - `"user"`

    - `"agent"`

  - `type: Optional[Literal["text"]]`

    Input content type.

    - `"text"`

- `name: str`

  Human-readable name, unique among active schedules for the agent.

- `cron_expression: Optional[str]`

  Cron expression for the cadence (e.g. '0 17 * * MON-FRI'). Mutually exclusive with interval_seconds.

- `description: Optional[str]`

  Optional description of what this schedule does.

- `end_at: Optional[Union[str, datetime, null]]`

  When the schedule should stop being active.

- `interval_seconds: Optional[int]`

  Interval cadence in seconds. Mutually exclusive with cron_expression.

- `paused: Optional[bool]`

  Whether to create the schedule in a paused state.

- `start_at: Optional[Union[str, datetime, null]]`

  When the schedule should start being active.

- `task_metadata: Optional[Dict[str, object]]`

  Metadata copied onto each created task at fire time.

- `task_params: Optional[Dict[str, object]]`

  Resolved config forwarded as task `params` at fire time.

- `timezone: Optional[str]`

  IANA timezone the cron expression is evaluated in (e.g. 'America/New_York').

### Returns

- `class ScheduleCreateResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
schedule = client.agents.schedules.create(
    agent_id="agent_id",
    initial_input={
        "content": "content"
    },
    name="name",
)
print(schedule.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "initial_input": {
    "content": "content",
    "author": "user",
    "type": "text"
  },
  "initial_input_method": "initial_input_method",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "creator_principal": {
    "account_id": "account_id",
    "principal_type": "principal_type",
    "service_account_id": "service_account_id",
    "user_id": "user_id"
  },
  "cron_expression": "cron_expression",
  "description": "description",
  "end_at": "2019-12-27T18:11:19.117Z",
  "interval_seconds": 0,
  "last_action_time": "2019-12-27T18:11:19.117Z",
  "live_data_available": true,
  "next_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "num_actions_taken": 0,
  "paused": true,
  "skipped_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "start_at": "2019-12-27T18:11:19.117Z",
  "state": "ACTIVE",
  "task_metadata": {
    "foo": "bar"
  },
  "task_params": {
    "foo": "bar"
  },
  "timezone": "timezone",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## List Run Schedules

`agents.schedules.list(stragent_id, ScheduleListParams**kwargs)  -> ScheduleListResponse`

**get** `/agents/{agent_id}/schedules`

List run schedules for an agent.

### Parameters

- `agent_id: str`

- `include_live: Optional[bool]`

  Include live Temporal state and upcoming action times.

- `limit: Optional[int]`

### Returns

- `class ScheduleListResponse: …`

  Response model for listing run schedules.

  - `run_schedules: List[RunSchedule]`

    The list of run schedules.

    - `id: str`

      The unique identifier of the run schedule.

    - `agent_id: str`

      The agent this schedule belongs to.

    - `initial_input: RunScheduleInitialInput`

      The initial input.

      - `content: str`

        The initial prompt delivered to the task.

      - `author: Optional[MessageAuthor]`

        The author attributed to the initial input.

        - `"user"`

        - `"agent"`

      - `type: Optional[Literal["text"]]`

        Input content type.

        - `"text"`

    - `initial_input_method: str`

      Delivery method, inferred from the agent's ACP type.

    - `name: str`

      Human-readable schedule name.

    - `created_at: Optional[datetime]`

      When the schedule was created.

    - `creator_principal: Optional[RunScheduleCreatorPrincipal]`

      Credential-free creator identity stored with the schedule.

      Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
      is creator *context* used only for AuthZ and ownership at fire time.

      - `account_id: Optional[str]`

        Account/workspace id of the creator.

      - `principal_type: Optional[str]`

        e.g. 'user' or 'service_account'.

      - `service_account_id: Optional[str]`

        Creator service-account id, if a service principal.

      - `user_id: Optional[str]`

        Creator user id, if a user principal.

    - `cron_expression: Optional[str]`

      Cron cadence, if cron-based.

    - `description: Optional[str]`

      Optional description.

    - `end_at: Optional[datetime]`

      Schedule deactivation time.

    - `interval_seconds: Optional[int]`

      Interval cadence in seconds, if interval-based.

    - `last_action_time: Optional[datetime]`

      When the schedule last fired.

    - `live_data_available: Optional[bool]`

      Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

    - `next_action_times: Optional[List[datetime]]`

      Upcoming scheduled fire times.

    - `num_actions_taken: Optional[int]`

      Number of times the schedule has fired.

    - `paused: Optional[bool]`

      Whether the schedule is paused.

    - `skipped_action_times: Optional[List[datetime]]`

      Skipped one-off scheduled fire times.

    - `start_at: Optional[datetime]`

      Schedule activation time.

    - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

      Live schedule state from Temporal.

      - `"ACTIVE"`

      - `"PAUSED"`

    - `task_metadata: Optional[Dict[str, object]]`

      Task metadata at fire time.

    - `task_params: Optional[Dict[str, object]]`

      Task params at fire time.

    - `timezone: Optional[str]`

      Timezone the cron expression is evaluated in.

    - `updated_at: Optional[datetime]`

      When the schedule was updated.

  - `total: int`

    The number of run schedules returned.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
schedules = client.agents.schedules.list(
    agent_id="agent_id",
)
print(schedules.run_schedules)
```

#### Response

```json
{
  "run_schedules": [
    {
      "id": "id",
      "agent_id": "agent_id",
      "initial_input": {
        "content": "content",
        "author": "user",
        "type": "text"
      },
      "initial_input_method": "initial_input_method",
      "name": "name",
      "created_at": "2019-12-27T18:11:19.117Z",
      "creator_principal": {
        "account_id": "account_id",
        "principal_type": "principal_type",
        "service_account_id": "service_account_id",
        "user_id": "user_id"
      },
      "cron_expression": "cron_expression",
      "description": "description",
      "end_at": "2019-12-27T18:11:19.117Z",
      "interval_seconds": 0,
      "last_action_time": "2019-12-27T18:11:19.117Z",
      "live_data_available": true,
      "next_action_times": [
        "2019-12-27T18:11:19.117Z"
      ],
      "num_actions_taken": 0,
      "paused": true,
      "skipped_action_times": [
        "2019-12-27T18:11:19.117Z"
      ],
      "start_at": "2019-12-27T18:11:19.117Z",
      "state": "ACTIVE",
      "task_metadata": {
        "foo": "bar"
      },
      "task_params": {
        "foo": "bar"
      },
      "timezone": "timezone",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "total": 0
}
```

## Get Run Schedule

`agents.schedules.retrieve(strschedule_id, ScheduleRetrieveParams**kwargs)  -> ScheduleRetrieveResponse`

**get** `/agents/{agent_id}/schedules/{schedule_id}`

Get a run schedule by its id.

### Parameters

- `agent_id: str`

- `schedule_id: str`

### Returns

- `class ScheduleRetrieveResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
schedule = client.agents.schedules.retrieve(
    schedule_id="schedule_id",
    agent_id="agent_id",
)
print(schedule.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "initial_input": {
    "content": "content",
    "author": "user",
    "type": "text"
  },
  "initial_input_method": "initial_input_method",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "creator_principal": {
    "account_id": "account_id",
    "principal_type": "principal_type",
    "service_account_id": "service_account_id",
    "user_id": "user_id"
  },
  "cron_expression": "cron_expression",
  "description": "description",
  "end_at": "2019-12-27T18:11:19.117Z",
  "interval_seconds": 0,
  "last_action_time": "2019-12-27T18:11:19.117Z",
  "live_data_available": true,
  "next_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "num_actions_taken": 0,
  "paused": true,
  "skipped_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "start_at": "2019-12-27T18:11:19.117Z",
  "state": "ACTIVE",
  "task_metadata": {
    "foo": "bar"
  },
  "task_params": {
    "foo": "bar"
  },
  "timezone": "timezone",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Update Run Schedule

`agents.schedules.update(strschedule_id, ScheduleUpdateParams**kwargs)  -> ScheduleUpdateResponse`

**patch** `/agents/{agent_id}/schedules/{schedule_id}`

Partially update a run schedule's definition (cadence, window, input, etc.).

### Parameters

- `agent_id: str`

- `schedule_id: str`

- `cron_expression: Optional[str]`

  New cron cadence. Mutually exclusive with interval_seconds.

- `description: Optional[str]`

  Optional description of what this schedule does.

- `end_at: Optional[Union[str, datetime, null]]`

  When the schedule should stop being active.

- `initial_input: Optional[InitialInput]`

  The first input delivered to each freshly created scheduled task.

  - `content: str`

    The initial prompt delivered to the task.

  - `author: Optional[MessageAuthor]`

    The author attributed to the initial input.

    - `"user"`

    - `"agent"`

  - `type: Optional[Literal["text"]]`

    Input content type.

    - `"text"`

- `interval_seconds: Optional[int]`

  New interval cadence in seconds. Mutually exclusive with cron_expression.

- `name: Optional[str]`

  Human-readable name, unique among active schedules for the agent.

- `paused: Optional[bool]`

  Pause/resume the schedule as part of the update.

- `start_at: Optional[Union[str, datetime, null]]`

  When the schedule should start being active.

- `task_metadata: Optional[Dict[str, object]]`

  Metadata copied onto each created task at fire time.

- `task_params: Optional[Dict[str, object]]`

  Resolved config forwarded as task `params` at fire time.

- `timezone: Optional[str]`

  IANA timezone the cron expression is evaluated in.

### Returns

- `class ScheduleUpdateResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
schedule = client.agents.schedules.update(
    schedule_id="schedule_id",
    agent_id="agent_id",
)
print(schedule.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "initial_input": {
    "content": "content",
    "author": "user",
    "type": "text"
  },
  "initial_input_method": "initial_input_method",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "creator_principal": {
    "account_id": "account_id",
    "principal_type": "principal_type",
    "service_account_id": "service_account_id",
    "user_id": "user_id"
  },
  "cron_expression": "cron_expression",
  "description": "description",
  "end_at": "2019-12-27T18:11:19.117Z",
  "interval_seconds": 0,
  "last_action_time": "2019-12-27T18:11:19.117Z",
  "live_data_available": true,
  "next_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "num_actions_taken": 0,
  "paused": true,
  "skipped_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "start_at": "2019-12-27T18:11:19.117Z",
  "state": "ACTIVE",
  "task_metadata": {
    "foo": "bar"
  },
  "task_params": {
    "foo": "bar"
  },
  "timezone": "timezone",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Delete Run Schedule

`agents.schedules.delete(strschedule_id, ScheduleDeleteParams**kwargs)  -> DeleteResponse`

**delete** `/agents/{agent_id}/schedules/{schedule_id}`

Delete a run schedule permanently.

### Parameters

- `agent_id: str`

- `schedule_id: str`

### Returns

- `class DeleteResponse: …`

  - `id: str`

  - `message: str`

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
delete_response = client.agents.schedules.delete(
    schedule_id="schedule_id",
    agent_id="agent_id",
)
print(delete_response.id)
```

#### Response

```json
{
  "id": "id",
  "message": "message"
}
```

## Pause Run Schedule

`agents.schedules.pause(strschedule_id, SchedulePauseParams**kwargs)  -> SchedulePauseResponse`

**post** `/agents/{agent_id}/schedules/{schedule_id}/pause`

Pause a run schedule so it stops firing.

### Parameters

- `agent_id: str`

- `schedule_id: str`

- `note: Optional[str]`

  Optional note explaining the pause.

### Returns

- `class SchedulePauseResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
response = client.agents.schedules.pause(
    schedule_id="schedule_id",
    agent_id="agent_id",
)
print(response.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "initial_input": {
    "content": "content",
    "author": "user",
    "type": "text"
  },
  "initial_input_method": "initial_input_method",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "creator_principal": {
    "account_id": "account_id",
    "principal_type": "principal_type",
    "service_account_id": "service_account_id",
    "user_id": "user_id"
  },
  "cron_expression": "cron_expression",
  "description": "description",
  "end_at": "2019-12-27T18:11:19.117Z",
  "interval_seconds": 0,
  "last_action_time": "2019-12-27T18:11:19.117Z",
  "live_data_available": true,
  "next_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "num_actions_taken": 0,
  "paused": true,
  "skipped_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "start_at": "2019-12-27T18:11:19.117Z",
  "state": "ACTIVE",
  "task_metadata": {
    "foo": "bar"
  },
  "task_params": {
    "foo": "bar"
  },
  "timezone": "timezone",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Resume Run Schedule

`agents.schedules.resume(strschedule_id, ScheduleResumeParams**kwargs)  -> ScheduleResumeResponse`

**post** `/agents/{agent_id}/schedules/{schedule_id}/resume`

Resume a paused run schedule so it fires again.

### Parameters

- `agent_id: str`

- `schedule_id: str`

- `note: Optional[str]`

  Optional note explaining the resume.

### Returns

- `class ScheduleResumeResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
response = client.agents.schedules.resume(
    schedule_id="schedule_id",
    agent_id="agent_id",
)
print(response.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "initial_input": {
    "content": "content",
    "author": "user",
    "type": "text"
  },
  "initial_input_method": "initial_input_method",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "creator_principal": {
    "account_id": "account_id",
    "principal_type": "principal_type",
    "service_account_id": "service_account_id",
    "user_id": "user_id"
  },
  "cron_expression": "cron_expression",
  "description": "description",
  "end_at": "2019-12-27T18:11:19.117Z",
  "interval_seconds": 0,
  "last_action_time": "2019-12-27T18:11:19.117Z",
  "live_data_available": true,
  "next_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "num_actions_taken": 0,
  "paused": true,
  "skipped_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "start_at": "2019-12-27T18:11:19.117Z",
  "state": "ACTIVE",
  "task_metadata": {
    "foo": "bar"
  },
  "task_params": {
    "foo": "bar"
  },
  "timezone": "timezone",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Trigger Run Schedule

`agents.schedules.trigger(strschedule_id, ScheduleTriggerParams**kwargs)  -> ScheduleTriggerResponse`

**post** `/agents/{agent_id}/schedules/{schedule_id}/trigger`

Trigger an immediate, out-of-band run of the schedule (in addition to its cadence).

### Parameters

- `agent_id: str`

- `schedule_id: str`

### Returns

- `class ScheduleTriggerResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
response = client.agents.schedules.trigger(
    schedule_id="schedule_id",
    agent_id="agent_id",
)
print(response.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "initial_input": {
    "content": "content",
    "author": "user",
    "type": "text"
  },
  "initial_input_method": "initial_input_method",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "creator_principal": {
    "account_id": "account_id",
    "principal_type": "principal_type",
    "service_account_id": "service_account_id",
    "user_id": "user_id"
  },
  "cron_expression": "cron_expression",
  "description": "description",
  "end_at": "2019-12-27T18:11:19.117Z",
  "interval_seconds": 0,
  "last_action_time": "2019-12-27T18:11:19.117Z",
  "live_data_available": true,
  "next_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "num_actions_taken": 0,
  "paused": true,
  "skipped_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "start_at": "2019-12-27T18:11:19.117Z",
  "state": "ACTIVE",
  "task_metadata": {
    "foo": "bar"
  },
  "task_params": {
    "foo": "bar"
  },
  "timezone": "timezone",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Skip Run Schedule Action

`agents.schedules.skip(strschedule_id, ScheduleSkipParams**kwargs)  -> ScheduleSkipResponse`

**post** `/agents/{agent_id}/schedules/{schedule_id}/skip`

Skip a recurring fire of the schedule.

### Parameters

- `agent_id: str`

- `schedule_id: str`

- `scheduled_time: Union[str, datetime]`

  Specific scheduled fire time to skip.

### Returns

- `class ScheduleSkipResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Example

```python
import os
from datetime import datetime
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
response = client.agents.schedules.skip(
    schedule_id="schedule_id",
    agent_id="agent_id",
    scheduled_time=datetime.fromisoformat("2019-12-27T18:11:19.117"),
)
print(response.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "initial_input": {
    "content": "content",
    "author": "user",
    "type": "text"
  },
  "initial_input_method": "initial_input_method",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "creator_principal": {
    "account_id": "account_id",
    "principal_type": "principal_type",
    "service_account_id": "service_account_id",
    "user_id": "user_id"
  },
  "cron_expression": "cron_expression",
  "description": "description",
  "end_at": "2019-12-27T18:11:19.117Z",
  "interval_seconds": 0,
  "last_action_time": "2019-12-27T18:11:19.117Z",
  "live_data_available": true,
  "next_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "num_actions_taken": 0,
  "paused": true,
  "skipped_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "start_at": "2019-12-27T18:11:19.117Z",
  "state": "ACTIVE",
  "task_metadata": {
    "foo": "bar"
  },
  "task_params": {
    "foo": "bar"
  },
  "timezone": "timezone",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Unskip Run Schedule Action

`agents.schedules.unskip(strschedule_id, ScheduleUnskipParams**kwargs)  -> ScheduleUnskipResponse`

**post** `/agents/{agent_id}/schedules/{schedule_id}/unskip`

Remove a skip for a recurring fire of the schedule.

### Parameters

- `agent_id: str`

- `schedule_id: str`

- `scheduled_time: Union[str, datetime]`

  Specific scheduled fire time to unskip.

### Returns

- `class ScheduleUnskipResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Example

```python
import os
from datetime import datetime
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
response = client.agents.schedules.unskip(
    schedule_id="schedule_id",
    agent_id="agent_id",
    scheduled_time=datetime.fromisoformat("2019-12-27T18:11:19.117"),
)
print(response.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "initial_input": {
    "content": "content",
    "author": "user",
    "type": "text"
  },
  "initial_input_method": "initial_input_method",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "creator_principal": {
    "account_id": "account_id",
    "principal_type": "principal_type",
    "service_account_id": "service_account_id",
    "user_id": "user_id"
  },
  "cron_expression": "cron_expression",
  "description": "description",
  "end_at": "2019-12-27T18:11:19.117Z",
  "interval_seconds": 0,
  "last_action_time": "2019-12-27T18:11:19.117Z",
  "live_data_available": true,
  "next_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "num_actions_taken": 0,
  "paused": true,
  "skipped_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "start_at": "2019-12-27T18:11:19.117Z",
  "state": "ACTIVE",
  "task_metadata": {
    "foo": "bar"
  },
  "task_params": {
    "foo": "bar"
  },
  "timezone": "timezone",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Get Run Schedule By Name

`agents.schedules.retrieve_by_name(strname, ScheduleRetrieveByNameParams**kwargs)  -> ScheduleRetrieveByNameResponse`

**get** `/agents/{agent_id}/schedules/name/{name}`

Get a run schedule by its active name.

### Parameters

- `agent_id: str`

- `name: str`

### Returns

- `class ScheduleRetrieveByNameResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
response = client.agents.schedules.retrieve_by_name(
    name="name",
    agent_id="agent_id",
)
print(response.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "initial_input": {
    "content": "content",
    "author": "user",
    "type": "text"
  },
  "initial_input_method": "initial_input_method",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "creator_principal": {
    "account_id": "account_id",
    "principal_type": "principal_type",
    "service_account_id": "service_account_id",
    "user_id": "user_id"
  },
  "cron_expression": "cron_expression",
  "description": "description",
  "end_at": "2019-12-27T18:11:19.117Z",
  "interval_seconds": 0,
  "last_action_time": "2019-12-27T18:11:19.117Z",
  "live_data_available": true,
  "next_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "num_actions_taken": 0,
  "paused": true,
  "skipped_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "start_at": "2019-12-27T18:11:19.117Z",
  "state": "ACTIVE",
  "task_metadata": {
    "foo": "bar"
  },
  "task_params": {
    "foo": "bar"
  },
  "timezone": "timezone",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Update Run Schedule By Name

`agents.schedules.update_by_name(strpath_name, ScheduleUpdateByNameParams**kwargs)  -> ScheduleUpdateByNameResponse`

**patch** `/agents/{agent_id}/schedules/name/{name}`

Partially update a run schedule's definition by its active name.

### Parameters

- `agent_id: str`

- `name: str`

- `cron_expression: Optional[str]`

  New cron cadence. Mutually exclusive with interval_seconds.

- `description: Optional[str]`

  Optional description of what this schedule does.

- `end_at: Optional[Union[str, datetime, null]]`

  When the schedule should stop being active.

- `initial_input: Optional[InitialInput]`

  The first input delivered to each freshly created scheduled task.

  - `content: str`

    The initial prompt delivered to the task.

  - `author: Optional[MessageAuthor]`

    The author attributed to the initial input.

    - `"user"`

    - `"agent"`

  - `type: Optional[Literal["text"]]`

    Input content type.

    - `"text"`

- `interval_seconds: Optional[int]`

  New interval cadence in seconds. Mutually exclusive with cron_expression.

- `name: str`

- `paused: Optional[bool]`

  Pause/resume the schedule as part of the update.

- `start_at: Optional[Union[str, datetime, null]]`

  When the schedule should start being active.

- `task_metadata: Optional[Dict[str, object]]`

  Metadata copied onto each created task at fire time.

- `task_params: Optional[Dict[str, object]]`

  Resolved config forwarded as task `params` at fire time.

- `timezone: Optional[str]`

  IANA timezone the cron expression is evaluated in.

### Returns

- `class ScheduleUpdateByNameResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
response = client.agents.schedules.update_by_name(
    path_name="name",
    agent_id="agent_id",
)
print(response.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "initial_input": {
    "content": "content",
    "author": "user",
    "type": "text"
  },
  "initial_input_method": "initial_input_method",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "creator_principal": {
    "account_id": "account_id",
    "principal_type": "principal_type",
    "service_account_id": "service_account_id",
    "user_id": "user_id"
  },
  "cron_expression": "cron_expression",
  "description": "description",
  "end_at": "2019-12-27T18:11:19.117Z",
  "interval_seconds": 0,
  "last_action_time": "2019-12-27T18:11:19.117Z",
  "live_data_available": true,
  "next_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "num_actions_taken": 0,
  "paused": true,
  "skipped_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "start_at": "2019-12-27T18:11:19.117Z",
  "state": "ACTIVE",
  "task_metadata": {
    "foo": "bar"
  },
  "task_params": {
    "foo": "bar"
  },
  "timezone": "timezone",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Delete Run Schedule By Name

`agents.schedules.delete_by_name(strname, ScheduleDeleteByNameParams**kwargs)  -> DeleteResponse`

**delete** `/agents/{agent_id}/schedules/name/{name}`

Delete a run schedule by its active name.

### Parameters

- `agent_id: str`

- `name: str`

### Returns

- `class DeleteResponse: …`

  - `id: str`

  - `message: str`

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
delete_response = client.agents.schedules.delete_by_name(
    name="name",
    agent_id="agent_id",
)
print(delete_response.id)
```

#### Response

```json
{
  "id": "id",
  "message": "message"
}
```

## Pause Run Schedule By Name

`agents.schedules.pause_by_name(strname, SchedulePauseByNameParams**kwargs)  -> SchedulePauseByNameResponse`

**post** `/agents/{agent_id}/schedules/name/{name}/pause`

Pause a run schedule by its active name.

### Parameters

- `agent_id: str`

- `name: str`

- `note: Optional[str]`

  Optional note explaining the pause.

### Returns

- `class SchedulePauseByNameResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
response = client.agents.schedules.pause_by_name(
    name="name",
    agent_id="agent_id",
)
print(response.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "initial_input": {
    "content": "content",
    "author": "user",
    "type": "text"
  },
  "initial_input_method": "initial_input_method",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "creator_principal": {
    "account_id": "account_id",
    "principal_type": "principal_type",
    "service_account_id": "service_account_id",
    "user_id": "user_id"
  },
  "cron_expression": "cron_expression",
  "description": "description",
  "end_at": "2019-12-27T18:11:19.117Z",
  "interval_seconds": 0,
  "last_action_time": "2019-12-27T18:11:19.117Z",
  "live_data_available": true,
  "next_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "num_actions_taken": 0,
  "paused": true,
  "skipped_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "start_at": "2019-12-27T18:11:19.117Z",
  "state": "ACTIVE",
  "task_metadata": {
    "foo": "bar"
  },
  "task_params": {
    "foo": "bar"
  },
  "timezone": "timezone",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Resume Run Schedule By Name

`agents.schedules.resume_by_name(strname, ScheduleResumeByNameParams**kwargs)  -> ScheduleResumeByNameResponse`

**post** `/agents/{agent_id}/schedules/name/{name}/resume`

Resume a paused run schedule by its active name.

### Parameters

- `agent_id: str`

- `name: str`

- `note: Optional[str]`

  Optional note explaining the resume.

### Returns

- `class ScheduleResumeByNameResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
response = client.agents.schedules.resume_by_name(
    name="name",
    agent_id="agent_id",
)
print(response.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "initial_input": {
    "content": "content",
    "author": "user",
    "type": "text"
  },
  "initial_input_method": "initial_input_method",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "creator_principal": {
    "account_id": "account_id",
    "principal_type": "principal_type",
    "service_account_id": "service_account_id",
    "user_id": "user_id"
  },
  "cron_expression": "cron_expression",
  "description": "description",
  "end_at": "2019-12-27T18:11:19.117Z",
  "interval_seconds": 0,
  "last_action_time": "2019-12-27T18:11:19.117Z",
  "live_data_available": true,
  "next_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "num_actions_taken": 0,
  "paused": true,
  "skipped_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "start_at": "2019-12-27T18:11:19.117Z",
  "state": "ACTIVE",
  "task_metadata": {
    "foo": "bar"
  },
  "task_params": {
    "foo": "bar"
  },
  "timezone": "timezone",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Trigger Run Schedule By Name

`agents.schedules.trigger_by_name(strname, ScheduleTriggerByNameParams**kwargs)  -> ScheduleTriggerByNameResponse`

**post** `/agents/{agent_id}/schedules/name/{name}/trigger`

Trigger an immediate, out-of-band run of the schedule by its active name.

### Parameters

- `agent_id: str`

- `name: str`

### Returns

- `class ScheduleTriggerByNameResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Example

```python
import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
response = client.agents.schedules.trigger_by_name(
    name="name",
    agent_id="agent_id",
)
print(response.id)
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "initial_input": {
    "content": "content",
    "author": "user",
    "type": "text"
  },
  "initial_input_method": "initial_input_method",
  "name": "name",
  "created_at": "2019-12-27T18:11:19.117Z",
  "creator_principal": {
    "account_id": "account_id",
    "principal_type": "principal_type",
    "service_account_id": "service_account_id",
    "user_id": "user_id"
  },
  "cron_expression": "cron_expression",
  "description": "description",
  "end_at": "2019-12-27T18:11:19.117Z",
  "interval_seconds": 0,
  "last_action_time": "2019-12-27T18:11:19.117Z",
  "live_data_available": true,
  "next_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "num_actions_taken": 0,
  "paused": true,
  "skipped_action_times": [
    "2019-12-27T18:11:19.117Z"
  ],
  "start_at": "2019-12-27T18:11:19.117Z",
  "state": "ACTIVE",
  "task_metadata": {
    "foo": "bar"
  },
  "task_params": {
    "foo": "bar"
  },
  "timezone": "timezone",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Domain Types

### Schedule Create Response

- `class ScheduleCreateResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Schedule List Response

- `class ScheduleListResponse: …`

  Response model for listing run schedules.

  - `run_schedules: List[RunSchedule]`

    The list of run schedules.

    - `id: str`

      The unique identifier of the run schedule.

    - `agent_id: str`

      The agent this schedule belongs to.

    - `initial_input: RunScheduleInitialInput`

      The initial input.

      - `content: str`

        The initial prompt delivered to the task.

      - `author: Optional[MessageAuthor]`

        The author attributed to the initial input.

        - `"user"`

        - `"agent"`

      - `type: Optional[Literal["text"]]`

        Input content type.

        - `"text"`

    - `initial_input_method: str`

      Delivery method, inferred from the agent's ACP type.

    - `name: str`

      Human-readable schedule name.

    - `created_at: Optional[datetime]`

      When the schedule was created.

    - `creator_principal: Optional[RunScheduleCreatorPrincipal]`

      Credential-free creator identity stored with the schedule.

      Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
      is creator *context* used only for AuthZ and ownership at fire time.

      - `account_id: Optional[str]`

        Account/workspace id of the creator.

      - `principal_type: Optional[str]`

        e.g. 'user' or 'service_account'.

      - `service_account_id: Optional[str]`

        Creator service-account id, if a service principal.

      - `user_id: Optional[str]`

        Creator user id, if a user principal.

    - `cron_expression: Optional[str]`

      Cron cadence, if cron-based.

    - `description: Optional[str]`

      Optional description.

    - `end_at: Optional[datetime]`

      Schedule deactivation time.

    - `interval_seconds: Optional[int]`

      Interval cadence in seconds, if interval-based.

    - `last_action_time: Optional[datetime]`

      When the schedule last fired.

    - `live_data_available: Optional[bool]`

      Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

    - `next_action_times: Optional[List[datetime]]`

      Upcoming scheduled fire times.

    - `num_actions_taken: Optional[int]`

      Number of times the schedule has fired.

    - `paused: Optional[bool]`

      Whether the schedule is paused.

    - `skipped_action_times: Optional[List[datetime]]`

      Skipped one-off scheduled fire times.

    - `start_at: Optional[datetime]`

      Schedule activation time.

    - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

      Live schedule state from Temporal.

      - `"ACTIVE"`

      - `"PAUSED"`

    - `task_metadata: Optional[Dict[str, object]]`

      Task metadata at fire time.

    - `task_params: Optional[Dict[str, object]]`

      Task params at fire time.

    - `timezone: Optional[str]`

      Timezone the cron expression is evaluated in.

    - `updated_at: Optional[datetime]`

      When the schedule was updated.

  - `total: int`

    The number of run schedules returned.

### Schedule Retrieve Response

- `class ScheduleRetrieveResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Schedule Update Response

- `class ScheduleUpdateResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Schedule Pause Response

- `class SchedulePauseResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Schedule Resume Response

- `class ScheduleResumeResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Schedule Trigger Response

- `class ScheduleTriggerResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Schedule Skip Response

- `class ScheduleSkipResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Schedule Unskip Response

- `class ScheduleUnskipResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Schedule Retrieve By Name Response

- `class ScheduleRetrieveByNameResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Schedule Update By Name Response

- `class ScheduleUpdateByNameResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Schedule Pause By Name Response

- `class SchedulePauseByNameResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Schedule Resume By Name Response

- `class ScheduleResumeByNameResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.

### Schedule Trigger By Name Response

- `class ScheduleTriggerByNameResponse: …`

  Response model describing a scheduled agent run.

  - `id: str`

    The unique identifier of the run schedule.

  - `agent_id: str`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: str`

      The initial prompt delivered to the task.

    - `author: Optional[MessageAuthor]`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type: Optional[Literal["text"]]`

      Input content type.

      - `"text"`

  - `initial_input_method: str`

    Delivery method, inferred from the agent's ACP type.

  - `name: str`

    Human-readable schedule name.

  - `created_at: Optional[datetime]`

    When the schedule was created.

  - `creator_principal: Optional[CreatorPrincipal]`

    Credential-free creator identity stored with the schedule.

    Never carries cookies, JWTs, API keys, OAuth tokens, or request headers — it
    is creator *context* used only for AuthZ and ownership at fire time.

    - `account_id: Optional[str]`

      Account/workspace id of the creator.

    - `principal_type: Optional[str]`

      e.g. 'user' or 'service_account'.

    - `service_account_id: Optional[str]`

      Creator service-account id, if a service principal.

    - `user_id: Optional[str]`

      Creator user id, if a user principal.

  - `cron_expression: Optional[str]`

    Cron cadence, if cron-based.

  - `description: Optional[str]`

    Optional description.

  - `end_at: Optional[datetime]`

    Schedule deactivation time.

  - `interval_seconds: Optional[int]`

    Interval cadence in seconds, if interval-based.

  - `last_action_time: Optional[datetime]`

    When the schedule last fired.

  - `live_data_available: Optional[bool]`

    Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.

  - `next_action_times: Optional[List[datetime]]`

    Upcoming scheduled fire times.

  - `num_actions_taken: Optional[int]`

    Number of times the schedule has fired.

  - `paused: Optional[bool]`

    Whether the schedule is paused.

  - `skipped_action_times: Optional[List[datetime]]`

    Skipped one-off scheduled fire times.

  - `start_at: Optional[datetime]`

    Schedule activation time.

  - `state: Optional[Literal["ACTIVE", "PAUSED"]]`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata: Optional[Dict[str, object]]`

    Task metadata at fire time.

  - `task_params: Optional[Dict[str, object]]`

    Task params at fire time.

  - `timezone: Optional[str]`

    Timezone the cron expression is evaluated in.

  - `updated_at: Optional[datetime]`

    When the schedule was updated.
