For complex command-line operations on ECS instances, you can use the Workbench AI Agent mode to plan and execute tasks, such as software installation and issue diagnosis, using natural language instructions. This improves O&M efficiency.
Overview
The Workbench AI Agent mode is an intelligent assistant built into Alibaba Cloud Workbench. This mode allows you to interact directly with the terminal by using natural language, which transforms complex command-line operations that require memorization and manual execution into simple, conversational tasks.
Core capabilities
Automatic recognition of shell commands and natural language instructions: For example, if you enter
ls, the mode recognizes it as a shell command and does not trigger a session.Intelligent task decomposition: When the Agent receives high-level requests such as
install Dockerorcheck CPU, it automatically breaks them down into a series of specific, executable command-line steps.Dynamic workflow adjustment: The Agent does not mechanically execute preset scripts. It adjusts its plan in real time based on the execution result (success, failure, or specific output) of the previous command.
Autonomous decision-making and planning: With clear instructions, the Agent can autonomously plan the process required to complete a task. For example, it automatically handles dependencies during software installation.
Context awareness: The Agent understands contextual information such as the terminal's current directory and command history to provide more accurate and relevant operational suggestions.
OpenAPI calls: The Agent can call OpenAPI to obtain instance-related information as needed.
Currently, only the DescribeInstanceAttribute, DescribeSecurityGroupAttribute, and DescribeDisks APIs are supported.
Use cases
Issue diagnosis | Software installation | System O&M |
For example, when a server responds slowly. Input: | For example, when you need to install Docker. Input: | For example, when you need to disable password authentication for SSH. Input: |
Prerequisites
Before you use the Workbench AI Agent mode, make sure that the following requirements are met:
Your Alibaba Cloud account or RAM user has the required permissions to log on to the target ECS instance using Workbench.
(Optional) If the task involves downloading software from the internet, such as installing Nginx or WordPress, make sure that the ECS instance has public network access. You can configure a public IP address or a NAT Gateway for the instance.
Use the AI Agent mode
Log on to a Linux instance using Workbench
Log on to the ECS console, find the target instance, and click Connect in the Actions column. Then click Sign in now next to Workbench.
Enter AI Agent mode
After you log on to the instance, you can enter AI Agent mode in any of the following ways:
Method 1 (Button): At the top of the terminal, click Agent.
This method is available only in the new version of Workbench.

Method 2 (Keyboard shortcut): In the terminal, press
Command + Ion macOS orCtrl + Shift + Ion Windows.Method 3 (Context menu): In the terminal, right-click and select AI Terminal Mode.
Enter an instruction
After you enter the mode, the input prompt changes to the AI Agent mode's specific style. Enter a simple natural language instruction and press Enter. For example:
My instance is a bit slow. Help me analyze and resolve the issue.You can press
Shift + Enterto force an AI Agent interaction. The input is then always interpreted as natural language.Review and execute
The Agent understands your intent and plans the corresponding shell commands. Before you run a command, review it to make sure that it meets your expectations. After you confirm the command, click Run.
ImportantAI-generated content is for reference only. You are responsible for verifying all suggested operations and for any potential risks or consequences.


Before you execute a high-risk command, such as using the
killcommand to terminate a process, the command box is highlighted in red and requires a second confirmation. Verify the command before you run it to ensure operational safety.
While the AI is generating a response, you can click the
icon to the right of the output or press Ctrl/Command + Cto stop the output.
To modify a command in the AI response, click Modify above the command or press
Ctrl/Command + E. After you make changes, click Save or pressESC.
Start a new conversation (clear conversation history)
After the task is complete, you can click New Conversation below the AI output to clear the current conversation history.
More examples
Upload and download files
In AI Agent mode, you can upload or download files using natural language instructions.
File upload
Example input:
Upload a file to the current directoryFile download
Example input:
Download test.md to my local machine
Call OpenAPI for instance information
When needed, the Agent can call OpenAPI to retrieve instance-related information, such as an instance's security group information. It currently supports only the DescribeInstanceAttribute, DescribeSecurityGroupAttribute, and DescribeDisks APIs.
Example input: Check if the security group of this instance allows access from 192.168.2.10
FAQ
Pricing for AI Agent mode
No. The AI Agent mode is included at no additional cost.

