Introduction¶
The DeepSeek Harness plugin ecosystem follows the “everything is a plugin” philosophy. Plugins are maintained by the community and have no official affiliation with DeepSeek / High-Flyer. When developing agents, each role needs to remember its user profile, collaboration style, and project conventions. However, native DSH lacks a long-term memory mechanism—every session requires re-prompting, which easily leads to missed details or confusion between conventions from different projects. tbaot/dsh-persona-kit provides multi-role memory capabilities: each role has an independent long-term memory that is injected into the prompt at the start of a session and automatically reviewed after each turn, writing new facts back into memory.
What It Is¶
dsh-persona-kit is a memory plugin for DeepSeek Harness, maintained by TBAOT. It provides two layers of memory for each role: user profile and agent notes. Role memory is written automatically, managed per entry, and separated into a resident layer and a topic library. You can edit or delete entries at any time from the panel. The plugin requires DSH version >=0.2.2-rc.1, runs with the current DSH process permissions, and it is recommended to review the source code and license before installation.
Core Capabilities¶
Each role has an independent memory space, so conventions from Project A will not leak into Project B. At the start of a session, role memory is automatically injected into the prompt; after each turn ends, the plugin writes new facts into memory. Memory is organized by entries, with a cap on the resident layer—entries beyond the cap are automatically moved to the topic library to avoid prompt bloat. The panel provides multiple tabs: Role Memory (edit notes), User Profile (edit role definition), Review Log (detailed record of each write/rejection), Skills (role-exclusive skills, invisible to other roles), and Workspace (bind a directory so that sessions in that directory and its subdirectories are automatically attributed to the current role).
The “Read-only Profile Notes Topics” toggle on the right side of the panel is a guardrail: clicking it sets that tier to read-only, preventing the agent from writing to it, while you can still edit manually.
Installation and Enablement¶
Run the following command in the terminal to install the plugin:
dsh plugin --profile <profile> add github:TBAOT/dsh-persona-kit
After installation, add dsh-persona-kit to the profile’s dsh.profile.bundles, then restart Harness. DSH version must be >=0.2.2-rc.1.
Once enabled, a “Roles” entry will appear in the left sidebar. Click “New Role” and bind a workspace to it. Then simply start chatting—after the next turn ends, memory will begin to accumulate.
Panel and Data Structure¶
The panel is divided into multiple tabs, each serving a specific purpose:
- Role Memory: edit the role’s notes; the footer shows usage/cap and the most recent retrieval readout
- User Profile: edit “who you are and what you want,” stored separately from notes
- Review Log: detailed record of each automatic write or rejection, including what changed, which model was used, and why it was not written
- Skills: role-exclusive skills (SKILL.md), invisible to other roles
- Workspace: bind a directory so that sessions in that directory and its subdirectories are automatically attributed to the current role
The read-only toggle on the right side of the panel can restrict write permissions for a specific tier.
Memory data is stored under ~/.dsh/personas/<role>/:
- memory/user.md: user profile (resident)
- memory/memory.md: agent notes (resident)
- memory/meta.json: entry metadata (hash chain, expiration chain, timestamps)
- memory/policy.json: read-only tiers and caps (optional)
- topics/: topic library, one file per detail
- review/: metrics.jsonl / log.jsonl / backups
The workspace-to-role mapping is stored in ~/.dsh/personas/index.json.
Common Commands¶
The plugin provides a set of maintenance and diagnostic commands:
pnpm health # Whether retrieval was injected in recent turns, token cost
pnpm audit # Memory structure check: empty summaries, overly long entries, near-duplicates, cross-tier duplicates, policy consistency
pnpm probe # Measure retrieval quality with 14 real questions (hit rate / injected chars / latency)
pnpm doctor # Pre-upgrade check for DSH: verify profile patches and link dependencies
pnpm bench # Report hit@1 / hit@N / injected chars / latency on any JSONL question set
Migration and Privacy¶
If you previously used soul-md, you can use the migration script to move cards and memory into the current structure:
node scripts/migrate-soul-md.mjs --soul-md <$DSH_HOME/soul-md> --persona <role>
Entries exceeding the cap will be skipped and listed in the results.
All memory is stored locally under ~/.dsh/personas/ and is never uploaded. Each turn’s review sends a conversation summary to the model, using the model configured in Harness (the default model or the provider/model specified in the plugin config). If you do not want summaries sent to the model, set config.enabled to false; memory can still be edited manually.
The panel’s HTTP interface listens only on the local loopback and requires the x-dsh-persona-kit: 1 request header as a misfire guard. Do not expose the port to your local network.
Uninstallation¶
The uninstall command is as follows:
dsh plugin --profile <profile> remove dsh-persona-kit
The role memory directory is not automatically deleted. You can manually remove ~/.dsh/personas/<role> when no longer needed.
Use Cases¶
Ideal for scenarios requiring long-term memory maintenance for multiple agent roles, such as:
- Multi-project collaboration: one role per project, with conventions isolated from each other
- Customer service / assistant: remember user preferences and taboos, continuously improving interactions
- Development assistant: maintain tech stack, architectural decisions, and historical records
Summary¶
dsh-persona-kit provides each role in DeepSeek Harness with independent long-term memory, supporting automatic injection and turn-end review. It helps agents remember users, distinguish between projects, self-organize, and offers editable guardrails and a panel. The plugin is open source and licensed under the MIT License.