Skip to main content

dsh-data-agent

101Stars7Forks5Issues0Watchers

Connects DeepSeek Harness to 9 databases including MySQL, PostgreSQL, SQLite, and ClickHouse. Provides data schema presets and SQL tools for conversational data analysis and visualization reporting.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
License
MIT
Branch
main
data-agentdeepseek-harnessdshdsh-plugin

Install

cmdweb profile
$ dsh plugin --profile web add @yejiming/dsh-data-agent

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin omdsh-dev/dsh-data-agent for me: review the repository at https://github.com/omdsh-dev/dsh-data-agent first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Positioning

Enable DeepSeek Harness to directly connect to common databases, allowing natural language queries to complete SQL writing, execution, result analysis and visual report generation, while supporting both Web UI and dsh-tui terminal as entry points.

Core Capabilities

  • Complete data analysis through dialogue: ask questions in natural language, the tool will examine table structure, generate and execute SQL, and continue querying based on real results
  • Auto-generate visual reports: a single tool call produces 1-6 read-only datasets and 1-8 chart views (metrics/line/bar/pie/scatter/table), saved as offline HTML
  • Shared connection service: Web workspace, dsh-tui forms, and agent tools share the same connection storage, with connections isolated between sessions
  • 9 mainstream databases: MySQL, PostgreSQL, SQLite, Oracle, Hive, Impala, ClickHouse, Apache Doris, SQL Server
  • Secure credential handling: TUI passwords always hidden, temporary passwords never in argv or logs, SQL Server input rejects GO and variable substitution
  • Three SQL tool types: sql-query for structured read-only, sql-write for single write/management, sql-cmd for raw client output

Technical Implementation

  • Language: TypeScript + React (client UI)
  • Key Dependencies: @clickhouse/client, @deepseek-ai/cordis, @deepseek-ai/dsh-tools, schemastery
  • Architecture Pattern: Cordis dual-line plugin (data-agent + data-agent-routes) injected into host via cordis.patch.yml; browser side registered to DSH client slots like conversation.input.right via lib/client.js
  • Entry Files: src/index.ts (server-side), src/routes.ts (Web routes), src/client/index.ts (browser)

Applicable Scenarios

Business/data analysts need to query MySQL, PostgreSQL, ClickHouse and other business databases without writing code, letting AI automatically complete the full chain from data retrieval, aggregation to visual report generation. Developers can also use it in dsh-tui for temporary data exploration and generating shareable offline analysis reports. Production databases should be used with read-only accounts to avoid accidental data changes.

Prerequisites and Compatibility

DependencyMinimum VersionDescription
DSH0.1.0-rc.7+Determined by peerDependencies @deepseek-ai/dsh-* ^0.1.0-rc.7
PlatformmacOS / Windows / Linuxsrc/client-discovery.ts supports client auto-discovery on darwin, linux, win32
Node.jsNot declaredpackage.json does not declare engines
Native ModulesNoneOnly depends on @clickhouse/client 1.23.x HTTP client, other databases use CLI subprocesses

Installation

dsh plugin --profile web add github:omdsh-dev/dsh-data-agent

Configuration Options

ConfigTypeDescriptionDefault
presetIdstringPreset directory name installed to DSH_HOME/.agent-presets/data-agent
installPresetbooleanWhether to auto-install "data mode" preset on startuptrue
connectTimeoutMsnumber (≥1000)Timeout for single /connect connection test (ms)10000
introspectMaxTablesnumber (≥1)Maximum table count returned by /connect and /status500
queryTimeoutMsnumber (≥1000)Timeout for single database tool query (ms)30000
maxResultCharsnumber (≥1024)Upper limit for single query stdout/stderr capture (characters)20000
maxRowsnumber (≥1)Maximum rows returned by sql-query and other read tools100
maxQueryCharsnumber (≥1024)Maximum length of single SQL text65536
readonlybooleanDefault read-only mode (reject write/management statements)false
persistConnectionsbooleanWhether to persist non-sensitive connection info to DSH storage domaintrue
clientsobjectOverride CLI client paths and extra parameters by database type (searchPaths/command/args)Platform default
connectionsobjectPre-set default connections by session ID (key '*' as wildcard default), passwords not allowedEmpty object

FAQ

Q: Which databases can be connected?

A: Supports MySQL, PostgreSQL, SQLite, Oracle, Hive, Impala, ClickHouse, Apache Doris, SQL Server - 9 types covering business databases, data warehouses, local SQLite files and more.

Q: How are database passwords handled?

A: Web temporary passwords only exist in process memory; TUI form input only shows *, and reopening the form won't restore them. Persistence uses DSH credential references, MySQL/Doris pass via MYSQL_PWD environment variable, SQL Server uses SQLCMDPASSWORD, ClickHouse uses official HTTP client auth fields.

Q: Do I need to install database CLI clients?

A: Yes. Except ClickHouse (uses built-in official HTTP client) and SQLite (usually built into system), other databases require command-line clients. When not in PATH, absolute paths can be specified via profile's clients.searchPaths or command. MySQL/Doris automatically adds --default-character-set=utf8mb4 to avoid Chinese garbling from Windows code pages.

Q: Installation failed or shows failed to mount?

A: Usually the current profile hasn't installed the plugin or is still using old presets. First confirm target profile has executed install command and fully restarted DSH; unmodified old presets will be auto-migrated, manually edited ones need deletion of two configuration blocks pointing to @yejiming/dsh-data-agent/tool and /command.

Q: Where are analysis report HTML files stored?

A: Each successful render-analysis call generates an offline Dashboard at analysis-reports/{title}.html in session working directory, with inlined data and SVG rendering code, viewable offline. Web provides both inline preview and "View Analysis" button; dsh-tui only returns file absolute path for you to open in local browser.

Q: Is read-only mode absolutely safe?

A: No. The plugin runs within DSH process (trusted in-process), providing no OS, process or realm sandbox. Recommended combination is database read-only account + form read-only mode, but account permissions are the ultimate boundary.

Q: What limitations exist for Doris and SQL Server current support?

A: Doris currently only browses current/internal catalog, won't fabricate external catalog hierarchy; SQL Server only supports SQL Login, no integrated/Windows/Entra auth, DSI or named instances, and requires Microsoft ODBC sqlcmd 18.x.

Q: Will uninstalling the plugin delete connection info?

A: Default uninstall only removes current profile's runtime effects, won't actively delete saved non-sensitive connection info and data mode preset. For complete cleanup, first backup, then manually delete DSH_HOME/.agent-presets/data-agent and delete data_agent_connections@1 record via target profile's storage management.

Learning Curve

Entry-level — no coding required to connect databases and complete analysis in Web or dsh-tui; master SQL and read-only account best practices for safe usage.

Known Issues and Limitations

  • Ecosystem adapter (@dsh-std/adapter-dsh) only publishes declared degraded snapshots, won't re-register commands, tools or UI handlers; native Cordis path remains the only functional implementation
  • Apache Doris first version only browses current/internal catalog, doesn't support external catalog hierarchy
  • SQL Server first version only supports SQL Login, no integrated/Windows/Entra auth, DSN or named instances
  • ClickHouse actual Server/Cloud + TLS combination requires smoke testing on deployment side; README makes no compatibility commitments for all Cloud/TLS configurations
  • render-analysis report JSON cap is 512 KiB (src/analysis.ts:33), exceeding requires aggregation or splitting, won't silently truncate data
  • Workspace export hard cap is 50000 rows (src/defaults.ts:27), excess rows won't be exported
  • Plugin still runs as trusted in-process, no OS, process or realm isolation

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/omdsh-dev/dsh-data-agent)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory