Introduction¶
DeepSeek Harness (DSH) adopts an “everything is a plugin” architecture. When building agents, how to accurately inject persona files under the ~/.dsh/DSclaw/ directory into the system prompt is a common need. The dsh-agent-identity plugin provides the Phase 1 solution for the governance suite. It does not intercept tools; instead, it focuses on injecting core files into the prompt.
What Is This¶
This plugin is maintained by developer xingyingyuzhui and belongs to the model inference category. It mainly solves the problem of reading the core files under ~/.dsh/DSclaw/<agent>/ and injecting them into the system prompt of the current session, so that the agent can have a specific persona or capability configuration.
Core Features¶
The plugin manages agent identity and behavior through a file-based mechanism. The specific rules are as follows:
-
Injected files: The following files are injected into the system prompt:
SOUL.mdIDENTITY.mdAGENTS.mdTOOLS.mdBOOTSTRAP.md
-
Special handling of
BOOTSTRAP.md:- It is automatically injected when a new Session is created.
- It takes effect before the initial interaction (such as “What is your name?” or “How should I address the user?”) is completed.
- After the initial interaction is completed, the agent deletes this file.
-
Disk-only files: The following files are only stored on disk and are not injected into the prompt:
USER.mdMEMORY.mdHEARTBEAT.md
-
Runtime condition:
- Persona injection is triggered only when the current working directory (cwd) of the session is under
DSclaw.
- Persona injection is triggered only when the current working directory (cwd) of the session is under
-
Dependencies:
- It depends on the
DSclawdirectory structure created bydsh-agent-registry.
- It depends on the
Installation and Enablement¶
To install this plugin, you need to use a Web Profile:
dsh plugin --profile web add github:xingyingyuzhui/dsh-agent-identity
After installation is complete, please restart the dsh web service.
For local development and debugging, you can use a local path link:
dsh plugin --profile web add link:/abs/path/to/dsh-agent-identity
Typical Usage¶
After installation and restart, the default behavior of the plugin is as follows:
- File editing: Find “Claw Agent” → “Core” tab in the settings menu to view and edit the seven core files mentioned above.
- Automatic injection: When a new Session is created, the system automatically reads and injects files such as
BOOTSTRAP.md.
Notes and Applicable Scenarios¶
- Dependency check: Before use, ensure that
dsh-agent-registryhas been installed and properly configured. Otherwise, theDSclawdirectory may not exist. - File persistence: After uninstalling this plugin, persona files on disk (such as
SOUL.md) are still retained; they are simply no longer injected into the prompt. - Inspection mechanism: The inspection feature of
HEARTBEAT.mdis disabled by default (every: 0) and does not trigger when idle. - Permissions: The plugin runs as a DSH plugin and must comply with the permission scope of the current DSH process.
Conclusion¶
dsh-agent-identity is a lightweight governance plugin. It solves the automation problem of persona files and prompt injection through file-system mapping. For scenarios that require managing identity consistency among multiple agents in DSH, it provides basic Phase 1 support.