一个模型上下文协议 (MCP) 服务器,将线性的人工智能推理转化为结构化、可审计的思想图。DRE 使语言模型能够将其推理过程外部化为带有语义思想类型、依赖关系和验证的有向无环图 (DAG)。
npm install -g deliberate-reasoning-engine
git clone https://github.com/haasonsaas/deliberate-reasoning-engine.git
cd deliberate-reasoning-engine
npm install
npm run build
添加到您的 Claude Desktop 配置 (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"dre": {
"command": "npx",
"args": ["deliberate-reasoning-engine"]
}
}
}
或者使用本地开发版本:
{
"mcpServers": {
"dre": {
"command": "node",
"args": ["/绝对路径/to/dre/dist/index.js"]
}
}
}
重启 Claude Desktop,您将在 🔧 菜单中看到 DRE 工具。
log_thought记录一个具有语义类型和依赖关系的结构化思想。
参数:
thought (字符串,必需):思想的内容thought_type (枚举,必需):其中之一:
objective:推理任务的整体目标hypothesis:提出的解释或解决方案assumption:在此推理线上视为真实的信念question:需要解决的不确定性点sub_problem:较大问题的分解evidence:来自工具或先前知识的数据action:使用工具的计划synthesis:从前一个思想得出的结论critique:自我纠正或缺陷识别dependencies (字符串数组,可选):此思想依赖的 IDconfidence (0-1 的数字,可选):信心水平action_request (对象,可选):要执行的工具及其参数get_thought_graph检索当前推理图。
参数:
format (枚举,可选):"full" 或 "summary" (默认:"summary")invalidate_assumption标记一个假设为无效,并级联到所有相关思想。
参数:
thought_id (字符串,必需):要无效化的假设的 IDreason (字符串,必需):无效化的解释这里是如何使用 DRE 分析复杂决策的一个例子:
// 1. 设置目标
const objective = await use_mcp_tool("dre", "log_thought", {
thought: "我们应该收购公司 X 吗?",
thought_type: "objective"
});
// 2. 形成假设
const hyp1 = await use_mcp_tool("dre", "log_thought", {
thought: "收购公司 X 将使我们的市场份额增加 20%",
thought_type: "hypothesis",
dependencies: [objective.thought_id],
confidence: 0.7
});
// 3. 识别假设
const assumption = await use_mcp_tool("dre", "log_thought", {
thought: "公司 X 的技术与我们的技术栈兼容",
thought_type: "assumption",
dependencies: [hyp1.thought_id],
confidence: 0.8
});
// 4. 分解为子问题
const subproblem = await use_mcp_tool("dre", "log_thought", {
thought: "通过尽职调查验证技术兼容性",
thought_type: "sub_problem",
dependencies: [assumption.thought_id]
});
// 5. 如果假设被证明是错误的,则无效化它
await use_mcp_tool("dre", "invalidate_assumption", {
thought_id: assumption.thought_id,
reason: "技术审核揭示了主要不兼容性"
});
// 这会自动标记子问题及相关思想为过时
DRE 将推理建模为一个有向无环图,其中:
# 安装依赖项
npm install
# 构建 TypeScript
npm run build
# 在开发模式下运行
npm run dev
# 运行测试
npm test
我们欢迎贡献!请参阅 CONTRIBUTING.md 获取指南。
“在 Claude Desktop 中找不到服务器”
“无法找到模块” 错误
npm install 和 npm run buildMIT - 详情请参阅 LICENSE。