Intelligent Conversation quick start
This topic walks you through a complete STAROps Intelligent Conversation experience from scratch. Estimated time: 5 to 10 minutes (about 5 minutes if you use the built-in employee, or about 10 minutes if you create a custom digital employee).
Core concepts
Before you begin, familiarize yourself with the following core concepts to better understand the procedure:
Digital employee: the intelligent execution entity of STAROps. A digital employee understands your natural language requests and invokes the corresponding tools to query data.
Built-in employee (Ops Agent): a digital employee preset by STAROps that you can use directly without creating it. It inherits the permissions of the calling account and is suitable for a quick trial.
Custom digital employee: a dedicated digital employee that you create based on your business requirements. You can attach a specific RAM role to it to control its data access scope. Custom digital employees are suitable for production environments. For more information, see Create a Digital Employee.
RAM user: an identity in Resource Access Management (RAM) that is used to control access to cloud resources. The permissions that you configure in Step 1 are granted to the RAM user. The built-in employee uses the permissions of the RAM user to run conversations and long-running tasks. For more information, see RAM user overview.
RAM role: an identity in Resource Access Management (RAM) that is used to control access to cloud resources. A custom digital employee determines which data it can access based on the RAM role attached to it. For more information, see RAM role overview.
Service role (AliyunServiceRoleForSTAROps): the default service role of STAROps, which is automatically attached when you create a custom digital employee. This role is preconfigured with permissions to access Cloud Monitor and Simple Log Service (SLS) data, so no additional configuration is required. For more fine-grained permission control, you can use a custom RAM role instead.
Note: This tutorial uses the built-in employee as an example. If you only want a quick trial and do not need to learn about RAM roles in depth, use the built-in employee directly.
What you will accomplish
After you complete this tutorial, you will be able to:
Ask a digital employee questions in natural language to have an intelligent conversation with STAROps.
(Optional) Ask about an issue that you are currently concerned about and observe the analysis process and the results returned by the digital employee.
This tutorial includes the complete environment preparation steps (configuring permissions and creating a digital employee), so you can complete it even if you use STAROps for the first time.
Prerequisites
Before you begin, make sure that the following conditions are met:
You have an Alibaba Cloud account. STAROps does not require activation. You can use it after you log on to the console.
The identity that you use has the required permissions. An Alibaba Cloud account has all permissions by default. A RAM user can perform operations only after it is granted STAROps operation permissions (see Step 1).
Step 1: Configure permissions for the RAM user
If you use an Alibaba Cloud account, skip this step and go to Step 2.
Before you use a RAM user, the Alibaba Cloud account or a RAM administrator must grant STAROps operation permissions to the RAM user.
This policy contains the following permissions:
starops:*: all operation permissions on STAROps, which are used to log on to the console, create digital employees, start conversations, view results, and perform other operations.cms:*: all operation permissions on Cloud Monitor, which are used to query data such as resource status, performance metrics, and alert information in Cloud Monitor.log:*: all operation permissions on Simple Log Service (SLS), which are used to query log data in SLS.ram:PassRole: the permission to pass a RAM role to STAROps. This permission is required only when you create a custom digital employee.
Permission usage scenarios:
Use the built-in employee: The digital employee directly uses the permissions of the current RAM user to access Cloud Monitor and SLS data. Therefore, the
cms:*andlog:*permissions are required.Use a custom digital employee: The digital employee uses the permissions of the attached RAM role to access data. The current RAM user does not need the
cms:*andlog:*permissions, but you must configure the corresponding data access permissions for the RAM role.
Note: The preceding permissions are suitable for a quick trial. In production environments, we recommend that you follow the principle of least privilege and grant only the required operation permissions. For more information about permission configuration, see Permission configuration.
Procedure:
Log on to the RAM console .
In the left-side navigation pane, choose Permissions > Policies.
Click Create Policy.
Click the JSON tab and paste the following policy document into the policy editor:
{
"Version": "1",
"Statement": [
{
"Effect": "Allow",
"Action": [
"starops:*",
"cms:*",
"log:*",
"ram:PassRole"
],
"Resource": "*"
}
]
}Click Next to edit policy information, enter a policy name (such as
STAROpsFullAccess) and a description, and then click OK.In the left-side navigation pane, choose Identities > Users. Find the target RAM user and click Add Permissions.
In the authorization panel, search for and select the policy that you created, and then click OK.
Expected result: The RAM user obtains all operation permissions on STAROps, Cloud Monitor, and SLS, as well as the permission to pass RAM roles.
Step 2: Create a digital employee
A digital employee is the entity that runs Intelligent Conversations in STAROps. The built-in employee is suitable for a quick trial, and custom digital employees are suitable for production use.
Method 1: Use the built-in employee (recommended for a quick trial)
The built-in employee (display name: Ops Agent) is a digital employee preset by STAROps. You can use it directly without creating it.
Log on to theSTAROps console.
In the left-side navigation pane, click Digital Employees.
In the digital employee list, find the built-in employee (Ops Agent). This employee is preset and requires no additional operations.
Expected result: The built-in employee exists and is ready to use.
Note: The built-in employee is preconfigured with basic permissions and data access capabilities and is suitable for a quick trial. To access custom data sources or cross-account resources, use Method 2 to create a custom digital employee.
Method 2: Create a custom digital employee
If you need to access custom data sources or cross-account resources, you can create a custom digital employee.
Log on to the STAROps console.
In the left-side navigation pane, click Digital Employees.
Click Create Digital Employee.
In the creation panel, configure the following parameters:
Parameter
Required
Description
Example
ID
Yes
The unique identifier of the digital employee. It cannot be modified after creation.
my-agent-01Display Name
Yes
The display name of the digital employee.
K8s Cluster O&M ExpertSelect Region
No
The region where data is stored. We recommend that you select the region where your resources reside.
China (Beijing)RAM Role Type
No
The role type. Default value: service role.
Service Role
Description
No
The responsibilities of the digital employee.
Performs routine inspections and alert analysis for production K8s clustersFor more information about the parameters, see Create a Digital Employee.
Click OK.
Expected result: The digital employee is created, and the digital employee list page appears with the new digital employee displayed in the list. Click the name of the employee to go to its details page, and then proceed to Step 3 to connect data sources to it.
Note: You must have STAROps operation permissions to create a custom digital employee. If a message indicates insufficient permissions, make sure that the permission policy in Step 1 is correctly configured (starops:* includes the permission to create digital employees). For more information, see Create a Digital Employee.Step 3: Start a conversation
In the left-side navigation pane of the STAROps console, click Digital Employees.
In the digital employee list, click the card of the digital employee that you want to converse with to go to its details page.
In the left-side navigation pane of the details page, click New Conversation to open the Intelligent Conversation interface.
(Optional) In the lower-right corner of the conversation interface, select an AI model. The Auto mode is used by default and is suitable for most scenarios. To learn about the features and use cases of different models, see Model selection.
(Optional, built-in employee only) At the top of the conversation interface, select a data scope (a workspace or a project). The built-in employee lets you specify the data scope for queries. Custom employees do not support this feature.
In the input box, describe your requirements in natural language. A digital employee can help you complete the following tasks:
Query resource status: View information such as resource usage and performance metrics in Cloud Monitor or SLS.
Analyze alert events: Analyze the causes and impact scope of current alerts and obtain handling suggestions.
Diagnose root causes: Locate the root causes of issues such as service exceptions and performance degradation.
Question suggestions:
If you have active alerts: Copy the name or related information of an active alert from the Cloud Monitor console and let the digital employee analyze it for you. Examples:
"Analyze the CPU usage alerts that occurred in the last hour"
"What is the cause of this RDS connection count alert"
If you have no alerts or resources yet: Try the following general questions:
"What can you help me with"
"How do I create a scheduled inspection task"
"How do I configure a connector to ingest Cloud Monitor data"
Press Enter or click Send, and then wait for the digital employee to return the result.
Expected result: The digital employee starts to respond, and the interface displays the thinking process or the tool invocation status. If no result is returned within 1 minute, check your network connection or see the FAQ.
Step 4: View the results
The digital employee automatically invokes the relevant tools to query data and presents the results in the conversation interface as text descriptions, data tables, or metric trend charts.
If you need further analysis, ask follow-up questions in the conversation. For example:
"What is the root cause of this alert?"
"Compare the data with the data from the same period last week."
Expected result: The conversation interface displays the complete query results and supports multi-turn follow-up questions.
Next steps
After you finish the basic Intelligent Conversation experience, you can explore the following capabilities:
Long-running tasks: Create long-running tasks to perform scheduled inspections or automated O&M. Both scheduled triggers and event triggers are supported. Scenario: You need scheduled inspections, periodic reports, or event-driven automated O&M. For more information, see Missions.
@entity reference: Type
@in the dialog box to reference entities in the workspace, such as Service, Node, and Pod, so that the AI can locate the analysis target more precisely. Scenario: When you know the specific resource that you want to analyze, use @entity reference to locate it quickly./ shortcut commands: Type
/in the dialog box to invoke shortcut capabilities such as/skill,/clear, and/compact. Scenario: You need to quickly clear the conversation or invoke a specific skill or tool.Default rules: Writing default rules for a digital employee significantly improves the conversation quality. Scenario: If you want the output format, analysis depth, or focus of the digital employee to meet specific requirements, configure default rules. For more information, see Configure default rules.