What is SLS DataAgent?

Updated at:

SLS DataAgent is the natural-language query and analysis capability provided by Simple Log Service (SLS). It organizes the log data, query assets, and business definitions that SLS continuously generates into manageable semantic models. These models allow a DataAgent to recognize what you are asking, identify the projects and LogStores to query, and determine the definition that each metric uses.

SLS DataAgent is intended for teams that already send business logs or operational data to SLS and want to spend less time writing query statements, locating data sources, and repeatedly confirming metric definitions.

How it works

SLS DataAgent turns Raw Logs into queryable business context through a three-layer model:

SLS project / Logstore
          ↓
Source Model: identifies data structures, field semantics, metrics, and terms
          ↓
Context Model: aggregates data sources by business scenario and adds unified definitions
          ↓
DataAgent: interprets natural-language questions, builds queries, and returns analysis results

A Source Model maps one-to-one to an SLS project. SLS extracts semantics from LogStore indexes, data samples, and the existing assets in the project, such as dashboards, alerts, and Scheduled SQL jobs. Content with a sufficiently high confidence level can be adopted automatically, whereas ambiguous content requires manual confirmation.

A Context Model targets a specific business scenario. It can be associated with one or more Source Models, and you select the LogStores that it uses. It centrally manages data tables, metrics, terms, and query examples so that multiple data sources share one business language.

You use the SLS DataAgent capability by creating a DataAgent. Each DataAgent is bound to at least one Context Model and accesses data through a specified Resource Access Management (RAM) role. When you ask a question in natural language, the DataAgent selects data sources, builds a query, and returns results based on the bound business definitions and range selection. If multiple metric definitions or data sources could match the question, the DataAgent asks for clarification first.

Key capabilities

Build data semantics automatically

A Source Model automatically identifies the fields, data types, enumeration values, and field roles in a LogStore, and generates metric and term candidates from your existing query assets. The modeling results keep their source and adoption status for data owners to review.

Unify business definitions

A Context Model brings together the data related to one business scenario from different projects. For example, an order analysis model can associate access logs, order logs, and inventory logs, and unify the definitions of paid orders, transaction amount, and failure rate.

Natural-language query and analysis

A DataAgent lets you query SLS log data in natural language. You can count requests, compare trends, identify the APIs that return errors, or analyze changes in business metrics. The scope of each answer is determined by the bound Context Model and the permissions of the RAM role.

Manual correction and ongoing maintenance

Automatically generated semantics are not the final business definitions. Data owners can confirm or edit the content that a Source Model has not adopted, and can add business metrics, terms, and query examples to a Context Model. After the data structure changes, data owners can regenerate the Source Model and synchronize the confirmed content to the associated Context Models.

Key benefits

BenefitDescription
Near-real-time dataQuery the continuously updated data in SLS directly to reduce cross-platform replication and data latency.
Reuse of existing assetsExtract established data usage patterns from dashboards, alerts, Scheduled SQL jobs, and data samples.
Manageable definitionsMaintain fields, metrics, terms, and query examples in one place to reduce different definitions for the same question.
Explicit data scopeControl the business scope through the Context Model and the resources accessible at runtime through the RAM role.
Correctable resultsManually confirm semantics with a low confidence level and clarify ambiguous questions during the conversation.

Common scenarios

API error analysis

You can ask questions such as "Which API returned the most errors in the last hour?" or "When did the failure rate of the payment API start to rise?" The DataAgent builds a query from the API fields, the meaning of the status codes, and the defined metrics, and then returns a ranked list or a trend.

Traffic and business metric analysis

For order, campaign, content, or user behavior logs, you can query traffic, conversions, transactions, and engagement, and further break the results down by channel, region, product, or user group.

Log troubleshooting

Operations and development engineers can start from an anomaly and narrow down the time range, service, and request characteristics over multiple rounds of questions. This reduces switching between multiple LogStores and query pages.

Permissions and data scope

The following rules determine what you can manage and what data a DataAgent can access:

  • Management permissions — The permissions of your RAM user determine whether you can create or manage models, DataAgents, and sessions.

  • Runtime data access — The RAM role bound to a DataAgent determines the data that the DataAgent can access at runtime.

  • Semantic scope — A DataAgent uses only the adopted semantic content in the Context Models bound to it.

  • Planned capabilities — Support for connecting a Context Model to your own enterprise agents, open APIs, and more complete auditing capabilities is subject to the official release notes.

Next steps

The current SLS DataAgent documentation covers the query and analysis workflow in the console and does not cover automatic changes to business data or cloud resources. To start querying, create a DataAgent bound to at least one Context Model, and then ask questions in natural language in the console.