app icon
polardb4ai_db_agent
0.1.0

A database intelligent agent plugin based on the Large Language Model (LLM), designed specifically for non SQL background users, seamlessly integrated into the PolarDB for AI node.

polardb4ai/polardb4ai_db_agent703 installs

DB_Agent Dify Plugin

DB_Agent Dify Plugin, Powered by PolarDB for AI


Overview

The DB_Agent Dify Plugin is a graphical database interaction tool designed for enterprise-level intelligent data querying.
Leveraging PolarDB for AI's LLM-based Natural Language to SQL (NL2SQL) model, it enables developers and business users to interact with databases via natural language without writing SQL code.

Core Capabilities

  • Natural Language to SQL (NL2SQL):
    Convert natural language queries (e.g., "Show total sales in Q1 2024") into precise SQL statements.
  • Intelligent Chart Generation (NL2Chart):
    Automatically transform SQL query results into dynamic visualizations (bar charts, pie charts, line graphs).
  • Data Summarization (NL2SQL_SUMMARY):
    Generate high-level insights and summaries of query results (e.g., "Sales in the East region increased by 15% YoY").

Use Cases:

  • Business users to quickly retrieve data answers
  • Data analysts to accelerate exploratory analysis
  • Developers to build automated data pipelines

Configuration

1. No Database Credentials Stored

The plugin does not persist any database credentials or sensitive information. Connection parameters are used only during the session.

2. Install the Plugin

Steps:

  1. Open Dify → Plugin Marketplace
  2. Search for DB_Agent
  3. Click Install

3. Ready to Use

After installation, add a DB_Agent node to your workflow and interact via the graphical interface.


Key Features

Natural Language to SQL (NL2SQL)

  • Supports Complex Logic:
    • Date arithmetic (e.g., "Sales last month")
    • Mapping comprehension (e.g., "Valid orders")
    • Default conditions (e.g., for active records)
  • Model Advantages:
    • Deep semantic understanding via large language models (LLMs)
    • Generates SQL with aggregation functions, subqueries, and advanced syntax

📊 Intelligent Chart Generation (NL2Chart)

  • One-Click Visualization:
    Input natural language (e.g., "Compare sales across regions") to generate corresponding charts.
  • Dynamic Reports:
    Supports bar charts, pie charts, line graphs, and real-time data updates.

🧠 Data Summarization (NL2SQL_SUMMARY)

  • High-Level Insights:
    Summarize query results to reveal trends and anomalies (e.g., "Inventory warnings: 3 categories below threshold").

Core Advantages

  • Code-Free Operation:
    Interact with databases using natural language—no SQL expertise required.
  • Enterprise-Grade Intelligence:
    • Understands business-specific mappings (e.g., )
    • Supports advanced SQL constructs (e.g., nested queries, window functions)
  • End-to-End Automation:
    Natural language → SQL → Visualization → Data summary, all within Dify.

Contact

For questions, feedback, or collaboration:


Last Updated: 2025/07/23

CATEGORY
Tool
VERSION
0.1.0
polardb4ai·10/13/2025 02:44 AM
REQUIREMENTS
Tool invocation
App invocation
Endpoint registration
Maximum memory
256MB
Maximum storage
1MB