All Products
Search
Document Center

:AI agent

Last Updated:Jun 20, 2026

The DMS AI agent is a customizable and publishable agent that serves as a unified data service layer. It lets you query and analyze data using natural language, providing instant responses 24/7. This topic describes how to create, use, and share an AI agent.

Procedure

Step 1: Create a workspace

  1. Log in to DMS 5.0.

  2. Move the pointer over the 2023-01-28_15-57-17.png icon in the upper-left corner and choose All Features > Data+AI > Notebook.

    Note

    If you use the DMS console in normal mode, choose Data+AI > Notebook in the top navigation bar.

  3. Click Create Workspace. In the dialog box that appears, enter a Workspace Name, select a Region, and click OK.

    Note
    • A workspace name can contain only letters, digits, and underscores (_).

    • You can select only the Singapore region.

  4. In the Actions column of the target workspace, click Go to Workspace.

    Note

    By default, only the creator of a workspace can access it. For collaborative development, the workspace creator must grant development permissions to other users.

Step 2: Create and use an agent

  1. Create an agent.

    On the File image tab, click the image icon and select AI agent.

  2. Add one or more tables.

    The agent can answer only questions related to the tables that you add.

    1. Double-click the agent you created.

    2. On the Table information tab, click Add.

    3. Select the target tables and click OK.

      For example, select the customer and orders tables.

  3. Add a test set and query the agent.

    Adding a test set improves the accuracy of future responses and optimizes the agent.

    1. Click the Test set tab, enter your question, and click OK.

      Example: Can you find the orders with status O?

    2. After creating the question, click regression. The agent automatically generates a response and the corresponding SQL statement.

    3. If the response meets your business requirements, click Run.

      Note

      If the generated SQL statement does not meet your business requirements, you can click the dislike icon below the SQL statement, then click Debug and try again. If the SQL statement generated after the retry is accurate, click Save. This improves the accuracy of future SQL statements generated by the agent.

    4. Display the results as a chart.

      Click the chart view toggle button in the upper-left corner to switch to the chart view. In the configuration panel on the left, set the chart type to Line chart, select O_ORDERDATE for the X-axis field and [Total] O_ORDERKEY for the Y-axis field. The line chart appears on the right. You can click Try another in the upper-right corner to switch to a different visualization, or click Download image to save the chart.

  4. Share the AI agent.

    Double-click the target agent. On the overview page, copy the agent access URL and share it with other users. They can then ask the agent questions in the conversation area and get answers.

    Example question: "How many posts are there in total?"

    The agent returns a result of 91966 posts and automatically generates the SQL statement SELECT COUNT(*) AS TotalPosts FROM codebase_community.posts;. In the results area, you can switch between Table view and Chart view, or click Copy or Rerun query to manage the SQL statement.

FAQ

  • Q: What is the data query scope of an AI agent? Is there a risk of a data breach?

    A: An AI agent can query data only from the tables that you have added. This prevents a data breach. The agent's query permissions are based on the permissions of the user accessing it. If a user does not have permission to query a table, the agent returns only the SQL statement without the data.

  • Q: Does an AI agent proactively access data from the added tables when no one is asking questions?

    A: No. The agent accesses database, table, and column metadata, as well as business knowledge, only when it generates an SQL statement in response to a user's question.