@mem0/deepseek-plugin. The plugin recalls relevant context before a model request, captures completed turns, and provides explicit Mem0 tools when the agent needs them.
Current package version:
0.3.0.Overview
The plugin provides automatic memory plus two agent-callable tools:
Unlike file-based memory plugins, Mem0 is a managed backend: server-side extraction, semantic dedup, and conflict resolution, with memories reusable by integrations that use compatible user identities and search filters.
How it works
A Cordis plugin is a module exportingapply(ctx, config). This plugin waits for the Harness tool and system-prompt services, then uses their native extension points:
system-prompt/assemblerecalls memory before a model request.session/eventcaptures only completed turns from the durable event stream.ctx.tools.register(...)exposes explicit search and add tools.
Prerequisites
-
A Mem0 Platform account and API key:
- Sign up at app.mem0.ai
- Get your API key (starts with
m0-)
- The DeepSeek Harness installed.
- Your API key exported in your shell:
Try it locally
-
Build and pack the plugin:
-
Install it into a disposable Harness profile so Harness supplies its peer dependencies:
-
Copy
cordis.example.yml, set its installed package path and youruserId, then load it with the same profile: - Open the web UI and ask the agent to remember something, then recall it in a later turn.
cordis.yml entry looks like this:
config.host at that base URL (defaults to api.mem0.ai). host is a Platform base-URL override, not a switch to self-hosted Mem0 OSS.
Configuration
Both tools also accept optional per-call
userId, agentId, and runId params so a single install can partition memory by entity, agent, or session; userId defaults to the configured user, while agentId and runId are omitted unless supplied. Automatic recall and capture use the configured user without an agent, repository, or session filter. Automatic capture preserves full redacted user and assistant message text without a per-message character cutoff.
Telemetry
Writes are taggedsource="DEEPSEEK_HARNESS" so Mem0 can attribute usage to this integration. Usage events include operation names, durations, result counts, and coarse failure kinds. They are not anonymous: when an API key is configured they are sent under your Mem0 account email, the same way the SDK attributes its own. Queries, memory text, entity IDs, and API keys are never included. Set MEM0_TELEMETRY=false to opt out.
This plugin is a developer preview and tracks the evolving DeepSeek Harness plugin API.
Troubleshooting
MISSING_CREDENTIALfordeepseek-official: ConfigureDEEPSEEK_API_KEYthrough Harness’s Models page or export it in the shell that launches Harness.EMFILE: too many open files, watchon macOS: Launch Harness withCHOKIDAR_USEPOLLING=1.- Mem0 tools do not appear: Run Harness with
--dump-configand confirm the final composition contains themem0row and the installeddist/index.jspath.
userId overrides are rejected unless the operator enables allowUserOverride: true. Automatic recall and capture always use the configured user.