All Products
Search
Document Center

Elastic Compute Service:Manage ECS instances with Workbench AI Agent mode

Last Updated:Jul 15, 2026

Instruct the Workbench AI Agent with natural language to install software, diagnose issues, and execute O&M tasks on ECS instances.

How it works

The AI Agent mode is an intelligent assistant built into Workbench. It lets you interact with the terminal using natural language, turning complex command-line operations into conversational tasks.

Core capabilities

  • Automatically distinguishes Shell commands from natural language: For example, ls is recognized as a Shell command and does not trigger a conversation.

  • Intelligent task decomposition: High-level requests such as install Docker or check CPU are automatically broken down into executable command-line steps.

  • Dynamic workflow adjustment: The agent adjusts its plan in real time based on each command's result — whether it succeeded, failed, or produced specific output.

  • Autonomous decision-making and planning: Given a clear prompt, the agent plans the steps to complete a task, such as automatically resolving dependencies during software installation.

  • Context awareness: The agent understands the current terminal session — including the working directory and operation history — to provide scenario-specific suggestions.

  • OpenAPI integration: The agent calls OpenAPI to retrieve instance-related information when needed.

    Currently only DescribeInstanceAttribute, DescribeSecurityGroupAttribute, and DescribeDisks are supported.

Use cases

Scenario 1: Issue diagnosis

Scenario 2: Software installation

Scenario 3: System O&M

Example: A server is responding slowly.

Input:My instance is a bit slow, help me analyze and fix the problem.

Example: Install Docker.

Input:Please help me install Docker

Example: Disable password-based SSH login.

Input: Help me disable SSH password login

Prerequisites

Ensure the following requirements are met:

  • Your Alibaba Cloud account or RAM user has permissions to log on to the target instance with Workbench.

  • (Optional) If the task involves downloading software from the internet, the instance has public network access via a public IP address or NAT Gateway.

Use the AI Agent mode

  1. Log on to a Linux instance using Workbench

    On the ECS console, find the target instance and click Connect in the Actions column. Then, click Sign in now next to Workbench.

  2. Enter AI Agent mode

    After logging on, enter AI Agent mode in one of the following ways:

    • Method 1 (Button): Click Agent at the top of the terminal.

      Available only in the new version of Workbench.

      The Agent button also displays the keyboard shortcut ⌘ I.

    • Method 2 (Keyboard shortcut): In the terminal, press Command + I (macOS) or Ctrl + Shift + I (Windows).

    • Method 3 (Context menu): Right-click in the terminal and select AI Terminal Mode.

  3. Enter a prompt

    The input prompt changes to the AI Agent style. Type a natural language prompt and press Enter. For example:

    My instance is a bit slow. Help me analyze and fix it.
    Press Shift + Enter to force the agent to treat your input as natural language rather than a shell command.
  4. Review and run commands

    The agent interprets your prompt and plans the corresponding shell commands. Review each command and click Run.

    Important

    AI-generated content is for reference only. Verify each command before running it. You are responsible for any consequences of command execution.

    [root@iZbp000000000000 ~]# My instance is a bit slow, help me analyze and fix the problem.
    
    ● Sure, let me help you analyze why the instance is slow. First, let's check CPU usage to see if any process is consuming too many resources.
    
    Do you agree to run the following command and view the output?
    
      top -b -n 1 | head -n 20
    
    This command takes a snapshot of current CPU usage to help identify processes that may be consuming too many resources.
    
    [root@iZbp000000000000 ~]#
    [root@iZbpoooooooooooo ~]# top -b -n 1 | head -n 20
    top - 15:30:54 up 5 days, 23:08,  2 users,  load average: 4.94, 3.58, 2.71
    Tasks: 113 total,   7 running, 106 sleeping,   0 stopped,   0 zombie
    %Cpu(s): 96.8 us,  3.2 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
    MiB Mem :  7589.5 total,  5603.6 free,   682.5 used,  1562.0 buff/cache
    MiB Swap:    0.0 total,    0.0 free,    0.0 used.  6907.0 avail Mem
    
      PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
    44580 root      20   0  236580   9352   2760 R  93.3   0.1   0:47.32 python
    44581 root      20   0  236580   9492   2900 R  86.7   0.1   0:47.40 python
        1 root      20   0  103576  11480   8580 S   0.0   0.1   0:04.15 systemd
        2 root      20   0       0      0      0 S   0.0   0.0   0:00.04 kthreadd
        3 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_gp
        4 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_par_gp
        6 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/0:0H-events_highpri
        8 root       0 -20       0      0      0 I   0.0   0.0   0:00.31 kworker/0:1H-events_highpri
        9 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mm_percpu_wq
       11 root      20   0       0      0      0 S   0.0   0.0   0:00.00 rcu_tasks_rude_
       12 root      20   0       0      0      0 S   0.0   0.0   0:00.00 rcu_tasks_trace
       13 root      20   0       0      0      0 S   0.0   0.0   0:01.20 ksoftirqd/0
       14 root      20   0       0      0      0 R   0.0   0.0   0:21.35 rcu_sched
    [root@iZbpoooooooooooo ~]#

    High-risk commands, such as kill, are highlighted in red and require a second confirmation before execution.

    While the AI is generating a response, click the image icon or press Ctrl/Command + C to stop generation.

    [root@iZbp1oooooooooooooooo ~]# My instance is a bit slow, help me analyze and fix the problem.
    ○ Sure, let me help you analyze why the instance is slow. First, let's check CPU usage and look for any high-load processes.

    To edit a command before running it, click Modify or press Ctrl/Command + E. After editing, click Save or press ESC.

  5. Start a new conversation

    Click New Conversation below the AI output to clear the conversation history.

More operations

Upload and download files

Use natural language prompts to upload and download files in AI Agent mode.

  • File upload

    Example input: Upload file to the current directory

  • File download

    Example input: Download test.md locally

Query instance information with OpenAPI

The agent calls OpenAPI to retrieve instance-related information such as security group details. Currently only DescribeInstanceAttribute, DescribeSecurityGroupAttribute, and DescribeDisks are supported.

Example input:Check whether the security group of this instance allows access from 192.168.2.10

FAQ

Charges for AI Agent mode

The AI Agent mode is included at no additional cost.