Skip to main content
Add persistent memory to the DeepSeek Harness with @mem0/dsh-mem0. The Harness agent forgets everything between sessions. This plugin gives it two Mem0-backed tools so recall and writes persist across runs, sharing the same memory bank you already use from Claude Code, Codex, and other agents.

Overview

The plugin registers two agent-callable tools: Unlike file-based memory plugins, Mem0 is a managed backend: server-side extraction, semantic dedup, and conflict resolution, with the same memory reusable across every agent you connect.

How it works

A Cordis plugin is a module exporting apply(ctx, config). This one declares inject = ['tools'] so it waits for the harness tool registry, then registers the two tools via ctx.tools.register(...). When the plugin unmounts, the tools are removed automatically (Cordis revertible effects).

Prerequisites

  1. A Mem0 Platform account and API key:
  2. The DeepSeek Harness installed.
  3. Your API key exported in your shell:

Try it locally

  1. Build the plugin:
  2. Point the Harness at it. Copy cordis.example.yml, set the absolute path to dist/index.js and your userId, then load it:
  3. Open the web UI and ask the agent to remember something, then recall it in a later turn.
The cordis.yml entry looks like this:
For a Mem0 Platform on-prem or dedicated deployment, point 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; when omitted they fall back to the configured userId.

Telemetry

Writes are tagged source="DEEPSEEK_HARNESS" so Mem0’s backend can attribute usage to this integration.