dsh-plugin-reme
August 14, 2026 · View on GitHub
DeepSeek Harness plugin for ReMe long-term memory integration.
Overview
This plugin integrates ReMe's file-based long-term memory system into DeepSeek Harness, giving the agent six model-facing tools to search, read, write, and consolidate durable knowledge stored as Markdown files.
Tools Provided
| Tool | Description |
|---|---|
reme_search | Search ReMe memory by keyword/query (BM25) |
reme_read | Read a memory file by workspace path |
reme_write | Write a new memory file with frontmatter |
reme_save_memory | Save conversation turns into daily memory cards |
reme_proactive | Read proactive interest topics from auto_dream |
reme_dream | Consolidate daily notes into long-term digest memory |
Prerequisites
- DeepSeek Harness installed (
dshCLI available) - ReMe installed (
pip install "reme-ai[core]") - pnpm available (for DSH plugin management)
Installation
From Local Path (Development)
# Navigate to the plugin directory
cd /path/to/dsh-plugin-reme
# Add the plugin to your DSH profile
dsh plugin --profile web add ./dsh-plugin-reme
From Git Repository
dsh plugin --profile web add git+https://github.com/yourusername/dsh-plugin-reme.git
From npm Registry (When Published)
dsh plugin --profile web add dsh-plugin-reme
Configuration
The plugin reads its configuration from the cordis.patch.yml patch entry. Override defaults by adding a patch in your profile's cordis.patch.yml:
- id: tool-reme
config:
host: '127.0.0.1' # ReMe service host
port: 2333 # ReMe service port
searchLimit: 5 # Default search result limit
timeoutMs: 60000 # Tool call timeout in milliseconds
Usage
1. 安装插件
dsh plugin --profile web add ./dsh-plugin-reme
2. 启动 ReMe 服务
插件只是 HTTP 客户端,需要 ReMe 服务在运行。
基础启动(只有 BM25 关键词搜索):
reme start
启用向量检索 + LLM(推荐):
reme start \
"components.as_embedding.default.backend=openai" \
"components.as_embedding.default.model=你的embedding模型" \
"components.as_embedding.default.dimensions=维度" \
"components.as_embedding.default.credential.api_key=sk-placeholder" \
"components.as_embedding.default.credential.base_url=http://你的embedding端点/v1" \
"components.embedding_store.default.backend=local" \
"components.embedding_store.default.as_embedding=default" \
"components.file_store.default.embedding_store=default"
⚠️ 不要用
config=file.yaml覆盖整个components段,这会导致内置组件(file_graph、keyword_index)丢失,启动失败。
首次启用 embedding 需要重建索引:
reme reindex
3. 验证
reme search query="测试" limit=3
# counts 中显示 "hybrid": true 说明向量检索生效
Example Agent Workflows
-
Search before answering: The agent searches ReMe for relevant prior context before answering questions about project history or user preferences.
-
Save after useful conversations: After a productive exchange, the agent calls
reme_save_memoryto distill key facts into daily memory cards. -
Periodic consolidation: The agent runs
reme_dreamto merge daily notes into long-term digest knowledge nodes. -
Proactive recall: The agent checks
reme_proactiveto discover interest topics it should bring up.
Project Structure
dsh-plugin-reme/
├── package.json # Package manifest with dsh.bundle declaration
├── cordis.patch.yml # Cordis loader patch (entry registration)
├── reme-start-commands.md # ReMe 启动参数参考(CLI)
├── lib/
│ ├── index.js # Main plugin entry (tool registrations)
│ └── constants.js # Shared constants
└── skills/
└── reme_memory/
└── SKILL.md # Agent skill documentation
How It Works
- Cordis Patch: The
cordis.patch.ymldeclares an entry that loads thedsh-plugin-rememodule - Tool Registration: On activation, the module registers 6 tools with
ctx.tools.register()and adds system prompt guidance viactx.systemPrompt.section() - HTTP Client: Tool executions call the ReMe HTTP API (
POST /{action}) on the configured host:port - Streaming Support: The client handles both JSON and SSE streaming responses from ReMe
License
MIT