fjzzwxp/dsh-mnemosyne-memory ↗★ 2
dsh-mnemosyne-memory
Mnemosyne 永久记忆插件 - 为 DSH 提供长期记忆、向量搜索和 LLM 反思功能
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:fjzzwxp/dsh-mnemosyne-memory说明文档
阅读完整 README ↗Configure API Keys | 配置 API Key
## ⚙️ Configuration | 配置说明
### Environment Variables | 环境变量
```bash
### JSON Configuration | JSON 配置文件
```json
// config/mnemosyne.json
{
"enabled": true,
"embedding": {
"enabled": true,
"provider": "gemini",
"model": "gemini-embedding-001",
"dimensions": 768,
"apiKey": "YOUR_API_KEY"
},
"reflect": {
"enabled": true,
"provider": "gemini",
"model": "gemini-flash-lite-latest",
"temperature": 0.3,
"maxTokens": 2000,
"apiKey": "YOUR_API_KEY"
},
"sharedBanks": {}
}
📖 Usage Examples | 使用示例
Store Memory | 存储记忆
// Record a decision
await mnemo_store({
type: 'decision',
content: '决定优先开发客服 AI 场景',
importance: 0.85,
tags: ['战略', '客服']
});
// Record an insight
await mnemo_store({
type: 'insight',
content: '用户更偏好快速响应而非深度分析',
importance: 0.75,
tags: ['用户反馈', '体验']
});
Recall Memory | 检索记忆
// Semantic search
const results = await mnemo_recall({
query: '我们之前决定用什么框架',
k: 5,
min_importance: 0.5
});
// Filter by role
const ceoInsights = await mnemo_recall({
query: '战略方向',
role: 'ceo',
k: 10
});
Trigger Reflection | 触发反思
// Auto-reflect current session
const reflection = await mnemo_reflect({
turns: 20, // Analyze last 20 turns
force: false
});
console.log('Extracted insights:', reflection.insights_added);
Knowledge Pages | 知识页面
// List all pages
const pages = await mnemo_pages_list();
// Read a page
const arch = await mnemo_pages_read({ page_id: 'architecture' });
// Incremental refresh
const delta = await mnemo_pages_delta();
// → { added: 2, modified: 5, deleted: 0 }
Git History Import | Git 历史导入