Data Intelligence Luma is the AI-native analytics feature of EventHouse that lets you interact with event data using natural language. Luma automatically understands data structures to convert natural language into executable SQL queries, eliminating the need for manual query authoring.
Overview
Luma is part of the Data Intelligence Layer in the EventHouse architecture. It sits on top of the data analytics compute engine and serves as the top-level interface for users to interact with data.
Luma achieves data intelligence through the following core components:
Component | Description |
AI semantic layer | Provides business context to the AI, such as table structures, field meanings, and data relationships. |
DataAgent | An autonomous analysis engine that performs a complete analysis chain: interpreting questions, probing metadata, generating SQL, validating and fixing queries, and executing them. |
Natural language interaction | Supports multi-turn conversations, automatically clarifies ambiguous requests, and translates natural language into precise SQL queries. |
Permission awareness | All AI-driven queries respect the EventHouse permission system to ensure secure data access. |
Use cases
Data exploration: Use natural language to quickly understand data table structures and content distribution without needing to remember table or field names.
Ad hoc query: Describe your query needs in natural language. Luma automatically generates and runs the SQL, then returns the results directly.
Analysis assistance: For complex analysis needs, Luma generates multiple SQL options and automatically selects the optimal one.
DataAgent analysis process
When a user enters a query, DataAgent executes the following autonomous analysis process:
Understand the question: Identifies the query intent and type.
Probe metadata: Automatically finds relevant Catalog, Namespace, Table, and field information.
Confirm query details: If the request is unclear, it proactively asks for key parameters such as the time range or the fields to return.
Generate query statements: Generates one or more candidate SQL queries based on the request.
Validate and fix: Verifies the SQL syntax and executability. It automatically corrects issues related to sorting fields, LIMIT clauses, and more.
Execute and return results: Runs the optimal SQL query and displays the results in a table.
The reasoning process and tool calls for each step are displayed in real time within the conversation interface.
Key concepts
Agent
An agent is an analysis workspace in Luma. It is bound to specific data tables and a system prompt, creating an isolated analysis environment.
Property | Description |
Name | The identifier for the agent. |
Description | A description of the agent's purpose. |
Prompt | The system prompt that defines the agent's analytical role and behavior. |
Associated data | The scope of data tables the agent can access, selected through the Catalog > Namespace > Table hierarchy. |
By creating multiple agents, you can isolate data permissions and separate analysis scenarios. For example, you can create an agent for the operations team that is associated with alert data, and another for the business team that is associated with order data.
Conversation
A conversation is the basic unit of interaction with an agent. Each agent supports multiple independent conversations, and each conversation maintains its own context.
Luma uses the context of the current conversation to understand follow-up questions, enabling multi-turn conversations.
Starting a new conversation clears the previous context, which is ideal for beginning a new analysis task.
You can review past conversations at any time.
Prerequisites
You have activated the EventBridge service.
You have created an EventHouse Event Warehouse, and it contains queryable data tables managed by a data catalog (Catalog).
To use the MCP Endpoint feature in an agent's configuration panel, an administrator must also complete the following authorization steps:
Grant the system policy
AliyunEventBridgeMcpServerFullAccessto a RAM user. For more information, see Grant permissions to a RAM user.OAuth Authentication: Use an administrator account to go to the RAM console - OAuth Applications - Third-Party Applications page. Install the official OpenAPI MCP Server application and assign it to the RAM user who needs to use the MCP service. Otherwise, the MCP service cannot complete OAuth authorization. For more information, see Install and authorize a third-party application. For details on the authentication method and client configuration, see the OpenAPI MCP Server User Guide.
Create an agent
Log on to the EventBridge console.
In the left-side navigation pane, choose Event Warehouses > Data Intelligence Luma.
On the agent list page, click Create Agent.
In the creation dialog box, configure the following parameters.
Parameter
Required
Description
Name
Yes
The name of the agent, used to identify different analysis scenarios.
Description
Yes
A description of the agent's purpose.
Prompt
Yes
The system prompt that guides the agent's analysis behavior. For example: "You are an order data analysis expert who helps users analyze order trends and anomalies."
Associated data
Yes
The data tables the agent can access. Select at least one table by using the Catalog > Namespace > Table hierarchy.
Click Create.
After the agent is created, you are automatically redirected to the agent details page, where you can start querying data using natural language.
Query data using natural language
On the agent details page, enter your query in the conversation input box.
You can enter your query in natural language. Examples:
"Query the last 10 order records"
"Count today's orders by status"
"Find the top 5 orders by amount"
You can also click the suggested example questions to get started quickly.
Luma begins its autonomous analysis, and the process is displayed in real time in the conversation area.
Luma performs a sequence of steps: interpreting the question, probing metadata, generating SQL, validating and optimizing, and executing the query. If the query is unclear, Luma asks follow-up questions to confirm key parameters such as the time range or the fields to return. You can then provide the additional information as prompted.
After the query is complete, Luma returns a results table and the generated SQL statement.
Example: After you enter "Query the last 10 orders", Luma generates and runs the following SQL:
SELECT * FROM "order_events" ORDER BY __time__ DESC LIMIT 10AI-generated query results are for reference only. Manually verify critical data.
Ask follow-up questions in the same conversation for deeper analysis.
Luma uses the context from the current conversation to understand new requests. For example, after querying order data, you can ask "Show the daily trend of order counts", and Luma automatically generates a new aggregation query.
Configure an agent
After creating an agent, you can modify its prompt and associated data.
On the agent details page, click Settings in the title bar.
In the configuration panel on the right, modify the settings.
Parameter
Description
Data
View and edit the associated data tables. Add or remove data tables using the Catalog > Namespace > Table hierarchy.
Prompt
Edit the system prompt to adjust the agent's analysis behavior and role definition.
After you finish making changes, click Save. The updated configuration takes effect in new conversations.
Delete an agent
Warning: Deleting an agent also deletes all of its conversation records. This action cannot be undone.
On the agent list page, find the agent that you want to delete and click Delete in the Actions column.
In the confirmation dialog box, click OK.