从研究到行动
研究驱动的决策管道 关系代理将5个MCP工具链接到自动化研究工作流程中。
管道
research_discover → research_add → research_analyze → consensus_vote → memory_query- 发现 arXiv、GitHub、语义学者关于某一主题的论文
- 添加 将发现的论文提交给研究登记处
- 分析 差距、趋势和优先事项登记簿
- 投票 基于多模型共识的研究方向
- 商店 跨会话持久性的记忆决策
快速开始
pnpm install
pnpm test # Run 71 unit tests
pnpm typecheck # TypeScript strict mode
pnpm build # Compile to dist/作为图书馆使用
import { runResearchPipeline, generateReport } from 'research-to-action';
import type { ToolCaller } from 'research-to-action';
const caller: ToolCaller = {
call: async (tool, args) => await mcpClient.callTool(tool, args),
};
const result = await runResearchPipeline(caller, {
topic: 'multi-agent orchestration',
});
console.log(generateReport(result, 'markdown'));实时集成模式
# 1. Create src/live-bridge.ts with your MCP client
# 2. Run:
NEXUS_LIVE=true npx tsx src/run-live.ts
# Custom topic:
NEXUS_LIVE=true RESEARCH_TOPIC="LLM routing" npx tsx src/run-live.ts
# JSON output:
NEXUS_LIVE=true REPORT_FORMAT=json npx tsx src/run-live.ts涵盖MCP工具
| 工具 | 目的 | 安全 |
|---|---|---|
research_discover | 从外部来源查找论文 | 只读搜索 |
research_add | 将论文添加到注册表 | 用途 dryRun=true 默认情况下 |
research_analyze | 分析注册表中的差距/趋势 | 只读分析 |
consensus_vote | 多模型方向投票 | 测试模式下的模拟投票 |
memory_query | 查询存储决策的内存 | 只读查询 |
报表格式
- 标记语言 --包含发现结果、投票结果和最终决定的表格
- JSON --结构化JSON格式的完整管道结果
- 文本 --紧凑型终端输出
项目结构
src/
types.ts # Zod schemas matching live MCP responses
fixtures/
mock-responses.ts # Mock data for all 5 tools
pipeline.ts # Research pipeline (discover → add → analyze → vote → store)
reporter.ts # Report formatter (markdown/json/text)
live-caller.ts # Live mode ToolCaller bridge
run-live.ts # CLI entry point for live integration testing
index.ts # Public API exports许可证
麻省理工学院
