How to use dsh-data-agent
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.
This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.
This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.
Quick start
dsh-data-agent
— source: plugin_wiki.wiki_content
Install & verify
dsh plugin --profile web add @yejiming/dsh-data-agent
Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.
— source: plugins.install
Key points
- 通过对话完成数据分析:直接用自然语言描述目标,DSH会理解问题、拆解分析步骤、查询真实数据并整理结论。你可以继续追问,分析会沿着当前上下文逐步深入。
- 自动寻找商业洞察:不仅返回查询结果,还能帮助比较趋势、定位异常、识别高价值客户或商品,并把数据转化为便于业务决策的说明。
- 连接常见业务数据库:支持MySQL、PostgreSQL、SQLite、Oracle、Hive、Impala、ClickHouse、Apache Doris和SQL Server,可用于业务系统、分析库、本地数据文件及数仓场景。
- DSH自动完成分析闭环:DSH会根据当前问题查看表结构、编写SQL、执行查询,并结合报错或返回结果继续调整,而不是只生成一段未经验证的SQL。
- 专注数据任务的数据模式:会话使用DSH原生
str_replace_editor处理文件,并保留sql-query、sql-write、sql-cmd与render-analysis;Web、Desktop、dsh-tui和headless profile使用同一工具协议。describe_image、ssh_*等宿主或社区插件工具不会进入数据模式。
— source: plugin_wiki.readme_en (fallback readme_raw)
FAQ
Which databases does the plugin support?
Supports 9 databases: MySQL, PostgreSQL, SQLite, Oracle, Hive, Impala, ClickHouse, Apache Doris, SQL Server, covering various scenarios such as business databases, data warehouses, and local SQLite files.
How are database passwords handled?
Web temporary passwords only exist in the process; TUI forms only display *, and they won't be restored when reopened. Persistence uses DSH credential references. MySQL/Doris pass via MYSQL_PWD environment variable, SQL Server uses SQLCMDPASSWORD, and ClickHouse uses HTTP authentication fields.
Do I need to install database CLI clients?
Yes. Except for ClickHouse (uses the built-in official HTTP client) and SQLite (usually comes with the system), other databases require command-line clients (mysql, psql, sqlplus, beeline, impala-shell, Microsoft ODBC sqlcmd 18.x, etc.). When not in PATH, they can be specified via profile's clients.searchPaths or command.
What to do if installation fails or shows failed to mount?
Usually the current profile hasn't installed the plugin or is still using an old preset. Unmodified old presets are automatically migrated; manually edited presets need to manually delete the two configuration blocks pointing to @yejiming/dsh-data-agent/tool and /command.
Where is the analysis report HTML stored?
Every successful render-analysis call generates an offline Dashboard in the session working directory at analysis-reports/{title}.html, which can be opened directly without network; the Web provides both inline preview and a 'View Analysis' button, while dsh-tui only returns the file path.
Is read-only mode absolutely safe?
No. The plugin runs within the DSH process (trusted in-process) and doesn't provide OS/process sandboxing. The recommended combination is read-only database accounts + read-only mode in connection forms, but account permissions are the final boundary.
What are the current limitations for Doris and SQL Server?
Doris currently only browses the current/internal catalog; SQL Server only supports SQL Login, not integrated/Windows/Entra authentication, DSN, or named instances.
Will uninstalling the plugin delete connection information?
By default, uninstall only removes runtime effects and won't actively delete saved non-sensitive connection information (key: data_agent_connections@1) and data mode presets. For complete cleanup, manually delete DSH_HOME/.agent-presets/data-agent and delete connection records through DSH storage management.
— source: plugin_wiki.faq_json
Compatibility
- DSH: 0.1.0-rc.7+
- Node: 未声明
- Platforms: macOS, Windows, Linux
— source: plugin_wiki.compatibility_json
Pitfalls
Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.
— source: general rule