All Products
Search
Document Center

Cloud Phone:RunAgentTask

Last Updated:Jul 03, 2026

Triggers an Agent to execute an AI automation task on Mobile nodes.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

GET  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

InstanceIds

array

No

The list of Mobile node IDs. A maximum of 100 nodes are supported per request.

string

No

The Mobile node ID, such as acp-xxx.

acp-5hh4a31emkt6u****

UserPrompt

string

No

The user instruction in natural language. The Agent performs operations based on this instruction.

去应用宝下载钉钉

MaxSteps

integer

No

The maximum number of execution steps for the task. This prevents infinite loops. Valid values: 30 to 1000. Default value: 1000.

30

TimeoutSeconds

integer

No

The timeout period of the task, in seconds. Valid values: 300 to 3600. Default value: 3600.

3600

BizRegionId

string

No

The region ID of the Mobile node.

cn-shanghai

TaskConfigId

string

No

The task configuration ID used to trigger a task with the specified configuration.

tsk-260625-49be****

ScheduleId

string

No

The scheduling plan ID. When specified, execution records are associated with the corresponding scheduled node, which facilitates aggregation query by scheduling dimension.

sch-260625-pbj2****

Targets

array<object>

No

The array of target objects. Each element contains an InstanceId and a SessionId.

object

No

The target object.

InstanceId

string

No

The Mobile node ID, such as acp-xxx.

acp-5hh4a31emkt6u****

SessionId

string

No

The session ID. Tasks with the same session ID share context, such as ses-260702-21b****.

ses-260702-21bh****。

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

6C8439B9-7DBF-57F4-92AE-55A9B9D3****

Code

string

The status code of the operation.

例如 "200" 表示成功。

Message

string

The response message.

Success.

Count

integer

The number of tasks.

1

Tasks

array<object>

The list of tasks.

object

The task.

TaskId

string

The task ID, which is globally unique.

t-imr0fufqd7cle****

InstanceId

string

The Mobile node ID.

acp-ek65k51zoxia3x8xz

UserPrompt

string

The user instruction in natural language. The Agent performs operations based on this instruction.

去应用宝下载钉钉

CurrentStatus

string

The current status of the task. Valid values:

PENDING: The task is being created.

RUNNING: The task is running.

COMPLETED: The task is completed.

FAILED: The task failed.

TIMEOUT: The task timed out.

CALL_FOR_USER: The task is waiting for user action.

PAUSING: The task is being paused.

PAUSED: The task is paused.

CANCELLING: The task is being canceled.

CANCELED: The task is canceled.

STOPPED: The task is stopped.

TIMEOUT: The task timed out.

COMPLETED

RunningAt

string

The time when the task was created, in ISO 8601 format.

2026-04-13T17:42:19Z

SessionId

string

The session ID. Tasks with the same session ID share context.

ses-260702-21bh****。

Examples

Success response

JSON format

{
  "RequestId": "6C8439B9-7DBF-57F4-92AE-55A9B9D3****",
  "Code": "例如 \"200\" 表示成功。",
  "Message": "Success.",
  "Count": 1,
  "Tasks": [
    {
      "TaskId": "t-imr0fufqd7cle****",
      "InstanceId": "acp-ek65k51zoxia3x8xz",
      "UserPrompt": "去应用宝下载钉钉",
      "CurrentStatus": "COMPLETED",
      "RunningAt": "2026-04-13T17:42:19Z",
      "SessionId": "ses-260702-21bh****。"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.