Preface¶
It is no longer a novelty to have large models write SQL. The challenge lies in what happens after the SQL is generated: whether the statement can run successfully on a real database, whether JOIN clauses need to be modified when errors occur, and which dimension to break down when the results do not match the business requirements. Many assistants can only generate a piece of SQL based on static table structures or a few comments, and people often have to copy and paste back and forth between execution, result reading, and rewriting.
DeepSeek Harness (hereinafter referred to as DSH) integrates this workflow into its plugin system. The official repository describes its core philosophy as Everything is a plugin: models, tools, sessions, and UI can be added or removed at the configuration layer without modifying the Harness source code. Someone in the community has built a dedicated “data mode”: connect to a database in a session, retain only functions such as writing SQL, running queries, and modifying files, and let the model iterate based on real execution results. This plugin is called dsh-data-agent, and it is included in the independent community plugin directory deepseek-harness-plugin.com. This directory has no official affiliation with DeepSeek / FangTian, and is not an official app store.
This article is organized after cross-checking the plugin directory page, GitHub repository README, package.json, and npm package page: what it is, which installation command to use, how to use it in Web UI and terminal, and the permission boundaries to clarify before connecting to a production database.
What It Is¶
dsh-data-agent is a data analysis plugin for DeepSeek Harness, categorized under “Sessions and Messages”, maintained by the GitHub organization omdsh-dev, with the repository address at omdsh-dev/dsh-data-agent. The npm package name is @yejiming/dsh-data-agent, and the current version is 0.0.9 (released on 2026-08-16). The license is MIT. The directory page marks the primary language as TypeScript; the repository also includes the built artifact lib/, so no local compilation is required during installation. As of the query on 2026-08-17, GitHub shows 34 stars.
The one-sentence description on the directory page is: Session-level database connection with dedicated presets to let AI write and iterate on SQL. The repository README explains the usage in more detail: after connecting to the database, you can raise business questions in natural language, and DSH will view the table structure, write and execute SQL, and continue to adjust based on errors or returned data, rather than stopping at an unvalidated statement. The plugin works for both Web UI and dsh-tui without modifying DSH source code.
The pain point it aims to solve is directly stated in the README: models are already good at writing code, but SQL logic is often incorrect because there is no Agent Loop integrated with database operations—they cannot perceive execution results, so they cannot dynamically optimize based on errors or returned results.
Core Features¶
All the following points are sourced from the current repository README and package.json descriptions, with no additional elaboration.
1. Integrate “Writing SQL” into the Agent Loop¶
After a successful connection, the session handles subsequent questions according to the data analysis workflow. The model will check the database tables based on the current question, generate SQL, execute the query, and continue rewriting based on errors or real results. You can follow up with追问, and the analysis will go deeper along the same session context instead of re-guessing table names from scratch each round.
The sample opening question given in the README is: Analyze order changes in the last 30 days, identify the regions and products with the most significant sales decline, and explain the main reasons. The plugin does not guarantee that the analysis conclusions are absolutely correct; it provides the closed loop of “check structure → execute → recheck based on results”.
2. Data Mode: Narrow Down the Toolset¶
The session will enable the Agent preset named “data mode” (preset identifier data-agent). According to the README, under this mode:
- File operations use DSH’s native str_replace_editor
- Data-related tools retain sql-query, sql-write, sql-cmd
- The Web interface additionally provides render-analysis
- Host or community plugin tools such as describe_image, ssh_* will not be included in the data mode
The purpose is to let the model focus its context on querying the database and writing SQL, rather than simultaneously using SSH, viewing images, or calling a bunch of irrelevant tools. package.json also summarizes the capabilities as: shared database connections, masked TUI forms, credential references, SQL tools, and the data-agent preset.
3. Session-level Connections, Covering Common Business Databases¶
The supported database types listed in the README are MySQL, PostgreSQL, SQLite, Oracle, Hive, Impala, covering business databases, analytical databases, local files, and data warehouse scenarios. Connections are isolated by session: different sessions can connect to different projects, customers, or environments without mixing connections.
The Web UI has a built-in database workbench where you can browse tables, view fields, or temporarily run a SQL query; after starting a conversation, the workbench will move to the sidebar. dsh-tui uses the /database series of commands to complete connection, testing, and disconnection.
4. Web-side Analysis Reports¶
Only the Web interface provides render-analysis. The convention in the README is: the Agent first uses sql-query to explore and verify facts, then independently judges whether to generate a chart. Schema exploration and single-scalar queries will not force chart generation.
When visualization is needed, one tool call generates a versioned report:
- 1–6 read-only datasets, 1–8 views (metric / line / bar / pie / scatter / table)
- The same dataset can be reused by multiple views; aggregation and Top N logic are written in SQL
- Simple questions get inline previews of single charts; complex questions get a summary, then open the “View Analysis” modal
- Report snapshots are persisted with session logs, so refreshing or replaying history will not re-query the database
dsh-tui does not load this chart dependency, keeping the toolset unchanged.
5. Read-only Mode and Credential Handling¶
The connection form can enable read-only mode; the README recommends also configuring a read-only database account. In the TUI, passwords are only displayed as *, and reopening the form will not restore the password as a draft. For cross-process authentication recovery, you can use DSH’s credential reference to avoid writing plaintext passwords into command parameters. When read-only mode is off, the plugin can execute update or management statements as requested—this is an explicitly stated capability, not an oversight.
Installation and Activation¶
The installation command given on the plugin directory page is:
dsh plugin add github:omdsh-dev/dsh-data-agent
The directory page also reminds users that the plugin runs with the permissions of the current dsh process, and may execute code during installation. Please check the source code repository and license before installing. For reproducible installations, pin the commit hash:
dsh plugin add github:omdsh-dev/dsh-data-agent#<commit>
Replace <commit> with the actual commit hash from the repository, do not copy the placeholder verbatim.
The repository README describes Web UI and dsh-tui as two separate profiles, and recommends installing via npm. Use the corresponding command if you only need one interface; run both commands if you need both:
dsh plugin --profile web add @yejiming/dsh-data-agent
dsh plugin --profile dsh-tui add @yejiming/dsh-data-agent
The installation method from GitHub, split by profile, is:
dsh plugin --profile web add github:omdsh-dev/dsh-data-agent
dsh plugin --profile dsh-tui add github:omdsh-dev/dsh-data-agent
The README clearly states that the plugin will automatically install the “data mode” preset, and the repository has already committed lib/, so no local build is required during installation. If you encounter failed to mount or a prompt that @yejiming/dsh-data-agent cannot be found, the documentation usually explains that the plugin has not been installed for the current profile; confirm that the corresponding command has been executed before restarting DSH.
Uninstallation follows the README instructions:
dsh plugin --profile web remove @yejiming/dsh-data-agent
dsh plugin --profile dsh-tui remove @yejiming/dsh-data-agent
rm -rf $DSH_HOME/.agent-presets/data-agent
Uninstallation will not proactively delete saved non-sensitive connection information. To clean up completely, back up first, then delete the corresponding Data Agent storage records in DSH.
Typical Usage¶
The query runs over the network path from the local machine to the target database, so the corresponding client must be installed on the local machine: SQLite is usually pre-installed on macOS / Linux; MySQL requires mysql; PostgreSQL requires psql; Oracle, Hive, and Impala require their respective command-line clients. It is recommended to prepare a read-only account before starting exploration.
Usage in Web UI¶
Start with:
dsh --profile web
The steps given in the README are:
1. Create a new session and select “Data Mode”.
2. Fill in the connection information in the database workbench.
3. After a successful connection, directly ask analysis questions in the dialogue box.
4. Follow up with追问 based on the first round of results: narrow the scope, compare dimensions, or summarize conclusions.
The recommended Web interface for the repository is zhu1090093659/dsh-web-ui, which is another community plugin, not dsh-data-agent itself.
Usage in dsh-tui¶
Start with:
dsh --profile dsh-tui
In a blank session, switch to data mode first, then connect to the database:
/preset data-agent
/database connect
The connection form displays relevant fields at once. Use Tab / Shift+Tab to switch input items; database type and read-only mode can be expanded by pressing Enter, select with arrow keys and confirm by pressing Enter. After a successful connection, return to the chat box to ask questions.
You can also use these commands in the same session:
/database status View current connection
/database test Test current connection
/database disconnect Disconnect current connection
When you reopen the connection form, it will restore the recently filled database type, address, port, user, database name, and read-only mode; the password is always hidden and will not be restored. The recommended terminal interface for the README is ccch1mneyyy/dsh-TUI, which is also an independent community plugin.
Frame Your Questions Clearly¶
The README recommends adding business goals, time ranges, and focus dimensions to your questions, for example:
Analyze sales and gross margin changes by region in Q2 2026, identify regions with abnormal performance,
further break down by category and core customers, and provide three actionable business recommendations.
You can also ask DSH to save the SQL to a file for review:
Complete the member repurchase analysis, save the final SQL to analysis/repurchase.sql,
and summarize the main findings in a paragraph suitable for a weekly report.
The second use case works because the data mode still retains str_replace_editor, which can write the final statement into the workspace instead of just keeping it in the chat bubble.
Applicable Scenarios and Notes¶
It is suitable for the following situations:
- You can directly access the business or analytical database locally, and need to repeatedly “ask questions → check tables → modify SQL”
- You are already using DSH’s Web UI or dsh-tui, and want to open a separate data session instead of letting ordinary coding sessions touch production databases
- You need to organize query results into conclusions, or view charts/tables reports generated by render-analysis on the Web
- You maintain multiple environments and want connections to be isolated by session
Please note the following points, all sourced from the directory page or repository README, with no additional elaboration:
1. Check the source code and license before installing. The directory page clearly states that the plugin runs with the permissions of the current dsh process, and may execute code during installation. This is a community plugin, not an official DeepSeek component.
2. Treat production databases as read-only by default. Enable read-only mode and use a read-only account. When read-only mode is off, the Data Agent can execute update or management statements; confirm the account permissions and backup strategy before connecting to a production database.
3. Clients must be available locally. Missing clients such as mysql / psql will prevent the tool from working, which has nothing to do with whether the model can write SQL.
4. Web and TUI need to be installed separately. The two profiles do not affect each other; if you only install one, the package will not be found in the other interface.
5. Charts are only available on the Web. render-analysis will not appear in dsh-tui; do not look for “View Analysis” in the terminal based on Web screenshots.
6. Do not treat the directory page as an official store. deepseek-harness-plugin.com is a community directory; the main DSH body is based on deepseek-ai/deepseek-harness. Use the installation commands from the directory page and repository README as the standard, do not splice npm or GitHub paths based on the plugin name alone.
Summary¶
dsh-data-agent has a focused function: connect a DSH session to a database, switch to the data mode that only retains SQL and file editing, and let the model modify statements based on real execution results. It supports MySQL, PostgreSQL, SQLite, Oracle, Hive, and Impala as listed in the README; the Web can generate analysis reports based on questions, while the TUI uses the /database form for operations. The security boundaries are also clearly stated—read-only mode is an optional feature, not a default lock on write operations.
Directory and repository links:
- Plugin directory: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-data-agent/
- GitHub: https://github.com/omdsh-dev/dsh-data-agent
- npm: https://www.npmjs.com/package/@yejiming/dsh-data-agent
- DeepSeek Harness: https://github.com/deepseek-ai/deepseek-harness