# Agents

## Get Agent by ID

`client.agents.retrieve(stringagentID, RequestOptionsoptions?): Agent`

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

Get an agent by its unique ID.

### Parameters

- `agentID: string`

### Returns

- `Agent`

  - `id: string`

    The unique identifier of the agent.

  - `acp_type: AcpType`

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

    - `"sync"`

    - `"async"`

    - `"agentic"`

  - `created_at: string`

    The timestamp when the agent was created

  - `description: string`

    The description of the action.

  - `name: string`

    The unique name of the agent.

  - `updated_at: string`

    The timestamp when the agent was last updated

  - `agent_input_type?: "text" | "json" | null`

    The type of input the agent expects.

    - `"text"`

    - `"json"`

  - `production_deployment_id?: string | null`

    ID of the current production deployment.

  - `registered_at?: string | null`

    The timestamp when the agent was last registered

  - `registration_metadata?: Record<string, unknown> | null`

    The metadata for the agent's registration.

  - `status?: "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?: string | null`

    The reason for the status of the action.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const agent = await client.agents.retrieve('agent_id');

console.log(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

`client.agents.delete(stringagentID, RequestOptionsoptions?): DeleteResponse`

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

Delete an agent by its unique ID.

### Parameters

- `agentID: string`

### Returns

- `DeleteResponse`

  - `id: string`

  - `message: string`

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const deleteResponse = await client.agents.delete('agent_id');

console.log(deleteResponse.id);
```

#### Response

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

## List Agents

`client.agents.list(AgentListParamsquery?, RequestOptionsoptions?): AgentListResponse`

**get** `/agents`

List all registered agents, optionally filtered by query parameters.

### Parameters

- `query: AgentListParams`

  - `agent_card_metadata?: string | null`

    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?: number`

    Limit

  - `order_by?: string | null`

    Field to order by

  - `order_direction?: string`

    Order direction (asc or desc)

  - `page_number?: number`

    Page number

  - `task_id?: string | null`

    Task ID

### Returns

- `AgentListResponse = Array<Agent>`

  - `id: string`

    The unique identifier of the agent.

  - `acp_type: AcpType`

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

    - `"sync"`

    - `"async"`

    - `"agentic"`

  - `created_at: string`

    The timestamp when the agent was created

  - `description: string`

    The description of the action.

  - `name: string`

    The unique name of the agent.

  - `updated_at: string`

    The timestamp when the agent was last updated

  - `agent_input_type?: "text" | "json" | null`

    The type of input the agent expects.

    - `"text"`

    - `"json"`

  - `production_deployment_id?: string | null`

    ID of the current production deployment.

  - `registered_at?: string | null`

    The timestamp when the agent was last registered

  - `registration_metadata?: Record<string, unknown> | null`

    The metadata for the agent's registration.

  - `status?: "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?: string | null`

    The reason for the status of the action.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const agents = await client.agents.list();

console.log(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

`client.agents.rpc(stringagentID, AgentRpcParamsbody, RequestOptionsoptions?): AgentRpcResponse`

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

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

### Parameters

- `agentID: string`

- `body: AgentRpcParams`

  - `method: "event/send" | "task/create" | "message/send" | 2 more`

    - `"event/send"`

    - `"task/create"`

    - `"message/send"`

    - `"task/cancel"`

    - `"task/interrupt"`

  - `params: CreateTaskRequest | CancelTaskRequest | InterruptTaskRequest | 2 more`

    The parameters for the agent RPC request

    - `CreateTaskRequest`

      - `name?: string | null`

        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?: Record<string, unknown> | null`

        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?: Record<string, unknown> | null`

        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.

    - `CancelTaskRequest`

      - `task_id?: string | null`

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

      - `task_name?: string | null`

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

    - `InterruptTaskRequest`

      - `task_id?: string | null`

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

      - `task_name?: string | null`

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

    - `SendMessageRequest`

      - `content: TaskMessageContent`

        The message that was sent to the agent

        - `TextContent`

          - `author: MessageAuthor`

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

            - `"user"`

            - `"agent"`

          - `content: string`

            The contents of the text message.

          - `attachments?: Array<Attachment> | null`

            Optional list of file attachments with structured metadata.

            - `file_id: string`

              The unique ID of the attached file

            - `name: string`

              The name of the file

            - `size: number`

              The size of the file in bytes

            - `type: string`

              The MIME type or content type of the file

          - `format?: TextFormat`

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

            - `"markdown"`

            - `"plain"`

            - `"code"`

          - `style?: MessageStyle`

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

            - `"static"`

            - `"active"`

          - `type?: "text"`

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

            - `"text"`

        - `ReasoningContent`

          - `author: MessageAuthor`

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

          - `summary: Array<string>`

            A list of short reasoning summaries

          - `content?: Array<string> | null`

            The reasoning content or chain-of-thought text

          - `style?: MessageStyle`

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

          - `type?: "reasoning"`

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

            - `"reasoning"`

        - `DataContent`

          - `author: MessageAuthor`

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

          - `data: Record<string, unknown>`

            The contents of the data message.

          - `style?: MessageStyle`

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

          - `type?: "data"`

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

            - `"data"`

        - `ToolRequestContent`

          - `arguments: Record<string, unknown>`

            The arguments to the tool.

          - `author: MessageAuthor`

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

          - `name: string`

            The name of the tool that is being requested.

          - `tool_call_id: string`

            The ID of the tool call that is being requested.

          - `style?: MessageStyle`

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

          - `type?: "tool_request"`

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

            - `"tool_request"`

        - `ToolResponseContent`

          - `author: MessageAuthor`

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

          - `content: unknown`

            The result of the tool.

          - `name: string`

            The name of the tool that is being responded to.

          - `tool_call_id: string`

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

          - `is_error?: boolean | null`

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

          - `style?: MessageStyle`

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

          - `type?: "tool_response"`

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

            - `"tool_response"`

      - `stream?: boolean`

        Whether to stream the response message back to the client

      - `task_id?: string | null`

        The ID of the task that the message was sent to

      - `task_name?: string | null`

        The name of the task that the message was sent to

      - `task_params?: Record<string, unknown> | null`

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

    - `SendEventRequest`

      - `content?: TaskMessageContent | null`

        The content to send to the event

      - `task_id?: string | null`

        The ID of the task that the event was sent to

      - `task_name?: string | null`

        The name of the task that the event was sent to

  - `id?: number | string | null`

    - `number`

    - `string`

  - `jsonrpc?: "2.0"`

    - `"2.0"`

### Returns

- `AgentRpcResponse`

  - `result: AgentRpcResult | null`

    The result of the agent RPC request

    - `Array<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.

        - `TextContent`

          - `author: MessageAuthor`

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

            - `"user"`

            - `"agent"`

          - `content: string`

            The contents of the text message.

          - `attachments?: Array<Attachment> | null`

            Optional list of file attachments with structured metadata.

            - `file_id: string`

              The unique ID of the attached file

            - `name: string`

              The name of the file

            - `size: number`

              The size of the file in bytes

            - `type: string`

              The MIME type or content type of the file

          - `format?: TextFormat`

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

            - `"markdown"`

            - `"plain"`

            - `"code"`

          - `style?: MessageStyle`

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

            - `"static"`

            - `"active"`

          - `type?: "text"`

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

            - `"text"`

        - `ReasoningContent`

          - `author: MessageAuthor`

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

          - `summary: Array<string>`

            A list of short reasoning summaries

          - `content?: Array<string> | null`

            The reasoning content or chain-of-thought text

          - `style?: MessageStyle`

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

          - `type?: "reasoning"`

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

            - `"reasoning"`

        - `DataContent`

          - `author: MessageAuthor`

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

          - `data: Record<string, unknown>`

            The contents of the data message.

          - `style?: MessageStyle`

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

          - `type?: "data"`

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

            - `"data"`

        - `ToolRequestContent`

          - `arguments: Record<string, unknown>`

            The arguments to the tool.

          - `author: MessageAuthor`

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

          - `name: string`

            The name of the tool that is being requested.

          - `tool_call_id: string`

            The ID of the tool call that is being requested.

          - `style?: MessageStyle`

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

          - `type?: "tool_request"`

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

            - `"tool_request"`

        - `ToolResponseContent`

          - `author: MessageAuthor`

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

          - `content: unknown`

            The result of the tool.

          - `name: string`

            The name of the tool that is being responded to.

          - `tool_call_id: string`

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

          - `is_error?: boolean | null`

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

          - `style?: MessageStyle`

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

          - `type?: "tool_response"`

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

            - `"tool_response"`

      - `task_id: string`

        ID of the task this message belongs to

      - `id?: string | null`

        The task message's unique id

      - `created_at?: string | null`

        The timestamp when the message was created

      - `streaming_status?: "IN_PROGRESS" | "DONE" | null`

        - `"IN_PROGRESS"`

        - `"DONE"`

      - `updated_at?: string | null`

        The timestamp when the message was last updated

    - `StreamTaskMessageStart`

      Event for starting a streaming message

      - `content: TaskMessageContent`

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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: string`

          ID of the task this message belongs to

        - `id?: string | null`

          The task message's unique id

        - `created_at?: string | null`

          The timestamp when the message was created

        - `streaming_status?: "IN_PROGRESS" | "DONE" | null`

        - `updated_at?: string | null`

          The timestamp when the message was last updated

      - `type?: "start"`

        - `"start"`

    - `StreamTaskMessageDelta`

      Event for streaming chunks of content

      - `delta?: TaskMessageDelta | null`

        Delta for text updates

        - `TextDelta`

          Delta for text updates

          - `text_delta?: string | null`

          - `type?: "text"`

            - `"text"`

        - `DataDelta`

          Delta for data updates

          - `data_delta?: string | null`

          - `type?: "data"`

            - `"data"`

        - `ToolRequestDelta`

          Delta for tool request updates

          - `name: string`

          - `tool_call_id: string`

          - `arguments_delta?: string | null`

          - `type?: "tool_request"`

            - `"tool_request"`

        - `ToolResponseDelta`

          Delta for tool response updates

          - `name: string`

          - `tool_call_id: string`

          - `content_delta?: string | null`

          - `type?: "tool_response"`

            - `"tool_response"`

        - `ReasoningSummaryDelta`

          Delta for reasoning summary updates

          - `summary_index: number`

          - `summary_delta?: string | null`

          - `type?: "reasoning_summary"`

            - `"reasoning_summary"`

        - `ReasoningContentDelta`

          Delta for reasoning content updates

          - `content_index: number`

          - `content_delta?: string | null`

          - `type?: "reasoning_content"`

            - `"reasoning_content"`

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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?: "delta"`

        - `"delta"`

    - `StreamTaskMessageFull`

      Event for streaming the full content

      - `content: TaskMessageContent`

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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?: "full"`

        - `"full"`

    - `StreamTaskMessageDone`

      Event for indicating the task is done

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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?: "done"`

        - `"done"`

    - `Task`

      - `id: string`

      - `cleaned_at?: string | null`

      - `created_at?: string | null`

      - `name?: string | null`

      - `params?: Record<string, unknown> | null`

      - `status?: "CANCELED" | "COMPLETED" | "FAILED" | 5 more | null`

        - `"CANCELED"`

        - `"COMPLETED"`

        - `"FAILED"`

        - `"RUNNING"`

        - `"INTERRUPTED"`

        - `"TERMINATED"`

        - `"TIMED_OUT"`

        - `"DELETED"`

      - `status_reason?: string | null`

      - `task_metadata?: Record<string, unknown> | null`

      - `updated_at?: string | null`

    - `Event`

      - `id: string`

        The UUID of the event

      - `agent_id: string`

        The UUID of the agent that the event belongs to

      - `sequence_id: number`

        The sequence ID of the event

      - `task_id: string`

        The UUID of the task that the event belongs to

      - `content?: TaskMessageContent | null`

        The content of the event

      - `created_at?: string | null`

        The timestamp of the event

  - `id?: number | string | null`

    - `number`

    - `string`

  - `error?: unknown`

  - `jsonrpc?: "2.0"`

    - `"2.0"`

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const agentRpcResponse = await client.agents.rpc('agent_id', {
  method: 'event/send',
  params: {},
});

console.log(agentRpcResponse.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

`client.agents.retrieveByName(stringagentName, RequestOptionsoptions?): Agent`

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

Get an agent by its unique name.

### Parameters

- `agentName: string`

### Returns

- `Agent`

  - `id: string`

    The unique identifier of the agent.

  - `acp_type: AcpType`

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

    - `"sync"`

    - `"async"`

    - `"agentic"`

  - `created_at: string`

    The timestamp when the agent was created

  - `description: string`

    The description of the action.

  - `name: string`

    The unique name of the agent.

  - `updated_at: string`

    The timestamp when the agent was last updated

  - `agent_input_type?: "text" | "json" | null`

    The type of input the agent expects.

    - `"text"`

    - `"json"`

  - `production_deployment_id?: string | null`

    ID of the current production deployment.

  - `registered_at?: string | null`

    The timestamp when the agent was last registered

  - `registration_metadata?: Record<string, unknown> | null`

    The metadata for the agent's registration.

  - `status?: "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?: string | null`

    The reason for the status of the action.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const agent = await client.agents.retrieveByName('agent_name');

console.log(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

`client.agents.deleteByName(stringagentName, RequestOptionsoptions?): DeleteResponse`

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

Delete an agent by its unique name.

### Parameters

- `agentName: string`

### Returns

- `DeleteResponse`

  - `id: string`

  - `message: string`

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const deleteResponse = await client.agents.deleteByName('agent_name');

console.log(deleteResponse.id);
```

#### Response

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

## Handle Agent RPC by Name

`client.agents.rpcByName(stringagentName, AgentRpcByNameParamsbody, RequestOptionsoptions?): AgentRpcResponse`

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

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

### Parameters

- `agentName: string`

- `body: AgentRpcByNameParams`

  - `method: "event/send" | "task/create" | "message/send" | 2 more`

    - `"event/send"`

    - `"task/create"`

    - `"message/send"`

    - `"task/cancel"`

    - `"task/interrupt"`

  - `params: CreateTaskRequest | CancelTaskRequest | InterruptTaskRequest | 2 more`

    The parameters for the agent RPC request

    - `CreateTaskRequest`

      - `name?: string | null`

        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?: Record<string, unknown> | null`

        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?: Record<string, unknown> | null`

        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.

    - `CancelTaskRequest`

      - `task_id?: string | null`

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

      - `task_name?: string | null`

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

    - `InterruptTaskRequest`

      - `task_id?: string | null`

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

      - `task_name?: string | null`

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

    - `SendMessageRequest`

      - `content: TaskMessageContent`

        The message that was sent to the agent

        - `TextContent`

          - `author: MessageAuthor`

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

            - `"user"`

            - `"agent"`

          - `content: string`

            The contents of the text message.

          - `attachments?: Array<Attachment> | null`

            Optional list of file attachments with structured metadata.

            - `file_id: string`

              The unique ID of the attached file

            - `name: string`

              The name of the file

            - `size: number`

              The size of the file in bytes

            - `type: string`

              The MIME type or content type of the file

          - `format?: TextFormat`

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

            - `"markdown"`

            - `"plain"`

            - `"code"`

          - `style?: MessageStyle`

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

            - `"static"`

            - `"active"`

          - `type?: "text"`

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

            - `"text"`

        - `ReasoningContent`

          - `author: MessageAuthor`

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

          - `summary: Array<string>`

            A list of short reasoning summaries

          - `content?: Array<string> | null`

            The reasoning content or chain-of-thought text

          - `style?: MessageStyle`

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

          - `type?: "reasoning"`

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

            - `"reasoning"`

        - `DataContent`

          - `author: MessageAuthor`

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

          - `data: Record<string, unknown>`

            The contents of the data message.

          - `style?: MessageStyle`

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

          - `type?: "data"`

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

            - `"data"`

        - `ToolRequestContent`

          - `arguments: Record<string, unknown>`

            The arguments to the tool.

          - `author: MessageAuthor`

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

          - `name: string`

            The name of the tool that is being requested.

          - `tool_call_id: string`

            The ID of the tool call that is being requested.

          - `style?: MessageStyle`

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

          - `type?: "tool_request"`

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

            - `"tool_request"`

        - `ToolResponseContent`

          - `author: MessageAuthor`

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

          - `content: unknown`

            The result of the tool.

          - `name: string`

            The name of the tool that is being responded to.

          - `tool_call_id: string`

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

          - `is_error?: boolean | null`

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

          - `style?: MessageStyle`

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

          - `type?: "tool_response"`

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

            - `"tool_response"`

      - `stream?: boolean`

        Whether to stream the response message back to the client

      - `task_id?: string | null`

        The ID of the task that the message was sent to

      - `task_name?: string | null`

        The name of the task that the message was sent to

      - `task_params?: Record<string, unknown> | null`

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

    - `SendEventRequest`

      - `content?: TaskMessageContent | null`

        The content to send to the event

      - `task_id?: string | null`

        The ID of the task that the event was sent to

      - `task_name?: string | null`

        The name of the task that the event was sent to

  - `id?: number | string | null`

    - `number`

    - `string`

  - `jsonrpc?: "2.0"`

    - `"2.0"`

### Returns

- `AgentRpcResponse`

  - `result: AgentRpcResult | null`

    The result of the agent RPC request

    - `Array<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.

        - `TextContent`

          - `author: MessageAuthor`

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

            - `"user"`

            - `"agent"`

          - `content: string`

            The contents of the text message.

          - `attachments?: Array<Attachment> | null`

            Optional list of file attachments with structured metadata.

            - `file_id: string`

              The unique ID of the attached file

            - `name: string`

              The name of the file

            - `size: number`

              The size of the file in bytes

            - `type: string`

              The MIME type or content type of the file

          - `format?: TextFormat`

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

            - `"markdown"`

            - `"plain"`

            - `"code"`

          - `style?: MessageStyle`

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

            - `"static"`

            - `"active"`

          - `type?: "text"`

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

            - `"text"`

        - `ReasoningContent`

          - `author: MessageAuthor`

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

          - `summary: Array<string>`

            A list of short reasoning summaries

          - `content?: Array<string> | null`

            The reasoning content or chain-of-thought text

          - `style?: MessageStyle`

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

          - `type?: "reasoning"`

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

            - `"reasoning"`

        - `DataContent`

          - `author: MessageAuthor`

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

          - `data: Record<string, unknown>`

            The contents of the data message.

          - `style?: MessageStyle`

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

          - `type?: "data"`

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

            - `"data"`

        - `ToolRequestContent`

          - `arguments: Record<string, unknown>`

            The arguments to the tool.

          - `author: MessageAuthor`

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

          - `name: string`

            The name of the tool that is being requested.

          - `tool_call_id: string`

            The ID of the tool call that is being requested.

          - `style?: MessageStyle`

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

          - `type?: "tool_request"`

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

            - `"tool_request"`

        - `ToolResponseContent`

          - `author: MessageAuthor`

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

          - `content: unknown`

            The result of the tool.

          - `name: string`

            The name of the tool that is being responded to.

          - `tool_call_id: string`

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

          - `is_error?: boolean | null`

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

          - `style?: MessageStyle`

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

          - `type?: "tool_response"`

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

            - `"tool_response"`

      - `task_id: string`

        ID of the task this message belongs to

      - `id?: string | null`

        The task message's unique id

      - `created_at?: string | null`

        The timestamp when the message was created

      - `streaming_status?: "IN_PROGRESS" | "DONE" | null`

        - `"IN_PROGRESS"`

        - `"DONE"`

      - `updated_at?: string | null`

        The timestamp when the message was last updated

    - `StreamTaskMessageStart`

      Event for starting a streaming message

      - `content: TaskMessageContent`

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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: string`

          ID of the task this message belongs to

        - `id?: string | null`

          The task message's unique id

        - `created_at?: string | null`

          The timestamp when the message was created

        - `streaming_status?: "IN_PROGRESS" | "DONE" | null`

        - `updated_at?: string | null`

          The timestamp when the message was last updated

      - `type?: "start"`

        - `"start"`

    - `StreamTaskMessageDelta`

      Event for streaming chunks of content

      - `delta?: TaskMessageDelta | null`

        Delta for text updates

        - `TextDelta`

          Delta for text updates

          - `text_delta?: string | null`

          - `type?: "text"`

            - `"text"`

        - `DataDelta`

          Delta for data updates

          - `data_delta?: string | null`

          - `type?: "data"`

            - `"data"`

        - `ToolRequestDelta`

          Delta for tool request updates

          - `name: string`

          - `tool_call_id: string`

          - `arguments_delta?: string | null`

          - `type?: "tool_request"`

            - `"tool_request"`

        - `ToolResponseDelta`

          Delta for tool response updates

          - `name: string`

          - `tool_call_id: string`

          - `content_delta?: string | null`

          - `type?: "tool_response"`

            - `"tool_response"`

        - `ReasoningSummaryDelta`

          Delta for reasoning summary updates

          - `summary_index: number`

          - `summary_delta?: string | null`

          - `type?: "reasoning_summary"`

            - `"reasoning_summary"`

        - `ReasoningContentDelta`

          Delta for reasoning content updates

          - `content_index: number`

          - `content_delta?: string | null`

          - `type?: "reasoning_content"`

            - `"reasoning_content"`

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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?: "delta"`

        - `"delta"`

    - `StreamTaskMessageFull`

      Event for streaming the full content

      - `content: TaskMessageContent`

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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?: "full"`

        - `"full"`

    - `StreamTaskMessageDone`

      Event for indicating the task is done

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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?: "done"`

        - `"done"`

    - `Task`

      - `id: string`

      - `cleaned_at?: string | null`

      - `created_at?: string | null`

      - `name?: string | null`

      - `params?: Record<string, unknown> | null`

      - `status?: "CANCELED" | "COMPLETED" | "FAILED" | 5 more | null`

        - `"CANCELED"`

        - `"COMPLETED"`

        - `"FAILED"`

        - `"RUNNING"`

        - `"INTERRUPTED"`

        - `"TERMINATED"`

        - `"TIMED_OUT"`

        - `"DELETED"`

      - `status_reason?: string | null`

      - `task_metadata?: Record<string, unknown> | null`

      - `updated_at?: string | null`

    - `Event`

      - `id: string`

        The UUID of the event

      - `agent_id: string`

        The UUID of the agent that the event belongs to

      - `sequence_id: number`

        The sequence ID of the event

      - `task_id: string`

        The UUID of the task that the event belongs to

      - `content?: TaskMessageContent | null`

        The content of the event

      - `created_at?: string | null`

        The timestamp of the event

  - `id?: number | string | null`

    - `number`

    - `string`

  - `error?: unknown`

  - `jsonrpc?: "2.0"`

    - `"2.0"`

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const agentRpcResponse = await client.agents.rpcByName('agent_name', {
  method: 'event/send',
  params: {},
});

console.log(agentRpcResponse.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

`client.agents.registerBuild(AgentRegisterBuildParamsbody, RequestOptionsoptions?): 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

- `body: AgentRegisterBuildParams`

  - `description: string`

    The description of the agent.

  - `name: string`

    The unique name of the agent.

  - `agent_input_type?: "text" | "json" | null`

    The type of input the agent expects.

    - `"text"`

    - `"json"`

  - `registration_metadata?: Record<string, unknown> | null`

    The metadata for the agent's build registration.

### Returns

- `Agent`

  - `id: string`

    The unique identifier of the agent.

  - `acp_type: AcpType`

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

    - `"sync"`

    - `"async"`

    - `"agentic"`

  - `created_at: string`

    The timestamp when the agent was created

  - `description: string`

    The description of the action.

  - `name: string`

    The unique name of the agent.

  - `updated_at: string`

    The timestamp when the agent was last updated

  - `agent_input_type?: "text" | "json" | null`

    The type of input the agent expects.

    - `"text"`

    - `"json"`

  - `production_deployment_id?: string | null`

    ID of the current production deployment.

  - `registered_at?: string | null`

    The timestamp when the agent was last registered

  - `registration_metadata?: Record<string, unknown> | null`

    The metadata for the agent's registration.

  - `status?: "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?: string | null`

    The reason for the status of the action.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const agent = await client.agents.registerBuild({ description: 'description', name: 'name' });

console.log(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

- `AcpType = "sync" | "async" | "agentic"`

  - `"sync"`

  - `"async"`

  - `"agentic"`

### Agent

- `Agent`

  - `id: string`

    The unique identifier of the agent.

  - `acp_type: AcpType`

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

    - `"sync"`

    - `"async"`

    - `"agentic"`

  - `created_at: string`

    The timestamp when the agent was created

  - `description: string`

    The description of the action.

  - `name: string`

    The unique name of the agent.

  - `updated_at: string`

    The timestamp when the agent was last updated

  - `agent_input_type?: "text" | "json" | null`

    The type of input the agent expects.

    - `"text"`

    - `"json"`

  - `production_deployment_id?: string | null`

    ID of the current production deployment.

  - `registered_at?: string | null`

    The timestamp when the agent was last registered

  - `registration_metadata?: Record<string, unknown> | null`

    The metadata for the agent's registration.

  - `status?: "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?: string | null`

    The reason for the status of the action.

### Agent Rpc Request

- `AgentRpcRequest`

  - `method: "event/send" | "task/create" | "message/send" | 2 more`

    - `"event/send"`

    - `"task/create"`

    - `"message/send"`

    - `"task/cancel"`

    - `"task/interrupt"`

  - `params: CreateTaskRequest | CancelTaskRequest | InterruptTaskRequest | 2 more`

    The parameters for the agent RPC request

    - `CreateTaskRequest`

      - `name?: string | null`

        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?: Record<string, unknown> | null`

        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?: Record<string, unknown> | null`

        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.

    - `CancelTaskRequest`

      - `task_id?: string | null`

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

      - `task_name?: string | null`

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

    - `InterruptTaskRequest`

      - `task_id?: string | null`

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

      - `task_name?: string | null`

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

    - `SendMessageRequest`

      - `content: TaskMessageContent`

        The message that was sent to the agent

        - `TextContent`

          - `author: MessageAuthor`

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

            - `"user"`

            - `"agent"`

          - `content: string`

            The contents of the text message.

          - `attachments?: Array<Attachment> | null`

            Optional list of file attachments with structured metadata.

            - `file_id: string`

              The unique ID of the attached file

            - `name: string`

              The name of the file

            - `size: number`

              The size of the file in bytes

            - `type: string`

              The MIME type or content type of the file

          - `format?: TextFormat`

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

            - `"markdown"`

            - `"plain"`

            - `"code"`

          - `style?: MessageStyle`

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

            - `"static"`

            - `"active"`

          - `type?: "text"`

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

            - `"text"`

        - `ReasoningContent`

          - `author: MessageAuthor`

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

          - `summary: Array<string>`

            A list of short reasoning summaries

          - `content?: Array<string> | null`

            The reasoning content or chain-of-thought text

          - `style?: MessageStyle`

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

          - `type?: "reasoning"`

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

            - `"reasoning"`

        - `DataContent`

          - `author: MessageAuthor`

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

          - `data: Record<string, unknown>`

            The contents of the data message.

          - `style?: MessageStyle`

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

          - `type?: "data"`

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

            - `"data"`

        - `ToolRequestContent`

          - `arguments: Record<string, unknown>`

            The arguments to the tool.

          - `author: MessageAuthor`

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

          - `name: string`

            The name of the tool that is being requested.

          - `tool_call_id: string`

            The ID of the tool call that is being requested.

          - `style?: MessageStyle`

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

          - `type?: "tool_request"`

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

            - `"tool_request"`

        - `ToolResponseContent`

          - `author: MessageAuthor`

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

          - `content: unknown`

            The result of the tool.

          - `name: string`

            The name of the tool that is being responded to.

          - `tool_call_id: string`

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

          - `is_error?: boolean | null`

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

          - `style?: MessageStyle`

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

          - `type?: "tool_response"`

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

            - `"tool_response"`

      - `stream?: boolean`

        Whether to stream the response message back to the client

      - `task_id?: string | null`

        The ID of the task that the message was sent to

      - `task_name?: string | null`

        The name of the task that the message was sent to

      - `task_params?: Record<string, unknown> | null`

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

    - `SendEventRequest`

      - `content?: TaskMessageContent | null`

        The content to send to the event

      - `task_id?: string | null`

        The ID of the task that the event was sent to

      - `task_name?: string | null`

        The name of the task that the event was sent to

  - `id?: number | string | null`

    - `number`

    - `string`

  - `jsonrpc?: "2.0"`

    - `"2.0"`

### Agent Rpc Response

- `AgentRpcResponse`

  - `result: AgentRpcResult | null`

    The result of the agent RPC request

    - `Array<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.

        - `TextContent`

          - `author: MessageAuthor`

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

            - `"user"`

            - `"agent"`

          - `content: string`

            The contents of the text message.

          - `attachments?: Array<Attachment> | null`

            Optional list of file attachments with structured metadata.

            - `file_id: string`

              The unique ID of the attached file

            - `name: string`

              The name of the file

            - `size: number`

              The size of the file in bytes

            - `type: string`

              The MIME type or content type of the file

          - `format?: TextFormat`

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

            - `"markdown"`

            - `"plain"`

            - `"code"`

          - `style?: MessageStyle`

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

            - `"static"`

            - `"active"`

          - `type?: "text"`

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

            - `"text"`

        - `ReasoningContent`

          - `author: MessageAuthor`

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

          - `summary: Array<string>`

            A list of short reasoning summaries

          - `content?: Array<string> | null`

            The reasoning content or chain-of-thought text

          - `style?: MessageStyle`

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

          - `type?: "reasoning"`

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

            - `"reasoning"`

        - `DataContent`

          - `author: MessageAuthor`

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

          - `data: Record<string, unknown>`

            The contents of the data message.

          - `style?: MessageStyle`

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

          - `type?: "data"`

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

            - `"data"`

        - `ToolRequestContent`

          - `arguments: Record<string, unknown>`

            The arguments to the tool.

          - `author: MessageAuthor`

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

          - `name: string`

            The name of the tool that is being requested.

          - `tool_call_id: string`

            The ID of the tool call that is being requested.

          - `style?: MessageStyle`

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

          - `type?: "tool_request"`

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

            - `"tool_request"`

        - `ToolResponseContent`

          - `author: MessageAuthor`

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

          - `content: unknown`

            The result of the tool.

          - `name: string`

            The name of the tool that is being responded to.

          - `tool_call_id: string`

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

          - `is_error?: boolean | null`

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

          - `style?: MessageStyle`

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

          - `type?: "tool_response"`

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

            - `"tool_response"`

      - `task_id: string`

        ID of the task this message belongs to

      - `id?: string | null`

        The task message's unique id

      - `created_at?: string | null`

        The timestamp when the message was created

      - `streaming_status?: "IN_PROGRESS" | "DONE" | null`

        - `"IN_PROGRESS"`

        - `"DONE"`

      - `updated_at?: string | null`

        The timestamp when the message was last updated

    - `StreamTaskMessageStart`

      Event for starting a streaming message

      - `content: TaskMessageContent`

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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: string`

          ID of the task this message belongs to

        - `id?: string | null`

          The task message's unique id

        - `created_at?: string | null`

          The timestamp when the message was created

        - `streaming_status?: "IN_PROGRESS" | "DONE" | null`

        - `updated_at?: string | null`

          The timestamp when the message was last updated

      - `type?: "start"`

        - `"start"`

    - `StreamTaskMessageDelta`

      Event for streaming chunks of content

      - `delta?: TaskMessageDelta | null`

        Delta for text updates

        - `TextDelta`

          Delta for text updates

          - `text_delta?: string | null`

          - `type?: "text"`

            - `"text"`

        - `DataDelta`

          Delta for data updates

          - `data_delta?: string | null`

          - `type?: "data"`

            - `"data"`

        - `ToolRequestDelta`

          Delta for tool request updates

          - `name: string`

          - `tool_call_id: string`

          - `arguments_delta?: string | null`

          - `type?: "tool_request"`

            - `"tool_request"`

        - `ToolResponseDelta`

          Delta for tool response updates

          - `name: string`

          - `tool_call_id: string`

          - `content_delta?: string | null`

          - `type?: "tool_response"`

            - `"tool_response"`

        - `ReasoningSummaryDelta`

          Delta for reasoning summary updates

          - `summary_index: number`

          - `summary_delta?: string | null`

          - `type?: "reasoning_summary"`

            - `"reasoning_summary"`

        - `ReasoningContentDelta`

          Delta for reasoning content updates

          - `content_index: number`

          - `content_delta?: string | null`

          - `type?: "reasoning_content"`

            - `"reasoning_content"`

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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?: "delta"`

        - `"delta"`

    - `StreamTaskMessageFull`

      Event for streaming the full content

      - `content: TaskMessageContent`

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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?: "full"`

        - `"full"`

    - `StreamTaskMessageDone`

      Event for indicating the task is done

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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?: "done"`

        - `"done"`

    - `Task`

      - `id: string`

      - `cleaned_at?: string | null`

      - `created_at?: string | null`

      - `name?: string | null`

      - `params?: Record<string, unknown> | null`

      - `status?: "CANCELED" | "COMPLETED" | "FAILED" | 5 more | null`

        - `"CANCELED"`

        - `"COMPLETED"`

        - `"FAILED"`

        - `"RUNNING"`

        - `"INTERRUPTED"`

        - `"TERMINATED"`

        - `"TIMED_OUT"`

        - `"DELETED"`

      - `status_reason?: string | null`

      - `task_metadata?: Record<string, unknown> | null`

      - `updated_at?: string | null`

    - `Event`

      - `id: string`

        The UUID of the event

      - `agent_id: string`

        The UUID of the agent that the event belongs to

      - `sequence_id: number`

        The sequence ID of the event

      - `task_id: string`

        The UUID of the task that the event belongs to

      - `content?: TaskMessageContent | null`

        The content of the event

      - `created_at?: string | null`

        The timestamp of the event

  - `id?: number | string | null`

    - `number`

    - `string`

  - `error?: unknown`

  - `jsonrpc?: "2.0"`

    - `"2.0"`

### Agent Rpc Result

- `AgentRpcResult = Array<TaskMessage> | StreamTaskMessageStart | StreamTaskMessageDelta | 4 more | null`

  Event for starting a streaming message

  - `Array<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.

      - `TextContent`

        - `author: MessageAuthor`

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

          - `"user"`

          - `"agent"`

        - `content: string`

          The contents of the text message.

        - `attachments?: Array<Attachment> | null`

          Optional list of file attachments with structured metadata.

          - `file_id: string`

            The unique ID of the attached file

          - `name: string`

            The name of the file

          - `size: number`

            The size of the file in bytes

          - `type: string`

            The MIME type or content type of the file

        - `format?: TextFormat`

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

          - `"markdown"`

          - `"plain"`

          - `"code"`

        - `style?: MessageStyle`

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

          - `"static"`

          - `"active"`

        - `type?: "text"`

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

          - `"text"`

      - `ReasoningContent`

        - `author: MessageAuthor`

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

        - `summary: Array<string>`

          A list of short reasoning summaries

        - `content?: Array<string> | null`

          The reasoning content or chain-of-thought text

        - `style?: MessageStyle`

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

        - `type?: "reasoning"`

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

          - `"reasoning"`

      - `DataContent`

        - `author: MessageAuthor`

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

        - `data: Record<string, unknown>`

          The contents of the data message.

        - `style?: MessageStyle`

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

        - `type?: "data"`

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

          - `"data"`

      - `ToolRequestContent`

        - `arguments: Record<string, unknown>`

          The arguments to the tool.

        - `author: MessageAuthor`

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

        - `name: string`

          The name of the tool that is being requested.

        - `tool_call_id: string`

          The ID of the tool call that is being requested.

        - `style?: MessageStyle`

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

        - `type?: "tool_request"`

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

          - `"tool_request"`

      - `ToolResponseContent`

        - `author: MessageAuthor`

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

        - `content: unknown`

          The result of the tool.

        - `name: string`

          The name of the tool that is being responded to.

        - `tool_call_id: string`

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

        - `is_error?: boolean | null`

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

        - `style?: MessageStyle`

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

        - `type?: "tool_response"`

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

          - `"tool_response"`

    - `task_id: string`

      ID of the task this message belongs to

    - `id?: string | null`

      The task message's unique id

    - `created_at?: string | null`

      The timestamp when the message was created

    - `streaming_status?: "IN_PROGRESS" | "DONE" | null`

      - `"IN_PROGRESS"`

      - `"DONE"`

    - `updated_at?: string | null`

      The timestamp when the message was last updated

  - `StreamTaskMessageStart`

    Event for starting a streaming message

    - `content: TaskMessageContent`

    - `index?: number | null`

    - `parent_task_message?: TaskMessage | null`

      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: string`

        ID of the task this message belongs to

      - `id?: string | null`

        The task message's unique id

      - `created_at?: string | null`

        The timestamp when the message was created

      - `streaming_status?: "IN_PROGRESS" | "DONE" | null`

      - `updated_at?: string | null`

        The timestamp when the message was last updated

    - `type?: "start"`

      - `"start"`

  - `StreamTaskMessageDelta`

    Event for streaming chunks of content

    - `delta?: TaskMessageDelta | null`

      Delta for text updates

      - `TextDelta`

        Delta for text updates

        - `text_delta?: string | null`

        - `type?: "text"`

          - `"text"`

      - `DataDelta`

        Delta for data updates

        - `data_delta?: string | null`

        - `type?: "data"`

          - `"data"`

      - `ToolRequestDelta`

        Delta for tool request updates

        - `name: string`

        - `tool_call_id: string`

        - `arguments_delta?: string | null`

        - `type?: "tool_request"`

          - `"tool_request"`

      - `ToolResponseDelta`

        Delta for tool response updates

        - `name: string`

        - `tool_call_id: string`

        - `content_delta?: string | null`

        - `type?: "tool_response"`

          - `"tool_response"`

      - `ReasoningSummaryDelta`

        Delta for reasoning summary updates

        - `summary_index: number`

        - `summary_delta?: string | null`

        - `type?: "reasoning_summary"`

          - `"reasoning_summary"`

      - `ReasoningContentDelta`

        Delta for reasoning content updates

        - `content_index: number`

        - `content_delta?: string | null`

        - `type?: "reasoning_content"`

          - `"reasoning_content"`

    - `index?: number | null`

    - `parent_task_message?: TaskMessage | null`

      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?: "delta"`

      - `"delta"`

  - `StreamTaskMessageFull`

    Event for streaming the full content

    - `content: TaskMessageContent`

    - `index?: number | null`

    - `parent_task_message?: TaskMessage | null`

      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?: "full"`

      - `"full"`

  - `StreamTaskMessageDone`

    Event for indicating the task is done

    - `index?: number | null`

    - `parent_task_message?: TaskMessage | null`

      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?: "done"`

      - `"done"`

  - `Task`

    - `id: string`

    - `cleaned_at?: string | null`

    - `created_at?: string | null`

    - `name?: string | null`

    - `params?: Record<string, unknown> | null`

    - `status?: "CANCELED" | "COMPLETED" | "FAILED" | 5 more | null`

      - `"CANCELED"`

      - `"COMPLETED"`

      - `"FAILED"`

      - `"RUNNING"`

      - `"INTERRUPTED"`

      - `"TERMINATED"`

      - `"TIMED_OUT"`

      - `"DELETED"`

    - `status_reason?: string | null`

    - `task_metadata?: Record<string, unknown> | null`

    - `updated_at?: string | null`

  - `Event`

    - `id: string`

      The UUID of the event

    - `agent_id: string`

      The UUID of the agent that the event belongs to

    - `sequence_id: number`

      The sequence ID of the event

    - `task_id: string`

      The UUID of the task that the event belongs to

    - `content?: TaskMessageContent | null`

      The content of the event

    - `created_at?: string | null`

      The timestamp of the event

### Data Delta

- `DataDelta`

  Delta for data updates

  - `data_delta?: string | null`

  - `type?: "data"`

    - `"data"`

### Reasoning Content Delta

- `ReasoningContentDelta`

  Delta for reasoning content updates

  - `content_index: number`

  - `content_delta?: string | null`

  - `type?: "reasoning_content"`

    - `"reasoning_content"`

### Reasoning Summary Delta

- `ReasoningSummaryDelta`

  Delta for reasoning summary updates

  - `summary_index: number`

  - `summary_delta?: string | null`

  - `type?: "reasoning_summary"`

    - `"reasoning_summary"`

### Task Message Content

- `TaskMessageContent = TextContent | ReasoningContent | DataContent | 2 more`

  - `TextContent`

    - `author: MessageAuthor`

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

      - `"user"`

      - `"agent"`

    - `content: string`

      The contents of the text message.

    - `attachments?: Array<Attachment> | null`

      Optional list of file attachments with structured metadata.

      - `file_id: string`

        The unique ID of the attached file

      - `name: string`

        The name of the file

      - `size: number`

        The size of the file in bytes

      - `type: string`

        The MIME type or content type of the file

    - `format?: TextFormat`

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

      - `"markdown"`

      - `"plain"`

      - `"code"`

    - `style?: MessageStyle`

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

      - `"static"`

      - `"active"`

    - `type?: "text"`

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

      - `"text"`

  - `ReasoningContent`

    - `author: MessageAuthor`

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

    - `summary: Array<string>`

      A list of short reasoning summaries

    - `content?: Array<string> | null`

      The reasoning content or chain-of-thought text

    - `style?: MessageStyle`

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

    - `type?: "reasoning"`

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

      - `"reasoning"`

  - `DataContent`

    - `author: MessageAuthor`

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

    - `data: Record<string, unknown>`

      The contents of the data message.

    - `style?: MessageStyle`

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

    - `type?: "data"`

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

      - `"data"`

  - `ToolRequestContent`

    - `arguments: Record<string, unknown>`

      The arguments to the tool.

    - `author: MessageAuthor`

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

    - `name: string`

      The name of the tool that is being requested.

    - `tool_call_id: string`

      The ID of the tool call that is being requested.

    - `style?: MessageStyle`

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

    - `type?: "tool_request"`

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

      - `"tool_request"`

  - `ToolResponseContent`

    - `author: MessageAuthor`

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

    - `content: unknown`

      The result of the tool.

    - `name: string`

      The name of the tool that is being responded to.

    - `tool_call_id: string`

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

    - `is_error?: boolean | null`

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

    - `style?: MessageStyle`

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

    - `type?: "tool_response"`

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

      - `"tool_response"`

### Task Message Delta

- `TaskMessageDelta = TextDelta | DataDelta | ToolRequestDelta | 3 more`

  Delta for text updates

  - `TextDelta`

    Delta for text updates

    - `text_delta?: string | null`

    - `type?: "text"`

      - `"text"`

  - `DataDelta`

    Delta for data updates

    - `data_delta?: string | null`

    - `type?: "data"`

      - `"data"`

  - `ToolRequestDelta`

    Delta for tool request updates

    - `name: string`

    - `tool_call_id: string`

    - `arguments_delta?: string | null`

    - `type?: "tool_request"`

      - `"tool_request"`

  - `ToolResponseDelta`

    Delta for tool response updates

    - `name: string`

    - `tool_call_id: string`

    - `content_delta?: string | null`

    - `type?: "tool_response"`

      - `"tool_response"`

  - `ReasoningSummaryDelta`

    Delta for reasoning summary updates

    - `summary_index: number`

    - `summary_delta?: string | null`

    - `type?: "reasoning_summary"`

      - `"reasoning_summary"`

  - `ReasoningContentDelta`

    Delta for reasoning content updates

    - `content_index: number`

    - `content_delta?: string | null`

    - `type?: "reasoning_content"`

      - `"reasoning_content"`

### Task Message Update

- `TaskMessageUpdate = StreamTaskMessageStart | StreamTaskMessageDelta | StreamTaskMessageFull | StreamTaskMessageDone`

  Event for starting a streaming message

  - `StreamTaskMessageStart`

    Event for starting a streaming message

    - `content: TaskMessageContent`

      - `TextContent`

        - `author: MessageAuthor`

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

          - `"user"`

          - `"agent"`

        - `content: string`

          The contents of the text message.

        - `attachments?: Array<Attachment> | null`

          Optional list of file attachments with structured metadata.

          - `file_id: string`

            The unique ID of the attached file

          - `name: string`

            The name of the file

          - `size: number`

            The size of the file in bytes

          - `type: string`

            The MIME type or content type of the file

        - `format?: TextFormat`

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

          - `"markdown"`

          - `"plain"`

          - `"code"`

        - `style?: MessageStyle`

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

          - `"static"`

          - `"active"`

        - `type?: "text"`

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

          - `"text"`

      - `ReasoningContent`

        - `author: MessageAuthor`

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

        - `summary: Array<string>`

          A list of short reasoning summaries

        - `content?: Array<string> | null`

          The reasoning content or chain-of-thought text

        - `style?: MessageStyle`

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

        - `type?: "reasoning"`

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

          - `"reasoning"`

      - `DataContent`

        - `author: MessageAuthor`

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

        - `data: Record<string, unknown>`

          The contents of the data message.

        - `style?: MessageStyle`

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

        - `type?: "data"`

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

          - `"data"`

      - `ToolRequestContent`

        - `arguments: Record<string, unknown>`

          The arguments to the tool.

        - `author: MessageAuthor`

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

        - `name: string`

          The name of the tool that is being requested.

        - `tool_call_id: string`

          The ID of the tool call that is being requested.

        - `style?: MessageStyle`

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

        - `type?: "tool_request"`

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

          - `"tool_request"`

      - `ToolResponseContent`

        - `author: MessageAuthor`

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

        - `content: unknown`

          The result of the tool.

        - `name: string`

          The name of the tool that is being responded to.

        - `tool_call_id: string`

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

        - `is_error?: boolean | null`

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

        - `style?: MessageStyle`

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

        - `type?: "tool_response"`

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

          - `"tool_response"`

    - `index?: number | null`

    - `parent_task_message?: TaskMessage | null`

      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: string`

        ID of the task this message belongs to

      - `id?: string | null`

        The task message's unique id

      - `created_at?: string | null`

        The timestamp when the message was created

      - `streaming_status?: "IN_PROGRESS" | "DONE" | null`

        - `"IN_PROGRESS"`

        - `"DONE"`

      - `updated_at?: string | null`

        The timestamp when the message was last updated

    - `type?: "start"`

      - `"start"`

  - `StreamTaskMessageDelta`

    Event for streaming chunks of content

    - `delta?: TaskMessageDelta | null`

      Delta for text updates

      - `TextDelta`

        Delta for text updates

        - `text_delta?: string | null`

        - `type?: "text"`

          - `"text"`

      - `DataDelta`

        Delta for data updates

        - `data_delta?: string | null`

        - `type?: "data"`

          - `"data"`

      - `ToolRequestDelta`

        Delta for tool request updates

        - `name: string`

        - `tool_call_id: string`

        - `arguments_delta?: string | null`

        - `type?: "tool_request"`

          - `"tool_request"`

      - `ToolResponseDelta`

        Delta for tool response updates

        - `name: string`

        - `tool_call_id: string`

        - `content_delta?: string | null`

        - `type?: "tool_response"`

          - `"tool_response"`

      - `ReasoningSummaryDelta`

        Delta for reasoning summary updates

        - `summary_index: number`

        - `summary_delta?: string | null`

        - `type?: "reasoning_summary"`

          - `"reasoning_summary"`

      - `ReasoningContentDelta`

        Delta for reasoning content updates

        - `content_index: number`

        - `content_delta?: string | null`

        - `type?: "reasoning_content"`

          - `"reasoning_content"`

    - `index?: number | null`

    - `parent_task_message?: TaskMessage | null`

      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?: "delta"`

      - `"delta"`

  - `StreamTaskMessageFull`

    Event for streaming the full content

    - `content: TaskMessageContent`

    - `index?: number | null`

    - `parent_task_message?: TaskMessage | null`

      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?: "full"`

      - `"full"`

  - `StreamTaskMessageDone`

    Event for indicating the task is done

    - `index?: number | null`

    - `parent_task_message?: TaskMessage | null`

      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?: "done"`

      - `"done"`

### Text Delta

- `TextDelta`

  Delta for text updates

  - `text_delta?: string | null`

  - `type?: "text"`

    - `"text"`

### Tool Request Delta

- `ToolRequestDelta`

  Delta for tool request updates

  - `name: string`

  - `tool_call_id: string`

  - `arguments_delta?: string | null`

  - `type?: "tool_request"`

    - `"tool_request"`

### Tool Response Delta

- `ToolResponseDelta`

  Delta for tool response updates

  - `name: string`

  - `tool_call_id: string`

  - `content_delta?: string | null`

  - `type?: "tool_response"`

    - `"tool_response"`

### Agent List Response

- `AgentListResponse = Array<Agent>`

  - `id: string`

    The unique identifier of the agent.

  - `acp_type: AcpType`

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

    - `"sync"`

    - `"async"`

    - `"agentic"`

  - `created_at: string`

    The timestamp when the agent was created

  - `description: string`

    The description of the action.

  - `name: string`

    The unique name of the agent.

  - `updated_at: string`

    The timestamp when the agent was last updated

  - `agent_input_type?: "text" | "json" | null`

    The type of input the agent expects.

    - `"text"`

    - `"json"`

  - `production_deployment_id?: string | null`

    ID of the current production deployment.

  - `registered_at?: string | null`

    The timestamp when the agent was last registered

  - `registration_metadata?: Record<string, unknown> | null`

    The metadata for the agent's registration.

  - `status?: "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?: string | null`

    The reason for the status of the action.

# Deployments

## Create Deployment

`client.agents.deployments.create(stringagentID, DeploymentCreateParamsbody, RequestOptionsoptions?): DeploymentCreateResponse`

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

Create a new deployment record in PENDING status.

### Parameters

- `agentID: string`

- `body: DeploymentCreateParams`

  - `docker_image: string`

    Full Docker image URI.

  - `helm_release_name?: string | null`

    Helm release name.

  - `registration_metadata?: Record<string, unknown> | null`

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

  - `sgp_deploy_id?: string | null`

    SGP deployment ID.

### Returns

- `DeploymentCreateResponse`

  - `id: string`

    The unique identifier of the deployment.

  - `agent_id: string`

    The agent this deployment belongs to.

  - `docker_image: string`

    Full Docker image URI.

  - `is_production: boolean`

    Whether this is the production deployment.

  - `status: "Pending" | "Ready" | "Failed"`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url?: string | null`

    ACP URL set when agent registers.

  - `created_at?: string | null`

    When the deployment was created.

  - `expires_at?: string | null`

    When marked for cleanup.

  - `helm_release_name?: string | null`

    Helm release name for cleanup.

  - `promoted_at?: string | null`

    When promoted to production.

  - `registration_metadata?: Record<string, unknown> | null`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id?: string | null`

    Correlates to SGP's agentex_deploys.id.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const deployment = await client.agents.deployments.create('agent_id', {
  docker_image: 'docker_image',
});

console.log(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

`client.agents.deployments.list(stringagentID, DeploymentListParamsquery?, RequestOptionsoptions?): DeploymentListResponse`

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

List deployments for an agent, newest first.

### Parameters

- `agentID: string`

- `query: DeploymentListParams`

  - `limit?: number`

    Limit

  - `order_by?: string | null`

    Field to order by

  - `order_direction?: string`

    Order direction (asc or desc)

  - `page_number?: number`

    Page number

### Returns

- `DeploymentListResponse = Array<DeploymentListResponseItem>`

  - `id: string`

    The unique identifier of the deployment.

  - `agent_id: string`

    The agent this deployment belongs to.

  - `docker_image: string`

    Full Docker image URI.

  - `is_production: boolean`

    Whether this is the production deployment.

  - `status: "Pending" | "Ready" | "Failed"`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url?: string | null`

    ACP URL set when agent registers.

  - `created_at?: string | null`

    When the deployment was created.

  - `expires_at?: string | null`

    When marked for cleanup.

  - `helm_release_name?: string | null`

    Helm release name for cleanup.

  - `promoted_at?: string | null`

    When promoted to production.

  - `registration_metadata?: Record<string, unknown> | null`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id?: string | null`

    Correlates to SGP's agentex_deploys.id.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const deployments = await client.agents.deployments.list('agent_id');

console.log(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

`client.agents.deployments.retrieve(stringdeploymentID, DeploymentRetrieveParamsparams, RequestOptionsoptions?): DeploymentRetrieveResponse`

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

Get a specific deployment by ID.

### Parameters

- `deploymentID: string`

- `params: DeploymentRetrieveParams`

  - `agent_id: string`

### Returns

- `DeploymentRetrieveResponse`

  - `id: string`

    The unique identifier of the deployment.

  - `agent_id: string`

    The agent this deployment belongs to.

  - `docker_image: string`

    Full Docker image URI.

  - `is_production: boolean`

    Whether this is the production deployment.

  - `status: "Pending" | "Ready" | "Failed"`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url?: string | null`

    ACP URL set when agent registers.

  - `created_at?: string | null`

    When the deployment was created.

  - `expires_at?: string | null`

    When marked for cleanup.

  - `helm_release_name?: string | null`

    Helm release name for cleanup.

  - `promoted_at?: string | null`

    When promoted to production.

  - `registration_metadata?: Record<string, unknown> | null`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id?: string | null`

    Correlates to SGP's agentex_deploys.id.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const deployment = await client.agents.deployments.retrieve('deployment_id', {
  agent_id: 'agent_id',
});

console.log(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

`client.agents.deployments.delete(stringdeploymentID, DeploymentDeleteParamsparams, RequestOptionsoptions?): DeleteResponse`

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

Delete a non-production deployment.

### Parameters

- `deploymentID: string`

- `params: DeploymentDeleteParams`

  - `agent_id: string`

### Returns

- `DeleteResponse`

  - `id: string`

  - `message: string`

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const deleteResponse = await client.agents.deployments.delete('deployment_id', {
  agent_id: 'agent_id',
});

console.log(deleteResponse.id);
```

#### Response

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

## Promote Deployment

`client.agents.deployments.promote(stringdeploymentID, DeploymentPromoteParamsparams, RequestOptionsoptions?): DeploymentPromoteResponse`

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

Promote a deployment to production with atomic cutover.

### Parameters

- `deploymentID: string`

- `params: DeploymentPromoteParams`

  - `agent_id: string`

### Returns

- `DeploymentPromoteResponse`

  - `id: string`

    The unique identifier of the deployment.

  - `agent_id: string`

    The agent this deployment belongs to.

  - `docker_image: string`

    Full Docker image URI.

  - `is_production: boolean`

    Whether this is the production deployment.

  - `status: "Pending" | "Ready" | "Failed"`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url?: string | null`

    ACP URL set when agent registers.

  - `created_at?: string | null`

    When the deployment was created.

  - `expires_at?: string | null`

    When marked for cleanup.

  - `helm_release_name?: string | null`

    Helm release name for cleanup.

  - `promoted_at?: string | null`

    When promoted to production.

  - `registration_metadata?: Record<string, unknown> | null`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id?: string | null`

    Correlates to SGP's agentex_deploys.id.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const response = await client.agents.deployments.promote('deployment_id', { agent_id: 'agent_id' });

console.log(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

`client.agents.deployments.previewRpc(stringdeploymentID, DeploymentPreviewRpcParamsparams, RequestOptionsoptions?): AgentRpcResponse`

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

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

### Parameters

- `deploymentID: string`

- `params: DeploymentPreviewRpcParams`

  - `agent_id: string`

    Path param

  - `method: "event/send" | "task/create" | "message/send" | 2 more`

    Body param

    - `"event/send"`

    - `"task/create"`

    - `"message/send"`

    - `"task/cancel"`

    - `"task/interrupt"`

  - `params: CreateTaskRequest | CancelTaskRequest | InterruptTaskRequest | 2 more`

    Body param: The parameters for the agent RPC request

    - `CreateTaskRequest`

      - `name?: string | null`

        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?: Record<string, unknown> | null`

        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?: Record<string, unknown> | null`

        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.

    - `CancelTaskRequest`

      - `task_id?: string | null`

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

      - `task_name?: string | null`

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

    - `InterruptTaskRequest`

      - `task_id?: string | null`

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

      - `task_name?: string | null`

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

    - `SendMessageRequest`

      - `content: TaskMessageContent`

        The message that was sent to the agent

        - `TextContent`

          - `author: MessageAuthor`

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

            - `"user"`

            - `"agent"`

          - `content: string`

            The contents of the text message.

          - `attachments?: Array<Attachment> | null`

            Optional list of file attachments with structured metadata.

            - `file_id: string`

              The unique ID of the attached file

            - `name: string`

              The name of the file

            - `size: number`

              The size of the file in bytes

            - `type: string`

              The MIME type or content type of the file

          - `format?: TextFormat`

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

            - `"markdown"`

            - `"plain"`

            - `"code"`

          - `style?: MessageStyle`

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

            - `"static"`

            - `"active"`

          - `type?: "text"`

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

            - `"text"`

        - `ReasoningContent`

          - `author: MessageAuthor`

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

          - `summary: Array<string>`

            A list of short reasoning summaries

          - `content?: Array<string> | null`

            The reasoning content or chain-of-thought text

          - `style?: MessageStyle`

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

          - `type?: "reasoning"`

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

            - `"reasoning"`

        - `DataContent`

          - `author: MessageAuthor`

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

          - `data: Record<string, unknown>`

            The contents of the data message.

          - `style?: MessageStyle`

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

          - `type?: "data"`

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

            - `"data"`

        - `ToolRequestContent`

          - `arguments: Record<string, unknown>`

            The arguments to the tool.

          - `author: MessageAuthor`

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

          - `name: string`

            The name of the tool that is being requested.

          - `tool_call_id: string`

            The ID of the tool call that is being requested.

          - `style?: MessageStyle`

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

          - `type?: "tool_request"`

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

            - `"tool_request"`

        - `ToolResponseContent`

          - `author: MessageAuthor`

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

          - `content: unknown`

            The result of the tool.

          - `name: string`

            The name of the tool that is being responded to.

          - `tool_call_id: string`

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

          - `is_error?: boolean | null`

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

          - `style?: MessageStyle`

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

          - `type?: "tool_response"`

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

            - `"tool_response"`

      - `stream?: boolean`

        Whether to stream the response message back to the client

      - `task_id?: string | null`

        The ID of the task that the message was sent to

      - `task_name?: string | null`

        The name of the task that the message was sent to

      - `task_params?: Record<string, unknown> | null`

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

    - `SendEventRequest`

      - `content?: TaskMessageContent | null`

        The content to send to the event

      - `task_id?: string | null`

        The ID of the task that the event was sent to

      - `task_name?: string | null`

        The name of the task that the event was sent to

  - `id?: number | string | null`

    Body param

    - `number`

    - `string`

  - `jsonrpc?: "2.0"`

    Body param

    - `"2.0"`

### Returns

- `AgentRpcResponse`

  - `result: AgentRpcResult | null`

    The result of the agent RPC request

    - `Array<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.

        - `TextContent`

          - `author: MessageAuthor`

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

            - `"user"`

            - `"agent"`

          - `content: string`

            The contents of the text message.

          - `attachments?: Array<Attachment> | null`

            Optional list of file attachments with structured metadata.

            - `file_id: string`

              The unique ID of the attached file

            - `name: string`

              The name of the file

            - `size: number`

              The size of the file in bytes

            - `type: string`

              The MIME type or content type of the file

          - `format?: TextFormat`

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

            - `"markdown"`

            - `"plain"`

            - `"code"`

          - `style?: MessageStyle`

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

            - `"static"`

            - `"active"`

          - `type?: "text"`

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

            - `"text"`

        - `ReasoningContent`

          - `author: MessageAuthor`

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

          - `summary: Array<string>`

            A list of short reasoning summaries

          - `content?: Array<string> | null`

            The reasoning content or chain-of-thought text

          - `style?: MessageStyle`

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

          - `type?: "reasoning"`

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

            - `"reasoning"`

        - `DataContent`

          - `author: MessageAuthor`

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

          - `data: Record<string, unknown>`

            The contents of the data message.

          - `style?: MessageStyle`

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

          - `type?: "data"`

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

            - `"data"`

        - `ToolRequestContent`

          - `arguments: Record<string, unknown>`

            The arguments to the tool.

          - `author: MessageAuthor`

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

          - `name: string`

            The name of the tool that is being requested.

          - `tool_call_id: string`

            The ID of the tool call that is being requested.

          - `style?: MessageStyle`

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

          - `type?: "tool_request"`

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

            - `"tool_request"`

        - `ToolResponseContent`

          - `author: MessageAuthor`

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

          - `content: unknown`

            The result of the tool.

          - `name: string`

            The name of the tool that is being responded to.

          - `tool_call_id: string`

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

          - `is_error?: boolean | null`

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

          - `style?: MessageStyle`

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

          - `type?: "tool_response"`

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

            - `"tool_response"`

      - `task_id: string`

        ID of the task this message belongs to

      - `id?: string | null`

        The task message's unique id

      - `created_at?: string | null`

        The timestamp when the message was created

      - `streaming_status?: "IN_PROGRESS" | "DONE" | null`

        - `"IN_PROGRESS"`

        - `"DONE"`

      - `updated_at?: string | null`

        The timestamp when the message was last updated

    - `StreamTaskMessageStart`

      Event for starting a streaming message

      - `content: TaskMessageContent`

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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: string`

          ID of the task this message belongs to

        - `id?: string | null`

          The task message's unique id

        - `created_at?: string | null`

          The timestamp when the message was created

        - `streaming_status?: "IN_PROGRESS" | "DONE" | null`

        - `updated_at?: string | null`

          The timestamp when the message was last updated

      - `type?: "start"`

        - `"start"`

    - `StreamTaskMessageDelta`

      Event for streaming chunks of content

      - `delta?: TaskMessageDelta | null`

        Delta for text updates

        - `TextDelta`

          Delta for text updates

          - `text_delta?: string | null`

          - `type?: "text"`

            - `"text"`

        - `DataDelta`

          Delta for data updates

          - `data_delta?: string | null`

          - `type?: "data"`

            - `"data"`

        - `ToolRequestDelta`

          Delta for tool request updates

          - `name: string`

          - `tool_call_id: string`

          - `arguments_delta?: string | null`

          - `type?: "tool_request"`

            - `"tool_request"`

        - `ToolResponseDelta`

          Delta for tool response updates

          - `name: string`

          - `tool_call_id: string`

          - `content_delta?: string | null`

          - `type?: "tool_response"`

            - `"tool_response"`

        - `ReasoningSummaryDelta`

          Delta for reasoning summary updates

          - `summary_index: number`

          - `summary_delta?: string | null`

          - `type?: "reasoning_summary"`

            - `"reasoning_summary"`

        - `ReasoningContentDelta`

          Delta for reasoning content updates

          - `content_index: number`

          - `content_delta?: string | null`

          - `type?: "reasoning_content"`

            - `"reasoning_content"`

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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?: "delta"`

        - `"delta"`

    - `StreamTaskMessageFull`

      Event for streaming the full content

      - `content: TaskMessageContent`

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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?: "full"`

        - `"full"`

    - `StreamTaskMessageDone`

      Event for indicating the task is done

      - `index?: number | null`

      - `parent_task_message?: TaskMessage | null`

        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?: "done"`

        - `"done"`

    - `Task`

      - `id: string`

      - `cleaned_at?: string | null`

      - `created_at?: string | null`

      - `name?: string | null`

      - `params?: Record<string, unknown> | null`

      - `status?: "CANCELED" | "COMPLETED" | "FAILED" | 5 more | null`

        - `"CANCELED"`

        - `"COMPLETED"`

        - `"FAILED"`

        - `"RUNNING"`

        - `"INTERRUPTED"`

        - `"TERMINATED"`

        - `"TIMED_OUT"`

        - `"DELETED"`

      - `status_reason?: string | null`

      - `task_metadata?: Record<string, unknown> | null`

      - `updated_at?: string | null`

    - `Event`

      - `id: string`

        The UUID of the event

      - `agent_id: string`

        The UUID of the agent that the event belongs to

      - `sequence_id: number`

        The sequence ID of the event

      - `task_id: string`

        The UUID of the task that the event belongs to

      - `content?: TaskMessageContent | null`

        The content of the event

      - `created_at?: string | null`

        The timestamp of the event

  - `id?: number | string | null`

    - `number`

    - `string`

  - `error?: unknown`

  - `jsonrpc?: "2.0"`

    - `"2.0"`

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const agentRpcResponse = await client.agents.deployments.previewRpc('deployment_id', {
  agent_id: 'agent_id',
  method: 'event/send',
  params: {},
});

console.log(agentRpcResponse.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

- `DeploymentCreateResponse`

  - `id: string`

    The unique identifier of the deployment.

  - `agent_id: string`

    The agent this deployment belongs to.

  - `docker_image: string`

    Full Docker image URI.

  - `is_production: boolean`

    Whether this is the production deployment.

  - `status: "Pending" | "Ready" | "Failed"`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url?: string | null`

    ACP URL set when agent registers.

  - `created_at?: string | null`

    When the deployment was created.

  - `expires_at?: string | null`

    When marked for cleanup.

  - `helm_release_name?: string | null`

    Helm release name for cleanup.

  - `promoted_at?: string | null`

    When promoted to production.

  - `registration_metadata?: Record<string, unknown> | null`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id?: string | null`

    Correlates to SGP's agentex_deploys.id.

### Deployment List Response

- `DeploymentListResponse = Array<DeploymentListResponseItem>`

  - `id: string`

    The unique identifier of the deployment.

  - `agent_id: string`

    The agent this deployment belongs to.

  - `docker_image: string`

    Full Docker image URI.

  - `is_production: boolean`

    Whether this is the production deployment.

  - `status: "Pending" | "Ready" | "Failed"`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url?: string | null`

    ACP URL set when agent registers.

  - `created_at?: string | null`

    When the deployment was created.

  - `expires_at?: string | null`

    When marked for cleanup.

  - `helm_release_name?: string | null`

    Helm release name for cleanup.

  - `promoted_at?: string | null`

    When promoted to production.

  - `registration_metadata?: Record<string, unknown> | null`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id?: string | null`

    Correlates to SGP's agentex_deploys.id.

### Deployment Retrieve Response

- `DeploymentRetrieveResponse`

  - `id: string`

    The unique identifier of the deployment.

  - `agent_id: string`

    The agent this deployment belongs to.

  - `docker_image: string`

    Full Docker image URI.

  - `is_production: boolean`

    Whether this is the production deployment.

  - `status: "Pending" | "Ready" | "Failed"`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url?: string | null`

    ACP URL set when agent registers.

  - `created_at?: string | null`

    When the deployment was created.

  - `expires_at?: string | null`

    When marked for cleanup.

  - `helm_release_name?: string | null`

    Helm release name for cleanup.

  - `promoted_at?: string | null`

    When promoted to production.

  - `registration_metadata?: Record<string, unknown> | null`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id?: string | null`

    Correlates to SGP's agentex_deploys.id.

### Deployment Promote Response

- `DeploymentPromoteResponse`

  - `id: string`

    The unique identifier of the deployment.

  - `agent_id: string`

    The agent this deployment belongs to.

  - `docker_image: string`

    Full Docker image URI.

  - `is_production: boolean`

    Whether this is the production deployment.

  - `status: "Pending" | "Ready" | "Failed"`

    Current deployment status.

    - `"Pending"`

    - `"Ready"`

    - `"Failed"`

  - `acp_url?: string | null`

    ACP URL set when agent registers.

  - `created_at?: string | null`

    When the deployment was created.

  - `expires_at?: string | null`

    When marked for cleanup.

  - `helm_release_name?: string | null`

    Helm release name for cleanup.

  - `promoted_at?: string | null`

    When promoted to production.

  - `registration_metadata?: Record<string, unknown> | null`

    Git/build metadata from the agent pod.

  - `sgp_deploy_id?: string | null`

    Correlates to SGP's agentex_deploys.id.

# Schedules

## Create Run Schedule

`client.agents.schedules.create(stringagentID, ScheduleCreateParamsbody, RequestOptionsoptions?): ScheduleCreateResponse`

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

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

### Parameters

- `agentID: string`

- `body: ScheduleCreateParams`

  - `initial_input: InitialInput`

    The first input delivered to each created task.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `name: string`

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

  - `cron_expression?: string | null`

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

  - `description?: string | null`

    Optional description of what this schedule does.

  - `end_at?: string | null`

    When the schedule should stop being active.

  - `interval_seconds?: number | null`

    Interval cadence in seconds. Mutually exclusive with cron_expression.

  - `paused?: boolean`

    Whether to create the schedule in a paused state.

  - `start_at?: string | null`

    When the schedule should start being active.

  - `task_metadata?: Record<string, unknown> | null`

    Metadata copied onto each created task at fire time.

  - `task_params?: Record<string, unknown> | null`

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

  - `timezone?: string`

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

### Returns

- `ScheduleCreateResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const schedule = await client.agents.schedules.create('agent_id', {
  initial_input: { content: 'content' },
  name: 'name',
});

console.log(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

`client.agents.schedules.list(stringagentID, ScheduleListParamsquery?, RequestOptionsoptions?): ScheduleListResponse`

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

List run schedules for an agent.

### Parameters

- `agentID: string`

- `query: ScheduleListParams`

  - `include_live?: boolean`

    Include live Temporal state and upcoming action times.

  - `limit?: number`

### Returns

- `ScheduleListResponse`

  Response model for listing run schedules.

  - `run_schedules: Array<RunSchedule>`

    The list of run schedules.

    - `id: string`

      The unique identifier of the run schedule.

    - `agent_id: string`

      The agent this schedule belongs to.

    - `initial_input: InitialInput`

      The initial input.

      - `content: string`

        The initial prompt delivered to the task.

      - `author?: MessageAuthor`

        The author attributed to the initial input.

        - `"user"`

        - `"agent"`

      - `type?: "text"`

        Input content type.

        - `"text"`

    - `initial_input_method: string`

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

    - `name: string`

      Human-readable schedule name.

    - `created_at?: string | null`

      When the schedule was created.

    - `creator_principal?: CreatorPrincipal | null`

      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?: string | null`

        Account/workspace id of the creator.

      - `principal_type?: string | null`

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

      - `service_account_id?: string | null`

        Creator service-account id, if a service principal.

      - `user_id?: string | null`

        Creator user id, if a user principal.

    - `cron_expression?: string | null`

      Cron cadence, if cron-based.

    - `description?: string | null`

      Optional description.

    - `end_at?: string | null`

      Schedule deactivation time.

    - `interval_seconds?: number | null`

      Interval cadence in seconds, if interval-based.

    - `last_action_time?: string | null`

      When the schedule last fired.

    - `live_data_available?: boolean | null`

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

    - `next_action_times?: Array<string>`

      Upcoming scheduled fire times.

    - `num_actions_taken?: number`

      Number of times the schedule has fired.

    - `paused?: boolean`

      Whether the schedule is paused.

    - `skipped_action_times?: Array<string>`

      Skipped one-off scheduled fire times.

    - `start_at?: string | null`

      Schedule activation time.

    - `state?: "ACTIVE" | "PAUSED"`

      Live schedule state from Temporal.

      - `"ACTIVE"`

      - `"PAUSED"`

    - `task_metadata?: Record<string, unknown> | null`

      Task metadata at fire time.

    - `task_params?: Record<string, unknown> | null`

      Task params at fire time.

    - `timezone?: string`

      Timezone the cron expression is evaluated in.

    - `updated_at?: string | null`

      When the schedule was updated.

  - `total: number`

    The number of run schedules returned.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const schedules = await client.agents.schedules.list('agent_id');

console.log(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

`client.agents.schedules.retrieve(stringscheduleID, ScheduleRetrieveParamsparams, RequestOptionsoptions?): ScheduleRetrieveResponse`

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

Get a run schedule by its id.

### Parameters

- `scheduleID: string`

- `params: ScheduleRetrieveParams`

  - `agent_id: string`

### Returns

- `ScheduleRetrieveResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const schedule = await client.agents.schedules.retrieve('schedule_id', { agent_id: 'agent_id' });

console.log(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

`client.agents.schedules.update(stringscheduleID, ScheduleUpdateParamsparams, RequestOptionsoptions?): ScheduleUpdateResponse`

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

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

### Parameters

- `scheduleID: string`

- `params: ScheduleUpdateParams`

  - `agent_id: string`

    Path param

  - `cron_expression?: string | null`

    Body param: New cron cadence. Mutually exclusive with interval_seconds.

  - `description?: string | null`

    Body param: Optional description of what this schedule does.

  - `end_at?: string | null`

    Body param: When the schedule should stop being active.

  - `initial_input?: InitialInput | null`

    Body param: The first input delivered to each freshly created scheduled task.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `interval_seconds?: number | null`

    Body param: New interval cadence in seconds. Mutually exclusive with cron_expression.

  - `name?: string | null`

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

  - `paused?: boolean | null`

    Body param: Pause/resume the schedule as part of the update.

  - `start_at?: string | null`

    Body param: When the schedule should start being active.

  - `task_metadata?: Record<string, unknown> | null`

    Body param: Metadata copied onto each created task at fire time.

  - `task_params?: Record<string, unknown> | null`

    Body param: Resolved config forwarded as task `params` at fire time.

  - `timezone?: string | null`

    Body param: IANA timezone the cron expression is evaluated in.

### Returns

- `ScheduleUpdateResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const schedule = await client.agents.schedules.update('schedule_id', { agent_id: 'agent_id' });

console.log(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

`client.agents.schedules.delete(stringscheduleID, ScheduleDeleteParamsparams, RequestOptionsoptions?): DeleteResponse`

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

Delete a run schedule permanently.

### Parameters

- `scheduleID: string`

- `params: ScheduleDeleteParams`

  - `agent_id: string`

### Returns

- `DeleteResponse`

  - `id: string`

  - `message: string`

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const deleteResponse = await client.agents.schedules.delete('schedule_id', {
  agent_id: 'agent_id',
});

console.log(deleteResponse.id);
```

#### Response

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

## Pause Run Schedule

`client.agents.schedules.pause(stringscheduleID, SchedulePauseParamsparams, RequestOptionsoptions?): SchedulePauseResponse`

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

Pause a run schedule so it stops firing.

### Parameters

- `scheduleID: string`

- `params: SchedulePauseParams`

  - `agent_id: string`

    Path param

  - `note?: string | null`

    Body param: Optional note explaining the pause.

### Returns

- `SchedulePauseResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const response = await client.agents.schedules.pause('schedule_id', { agent_id: 'agent_id' });

console.log(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

`client.agents.schedules.resume(stringscheduleID, ScheduleResumeParamsparams, RequestOptionsoptions?): ScheduleResumeResponse`

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

Resume a paused run schedule so it fires again.

### Parameters

- `scheduleID: string`

- `params: ScheduleResumeParams`

  - `agent_id: string`

    Path param

  - `note?: string | null`

    Body param: Optional note explaining the resume.

### Returns

- `ScheduleResumeResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const response = await client.agents.schedules.resume('schedule_id', { agent_id: 'agent_id' });

console.log(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

`client.agents.schedules.trigger(stringscheduleID, ScheduleTriggerParamsparams, RequestOptionsoptions?): 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

- `scheduleID: string`

- `params: ScheduleTriggerParams`

  - `agent_id: string`

### Returns

- `ScheduleTriggerResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const response = await client.agents.schedules.trigger('schedule_id', { agent_id: 'agent_id' });

console.log(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

`client.agents.schedules.skip(stringscheduleID, ScheduleSkipParamsparams, RequestOptionsoptions?): ScheduleSkipResponse`

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

Skip a recurring fire of the schedule.

### Parameters

- `scheduleID: string`

- `params: ScheduleSkipParams`

  - `agent_id: string`

    Path param

  - `scheduled_time: string`

    Body param: Specific scheduled fire time to skip.

### Returns

- `ScheduleSkipResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const response = await client.agents.schedules.skip('schedule_id', {
  agent_id: 'agent_id',
  scheduled_time: '2019-12-27T18:11:19.117Z',
});

console.log(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

`client.agents.schedules.unskip(stringscheduleID, ScheduleUnskipParamsparams, RequestOptionsoptions?): ScheduleUnskipResponse`

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

Remove a skip for a recurring fire of the schedule.

### Parameters

- `scheduleID: string`

- `params: ScheduleUnskipParams`

  - `agent_id: string`

    Path param

  - `scheduled_time: string`

    Body param: Specific scheduled fire time to unskip.

### Returns

- `ScheduleUnskipResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const response = await client.agents.schedules.unskip('schedule_id', {
  agent_id: 'agent_id',
  scheduled_time: '2019-12-27T18:11:19.117Z',
});

console.log(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

`client.agents.schedules.retrieveByName(stringname, ScheduleRetrieveByNameParamsparams, RequestOptionsoptions?): ScheduleRetrieveByNameResponse`

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

Get a run schedule by its active name.

### Parameters

- `name: string`

- `params: ScheduleRetrieveByNameParams`

  - `agent_id: string`

### Returns

- `ScheduleRetrieveByNameResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const response = await client.agents.schedules.retrieveByName('name', { agent_id: 'agent_id' });

console.log(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

`client.agents.schedules.updateByName(stringname, ScheduleUpdateByNameParamsparams, RequestOptionsoptions?): ScheduleUpdateByNameResponse`

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

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

### Parameters

- `name: string`

- `params: ScheduleUpdateByNameParams`

  - `agent_id: string`

    Path param

  - `cron_expression?: string | null`

    Body param: New cron cadence. Mutually exclusive with interval_seconds.

  - `description?: string | null`

    Body param: Optional description of what this schedule does.

  - `end_at?: string | null`

    Body param: When the schedule should stop being active.

  - `initial_input?: InitialInput | null`

    Body param: The first input delivered to each freshly created scheduled task.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `interval_seconds?: number | null`

    Body param: New interval cadence in seconds. Mutually exclusive with cron_expression.

  - `name?: string | null`

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

  - `paused?: boolean | null`

    Body param: Pause/resume the schedule as part of the update.

  - `start_at?: string | null`

    Body param: When the schedule should start being active.

  - `task_metadata?: Record<string, unknown> | null`

    Body param: Metadata copied onto each created task at fire time.

  - `task_params?: Record<string, unknown> | null`

    Body param: Resolved config forwarded as task `params` at fire time.

  - `timezone?: string | null`

    Body param: IANA timezone the cron expression is evaluated in.

### Returns

- `ScheduleUpdateByNameResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const response = await client.agents.schedules.updateByName('name', { agent_id: 'agent_id' });

console.log(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

`client.agents.schedules.deleteByName(stringname, ScheduleDeleteByNameParamsparams, RequestOptionsoptions?): DeleteResponse`

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

Delete a run schedule by its active name.

### Parameters

- `name: string`

- `params: ScheduleDeleteByNameParams`

  - `agent_id: string`

### Returns

- `DeleteResponse`

  - `id: string`

  - `message: string`

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const deleteResponse = await client.agents.schedules.deleteByName('name', { agent_id: 'agent_id' });

console.log(deleteResponse.id);
```

#### Response

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

## Pause Run Schedule By Name

`client.agents.schedules.pauseByName(stringname, SchedulePauseByNameParamsparams, RequestOptionsoptions?): SchedulePauseByNameResponse`

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

Pause a run schedule by its active name.

### Parameters

- `name: string`

- `params: SchedulePauseByNameParams`

  - `agent_id: string`

    Path param

  - `note?: string | null`

    Body param: Optional note explaining the pause.

### Returns

- `SchedulePauseByNameResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const response = await client.agents.schedules.pauseByName('name', { agent_id: 'agent_id' });

console.log(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

`client.agents.schedules.resumeByName(stringname, ScheduleResumeByNameParamsparams, RequestOptionsoptions?): ScheduleResumeByNameResponse`

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

Resume a paused run schedule by its active name.

### Parameters

- `name: string`

- `params: ScheduleResumeByNameParams`

  - `agent_id: string`

    Path param

  - `note?: string | null`

    Body param: Optional note explaining the resume.

### Returns

- `ScheduleResumeByNameResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const response = await client.agents.schedules.resumeByName('name', { agent_id: 'agent_id' });

console.log(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

`client.agents.schedules.triggerByName(stringname, ScheduleTriggerByNameParamsparams, RequestOptionsoptions?): ScheduleTriggerByNameResponse`

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

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

### Parameters

- `name: string`

- `params: ScheduleTriggerByNameParams`

  - `agent_id: string`

### Returns

- `ScheduleTriggerByNameResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Example

```typescript
import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const response = await client.agents.schedules.triggerByName('name', { agent_id: 'agent_id' });

console.log(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

- `ScheduleCreateResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Schedule List Response

- `ScheduleListResponse`

  Response model for listing run schedules.

  - `run_schedules: Array<RunSchedule>`

    The list of run schedules.

    - `id: string`

      The unique identifier of the run schedule.

    - `agent_id: string`

      The agent this schedule belongs to.

    - `initial_input: InitialInput`

      The initial input.

      - `content: string`

        The initial prompt delivered to the task.

      - `author?: MessageAuthor`

        The author attributed to the initial input.

        - `"user"`

        - `"agent"`

      - `type?: "text"`

        Input content type.

        - `"text"`

    - `initial_input_method: string`

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

    - `name: string`

      Human-readable schedule name.

    - `created_at?: string | null`

      When the schedule was created.

    - `creator_principal?: CreatorPrincipal | null`

      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?: string | null`

        Account/workspace id of the creator.

      - `principal_type?: string | null`

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

      - `service_account_id?: string | null`

        Creator service-account id, if a service principal.

      - `user_id?: string | null`

        Creator user id, if a user principal.

    - `cron_expression?: string | null`

      Cron cadence, if cron-based.

    - `description?: string | null`

      Optional description.

    - `end_at?: string | null`

      Schedule deactivation time.

    - `interval_seconds?: number | null`

      Interval cadence in seconds, if interval-based.

    - `last_action_time?: string | null`

      When the schedule last fired.

    - `live_data_available?: boolean | null`

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

    - `next_action_times?: Array<string>`

      Upcoming scheduled fire times.

    - `num_actions_taken?: number`

      Number of times the schedule has fired.

    - `paused?: boolean`

      Whether the schedule is paused.

    - `skipped_action_times?: Array<string>`

      Skipped one-off scheduled fire times.

    - `start_at?: string | null`

      Schedule activation time.

    - `state?: "ACTIVE" | "PAUSED"`

      Live schedule state from Temporal.

      - `"ACTIVE"`

      - `"PAUSED"`

    - `task_metadata?: Record<string, unknown> | null`

      Task metadata at fire time.

    - `task_params?: Record<string, unknown> | null`

      Task params at fire time.

    - `timezone?: string`

      Timezone the cron expression is evaluated in.

    - `updated_at?: string | null`

      When the schedule was updated.

  - `total: number`

    The number of run schedules returned.

### Schedule Retrieve Response

- `ScheduleRetrieveResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Schedule Update Response

- `ScheduleUpdateResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Schedule Pause Response

- `SchedulePauseResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Schedule Resume Response

- `ScheduleResumeResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Schedule Trigger Response

- `ScheduleTriggerResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Schedule Skip Response

- `ScheduleSkipResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Schedule Unskip Response

- `ScheduleUnskipResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Schedule Retrieve By Name Response

- `ScheduleRetrieveByNameResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Schedule Update By Name Response

- `ScheduleUpdateByNameResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Schedule Pause By Name Response

- `SchedulePauseByNameResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Schedule Resume By Name Response

- `ScheduleResumeByNameResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.

### Schedule Trigger By Name Response

- `ScheduleTriggerByNameResponse`

  Response model describing a scheduled agent run.

  - `id: string`

    The unique identifier of the run schedule.

  - `agent_id: string`

    The agent this schedule belongs to.

  - `initial_input: InitialInput`

    The initial input.

    - `content: string`

      The initial prompt delivered to the task.

    - `author?: MessageAuthor`

      The author attributed to the initial input.

      - `"user"`

      - `"agent"`

    - `type?: "text"`

      Input content type.

      - `"text"`

  - `initial_input_method: string`

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

  - `name: string`

    Human-readable schedule name.

  - `created_at?: string | null`

    When the schedule was created.

  - `creator_principal?: CreatorPrincipal | null`

    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?: string | null`

      Account/workspace id of the creator.

    - `principal_type?: string | null`

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

    - `service_account_id?: string | null`

      Creator service-account id, if a service principal.

    - `user_id?: string | null`

      Creator user id, if a user principal.

  - `cron_expression?: string | null`

    Cron cadence, if cron-based.

  - `description?: string | null`

    Optional description.

  - `end_at?: string | null`

    Schedule deactivation time.

  - `interval_seconds?: number | null`

    Interval cadence in seconds, if interval-based.

  - `last_action_time?: string | null`

    When the schedule last fired.

  - `live_data_available?: boolean | null`

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

  - `next_action_times?: Array<string>`

    Upcoming scheduled fire times.

  - `num_actions_taken?: number`

    Number of times the schedule has fired.

  - `paused?: boolean`

    Whether the schedule is paused.

  - `skipped_action_times?: Array<string>`

    Skipped one-off scheduled fire times.

  - `start_at?: string | null`

    Schedule activation time.

  - `state?: "ACTIVE" | "PAUSED"`

    Live schedule state from Temporal.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `task_metadata?: Record<string, unknown> | null`

    Task metadata at fire time.

  - `task_params?: Record<string, unknown> | null`

    Task params at fire time.

  - `timezone?: string`

    Timezone the cron expression is evaluated in.

  - `updated_at?: string | null`

    When the schedule was updated.
