Skip to main content

How to use mem9

Provides cloud-based persistent memory for DeepSeek Harness. Automatically retrieves relevant conversation history before each turn and writes to memory after conversations end. Exposes five memory tools that models can invoke.

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

mem9

— source: plugin_wiki.wiki_content

Install & verify

dsh plugin --profile web add @mem9/dsh-plugin

Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.

— source: plugins.install

Key points

— source: plugin_wiki.readme_en (fallback readme_raw)

FAQ

What needs to be done after installation?

Need to first export MEM9_API_KEY="", then execute dsh --profile --dump-config to verify the configuration has taken effect.

Will it modify my existing agent or session behavior?

No. The plugin only inserts a Cordis line named mem9, does not modify the agent loop nor change the session data format.

What content is saved to the cloud by default?

After each turn/end completes, only real user text and assistant text are uploaded, automatically submitted with mode: smart, maximum 20 messages or 204800 bytes per submission.

Where is data stored? Is it uploaded to third parties?

Stored at https://api.mem9.ai (official hosted service) by default, can also be changed to self-hosted instance via apiUrl config item.

Can subagents use memory by default?

No by default. Only top-level agents register the memory tool; to give subagents the same capability, set includeSubagents to true.

Are there size or quantity limits for individual memories?

Tool layer limits: single content max 50000 characters, tag array max 20; search interface returns max 200 results per query.

— source: plugin_wiki.faq_json

Compatibility

  • DSH: 0.1.0-rc.7+
  • Node: >=22.19.0

— 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