Installation and Usage Guide
Overview
This guide will help you set up and use Datus Agent from scratch to connect to Singdata Lakehouse, enabling natural language queries and intelligent data analysis. Through step-by-step configuration, you will be able to:
- Establish a connection between Datus and Singdata Lakehouse
- Configure support for multiple AI models
- Enable MCP tool integration (optional)
- Start querying and analyzing data using natural language
Requirements
- Python Version: 3.12 or higher
- Datus: 0.2.23 or higher
- Operating System: macOS, Linux, or Windows
- Singdata Lakehouse Access: Including service endpoint, user credentials, etc.
- Network Requirements: Ability to access Singdata Lakehouse API endpoints
Step 1: Create Project Directory
Create project directory:
Step 2: Create Python Virtual Environment
Choose one of the following three methods to create a virtual environment:
Method 1: Using conda (Recommended)
Method 2: Using virtualenv
Or:
Method 3: Using uv (Modern Tool)
Step 3: Install Datus Agent Package
Install Datus Agent:
Datus plugin for Singdata Lakehouse:
If you need the latest development version of Datus Agent:
Step 4: Configure Environment Variables
Create a .env file to store sensitive information:
Create environment variable configuration file:
Add the following configuration to the .env file (modify according to your actual situation):
Singdata Lakehouse connection configuration:
AI model configuration (choose one):
Alibaba Cloud Tongyi Qianwen (Recommended):
Or DeepSeek:
Or OpenAI:
Or Claude:
Step 5: Configure Datus Agent
Create the configuration directory and agent.yml configuration file:
Copy the following content into the conf/agent.yml file:
Schema linking rate (affects query performance):
Step 6: Test Connection
Before starting the full system, test the database connection:
Load environment variables:
Create database configuration:
Test connection:
Step 7: Start Datus
Method 1: Command Line Mode
Start interactive CLI:
Method 2: Web Mode (Recommended, supports subagent selection)
Start Web interface, supports selecting different subagents:
Or local access only:
After Web Mode Starts:
- Default access address: http://localhost:8501 or http://0.0.0.0:8501
- In the Web interface, you can select previously created subagents for conversation
- Supports a more intuitive interactive interface
Interface After Successful Startup:
CLI Mode:
Web Mode:
- The terminal displays server startup information and access address
- Open the corresponding address in a browser to see the Web interface
- The left side of the Web interface displays a list of selectable subagents
- Click to select a subagent and start a conversation
Step 8: Start Using (Command Line Mode)

View Available Tables
Query Using Natural Language
Execute SQL Queries
Get Help
Web Mode

The Web mode startup page is shown above. If you added a SubAgent in command line mode, it will be displayed on the home page. Entering chat content directly runs in Agent mode (MCP Tools will not be called). Selecting a specific SubAgent enables SubAgent mode for conversation, which will call MCP Tools.

Multi-Model Configuration
Use different models for different tasks:
FAQ
Q: Failed to connect to Singdata Lakehouse
A: Please check:
- Whether the network connection is normal
- Whether the credentials in the
.envfile are correct - Whether the Singdata Lakehouse service is accessible
- Whether parameters such as instance ID and workspace are correct
Q: AI model response is slow
A: You can try:
- Switching to a faster model (e.g.,
qwen-plus->qwen-turbo) - Reducing parameters such as
max_context_length - Enabling GPU acceleration (if available)
Q: Query results are inaccurate
A: Suggestions:
- Increase
schema_linking_ratetoslowfor more precise schema matching - Provide more context information in queries
- Use
.schema tablenameto view the table structure before querying
Q: How to switch to a different database instance
A:
- Modify the
CLICKZETTA_*variables in the.envfile - Restart
datus-cli - Or add multiple namespace configurations in the config
This guide was last updated: November 2025
