Introduction¶
When running conversations in DeepSeek Harness (DSH), the system prompt often relies on a single global setting: changing roles requires modifying configuration, and it is difficult for different sessions to retain their specific “who they are, how they should speak, and what they should remember.” Embedding personas, guidelines, and memories into a single prompt segment results in high maintenance costs and non-intuitive switching.
Below is the community plugin dsh-agent-profiles (Maintainer: MoYu-CN, Category: Memory). It provides multiple sets of Agent Profiles (personas, personality traits, speech habits, behavioral guidelines, and long-term memories) within DSH, injecting them as system-prompt segments. It supports global defaults and per-conversation overrides; switching affects only subsequent turns without altering historical messages.
What is this¶
dsh-agent-profiles is a DSH npm plugin with the localized UI name “Agent Profiles.” In one sentence: it prepares multiple sets of Agent profiles for DSH—each containing a persona, duties, an avatar, and long-term memory summaries/entries—and injects them into the model-visible system prompt segment during prompt assembly.
The plugin is licensed under MIT, and the package version in the current documentation is 0.7.0. The settings interface follows the host language (built-in Chinese/English dictionary); the prompt segment destined for the model remains in Chinese by design. Community directory page: skillhub.cn/plugins/MoYu-CN/dsh-agent-profiles; Source code and documentation: GitHub — MoYu-CN/dsh-agent-profiles.
The DSH ecosystem emphasizes “everything is a plugin”; directories like SkillHub are community sites and have no official affiliation with DeepSeek or HFTC (HiFloat).
Two Layers of Scope¶
| Layer | Where to Modify | Scope |
|---|---|---|
| Global Current Configuration | Settings → “Agent Profiles” | Used by conversations without specific settings |
| Per-Conversation Configuration | Dropdown left of input box + ⚙ panel | Only for that conversation; allows pinning a profile, and writing conversation-specific supplementary settings and memories |
Regardless of the layer, switching is immediate and only affects subsequent conversations; history is never rewritten.
Core Features¶
Configuration Content and Interface¶
Each profile is editable: Persona, Personality Traits, Speech Habits, Behavioral Guidelines, Long-term Memory Summary, Long-term Memory Entries (edited/deleted one by one). The left panel of the settings page lists profiles (create, copy, import, export), while the right panel allows editing the name, avatar, and the fields mentioned above.
The Quick Switcher to the left of the input box allows selecting a profile for the current conversation; selecting “Follow Global” uses the profile currently enabled in the settings page. Turn messages display a line “[Avatar] Profile Name” above the official “Completed …” line, while the official line remains unchanged.
The long-term memory interface displays character usage (documentation example: 746 / 5000 chars); exceeding the limit triggers automatic refinement and compression.
Injection and Switching Mechanism¶
The plugin registers a system-prompt segment named agent-profiles:persona with DSH (order 860), where the text is a function. It reads the current active profile every time the prompt is assembled, ensuring that switches take effect in the next turn. Empty profiles (name only, no substantive content) are not injected; when memory injection is disabled, related blocks are omitted entirely to avoid context usage.
Each conversation can also override the global setting via a segment of the same name scoped to the agent: if a session binding exists, the conversation’s profile and specific settings are used; otherwise, it falls back to the global setting. The factory default enables “General Assistant” with prefilled behavioral guidelines (pragmatic, concise, etc.); to achieve zero injection, simply clear the four content fields of that profile.
Long-term Memory¶
Users can choose Model-driven storage + Plugin periodic fallback:
- Tool memory_save: The model writes to the currently active profile for the conversation when it deems something worth remembering long-term.
- Background Refinement: Every 5 turns, after
agent/statusbecomes idle, the plugin reads the conversation and calls the model to extract key points into memory. - Limit Compression: When long-term memory exceeds 5000 characters, the plugin calls the model to merge it into a summary and concise entries.
The write target is resolved on-the-fly by session ID (session binding takes priority, otherwise global current) to prevent writing to the wrong location if the profile is switched mid-process. Background logic adheres to constraints such as not throwing errors to the caller, preventing concurrent execution within the same session, and limiting conversation excerpts to 6000 characters.
Other Capabilities¶
- Memory injection toggle, Import/Export, Restore Defaults.
- The Host provides HTTP APIs such as
/__ap/*; data is persisted inprofiles.json(atomic write).
Installation and Activation¶
Installation via npm is recommended (use the package name, do not manually copy the tarball URL):
dsh plugin add dsh-agent-profiles
After installation, follow the prompts to restart DSH (Host half); the browser client requires a page refresh to take effect.
Alternative method (from original documentation):
# tarball
dsh plugin add https://registry.npmjs.org/dsh-agent-profiles/-/dsh-agent-profiles-0.7.0.tgz
For local development, clone the repository and use dsh plugin add "link:<your directory>/dsh-agent-profiles" to symlink the directory; code changes take effect immediately.
package.json requires Node ^22.19.0 || >=24.0.0. The plugin strictly depends on webServer (without it, the settings UI cannot be provided); long-term memory capabilities depend on sessionQuery, llm, tools, etc., and will emit warnings during the loading phase rather than failing silently if these are missing.
Typical Usage¶
- After executing the installation command and restarting/refreshing, open Settings → Agent Profiles. Create or copy a profile, fill in the persona and guidelines, and set it as the global current profile in the list.
- In a new conversation, if a specific persona is needed, select the profile or “Follow Global” to the left of the input box; in the ⚙ panel, you can pin the profile and add conversation-specific settings and memories.
- For backups or migration, use Export/Import in the settings page; use Restore Defaults for accidental changes.
- If you do not want a specific profile to participate in the prompt, clear its content fields or disable memory injection (depending on requirements).
Use Cases and Notes¶
Suitable for: Switching between multiple assistant personas within the same DSH instance; binding different roles and memories to specific sessions; extracting persona and long-term memory management from hand-written system prompts into a unified management system.
Notes:
- The plugin runs with the permissions of the current dsh process. Before installation, please review the source repository and the MIT license to ensure compliance with your security and compliance requirements.
- Memory refinement and compression involve additional model calls, incurring token usage and costs; conversation excerpts are limited to 6000 characters.
- In non-agent assembly or when
agent.ctxcannot be obtained, it degrades to a global segment and logs a warning; conversation-specific settings may not take effect in this case.
Conclusion¶
dsh-agent-profiles transforms “Persona + Guidelines + Long-term Memory” into switchable configuration sets with per-session override capabilities, injecting them via DSH’s system-prompt segment mechanism. Switching is immediate and does not alter history. For installation and field descriptions, please refer to the README:
- Directory Page: https://www.skillhub.cn/plugins/MoYu-CN/dsh-agent-profiles
- GitHub: https://github.com/MoYu-CN/dsh-agent-profiles