Token导航 LogoToken导航TokenDH.com
Recursive Flow logo
AI代理未说明官方级别未说明来源级核验

Recursive Flow

MCP Server

Recursive Flow是一款AI工作流管理工具,能够将复杂任务分解为可管理的步骤并系统执行,适用于自动化多步骤工作流程。

工具数

7

提示词数

0

GitHub Stars

1

资源数

0
ClaudeAI代理工作流自动化Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

fritzprix

提供方

fritzprix

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

递归流:AI代理工作流管理器

递归流是一个强大的MCP(模型上下文协议)服务器,它使AI代理能够将复杂的任务分解为可管理的步骤并系统地执行。非常适合使用Claude Desktop和其他兼容MCP的AI助手自动化多步骤工作流程。

它做什么

  • 智能任务分解:自动将复杂的请求分解为更小、可管理的待办事项
  • 引导式执行:为AI代理提供下一步行动的分步指导
  • 工具编排:协调多种工具和服务以完成复杂的工作流程
  • 进度跟踪:跟踪已完成的工作和尚未完成的工作
  • 上下文保护:在整个工作流程中保持完整的上下文

关键利益

  • 自主操作:AI代理可以在没有持续指导的情况下独立工作
  • 可靠的执行:系统化的方法确保不会遗漏任何东西
  • 柔性集成:适用于任何与MCP兼容的工具和服务
  • 完全透明:对所采取的所有行动进行全面审计跟踪
  • 自我管理:特工们确切地知道下一步该做什么

运作原理

当你给人工智能助手一个复杂的任务时,递归流可以帮助它系统地完成任务:

  1. 规划阶段:AI将您的请求分解为具体的行动项
  2. 执行阶段:每个行动项目都使用正确的工具逐步解决
  3. 进度跟踪:系统会跟踪已完成的工作和下一步的工作
  4. 完成:完成所有项目后,您将获得一个完整的摘要

工作流示例

假设你让你的人工智能“研究竞争对手并创建市场分析报告”:

  1. 规划:AI创建了一个包含以下步骤的计划:

- 研究主要竞争对手 - 分析他们的定价策略 - 比较产品特性 - 创建摘要文档

  1. 执行:对于每一步,AI:

- 确定要使用的正确工具(网络搜索、数据分析、文档创建) - 按正确的顺序执行每个工具 - 记录下一步的结果

  1. 完成:您将收到一份全面的市场分析以及所有支持性研究

递归流架构

以下序列图显示了这些工具如何在递归、自我管理的工作流中协同工作:

@startuml
title Recursive Flow: Agentic Workflow Management

participant User
participant Agent
participant "Recursive Flow" as RF
participant "External Tools" as Tools

== 1. Workflow Initiation ==
User -> Agent: "Complex task request"
Agent -> RF: startJob(goal)
RF -> Agent: {context: {id, goal, status:'planning'}, nextAction: 'setPlan'}

== 2. Planning Phase ==
Agent -> RF: setPlan(jobId, todos)
RF -> Agent: {context: {todos: [...]}, nextAction: 'selectNextTodo'}

== 3. Recursive Execution Loop ==
loop For each TODO item
    Agent -> RF: selectNextTodo(jobId)
    RF -> Agent: {context: {currentTodo: {...}}, nextAction: 'planTodoExecution'}

    Agent -> RF: planTodoExecution(jobId, tools)
    RF -> Agent: {context: {toolPlan: [...]}, nextAction: 'tool1'}

    loop For each tool in toolPlan
        Agent -> Tools: execute_tool(params)
        Tools -> Agent: tool_result
        Agent -> RF: reportExecution(jobId, tool, result)
        alt More tools remaining
            RF -> Agent: {context: {executionHistory: [...]}, nextAction: 'next_tool'}
        else All tools completed
            RF -> Agent: {context: {executionHistory: [...]}, nextAction: 'completeTodo'}
        end
    end

    Agent -> RF: completeTodo(jobId, todoId)
    alt More TODOs remaining
        RF -> Agent: {context: {todos: [✓,○,○]}, nextAction: 'selectNextTodo'}
    else All TODOs completed
        RF -> Agent: {context: {todos: [✓,✓,✓]}, nextAction: 'finishJob'}
    end
end

== 4. Workflow Completion ==
Agent -> RF: finishJob(jobId)
RF -> Agent: {context: {status: 'complete', finalReport: '...'}, nextAction: null}
Agent -> User: "Complete results with full context"

@enduml

主要建筑特征

  • 自我导向:每个工具都会返回 nextAction 指导代理人
  • 上下文累积: executionHistory 建立全面的知识
  • 可变长度:工作流可适应任意数量的步骤和工具
  • 递归模式:选择核心循环→ plan → 执行→ 完成
  • 干净端接: nextAction: null 信号工作流完成

是什么让它与众不同

  • 无人工干预:一旦启动,人工智能就可以完成复杂的多步骤任务,而无需你指导每一步
  • 可靠的结果:系统方法确保一致、彻底地完成任务
  • 完全可见性:你可以清楚地看到所做的事情以及决策是如何做出的
  • 可扩展:适用于您的AI助手可以访问的任何工具

安装和设置

使用Claude Desktop快速设置(推荐)

备注:在使用npx之前,请确保将包发布到npm。如果尚未发布,请使用下面的“本地开发设置”方法。

使用递归流的最简单方法是 npx,它会自动下载并运行最新版本:

  1. 找到您的Claude Desktop配置文件:

- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json - 视窗: %APPDATA%\Claude\claude_desktop_config.json

  1. 添加递归流 对于您的MCP服务器配置:
{
  "mcpServers": {
    "recursive-flow": {
      "command": "npx",
      "args": ["recursive-flow"],
      "env": {}
    }
  }
}
  1. 重新启动克劳德桌面

就是这样!Claude将在需要时自动下载并运行递归流。

替代设置方法

选项1:全局安装

npm install -g recursive-flow

然后配置Claude Desktop:

{
  "mcpServers": {
    "recursive-flow": {
      "command": "recursive-flow",
      "args": [],
      "env": {}
    }
  }
}

选项2:地方发展设置

如果你想从源代码运行:

git clone [repository-url]
cd recursive-flow
npm install
npm run build

然后配置Claude Desktop:

{
  "mcpServers": {
    "recursive-flow": {
      "command": "node",
      "args": ["/absolute/path/to/recursive-flow/dist/index.js"],
      "env": {}
    }
  }
}

验证

安装后,重新启动Claude Desktop并要求其使用递归流:

“你能开始研究人工智能行业的竞争对手吗?”

如果配置正确,Claude将使用 startJob 开始工作流程的工具。

向NPM发布

如果你是包维护者,以下是如何发布以供npx使用:

# Build the package
npm run build

# Test locally first
npm pack
npm install -g ./recursive-flow-1.0.2.tgz

# Publish to NPM
npm publish

发布后,用户可以立即使用 npx recursive-flow 无需任何安装。

与其他AI助手一起使用

递归流可与支持模型上下文协议(MCP)的任何AI助手配合使用。查看AI助手的文档,了解MCP服务器设置说明。

如何使用

安装后,您可以为AI助手分配复杂的任务,它将自动使用递归流来管理工作流。以下是一些示例:

使用简单

只需让你的AI助手自然地处理复杂的任务:

“我需要你研究电动汽车市场的前5大竞争对手,并创建一份详细的比较报告”

幕后发生了什么

  1. 工作机会:AI开始新的工作流作业
  2. 规划:将任务分解为具体步骤
  3. 执行:系统地完成每一步
  4. 完成:提供全面的结果

适用于递归流的示例任务

  • 市场调研:“研究竞争对手并创建分析报告”
  • 内容创建:“计划并创建一个完整的社交媒体活动”
  • 数据分析:“分析销售数据并准备高管演示文稿”
  • 项目规划:“创建包含里程碑的详细项目时间表”
  • 研究项目:“调查一个主题并汇编全面的调查结果”

可用工具

递归流为AI代理提供了以下工具(按执行顺序):

  • startJob:以特定目标开始新的工作流程
  • setPlan:将目标分解为可操作的步骤
  • selectNextTodo:选择要执行的下一个任务
  • planTodoExecution:计划如何执行特定任务
  • reportExecution:记录任务执行结果
  • completeTodo:将任务标记为已完成
  • finishJob:完成整个工作流程(需要实施)

流型

这些工具遵循递归模式:

  1. 开始 → setPlan→ 选择下一个待办事项
  2. 循环:选择下一个待办事项→ 计划执行→ \[外部工具\]→ 报告执行→ 完成全部→ 选择下一个待办事项
  3. 结束:选择下一个待办事项→ finish作业→ null(工作流完成)

对用户的好处

  • 节省时间:无需手动分解复杂的任务
  • 确保完整性:多步骤流程中不会遗漏任何内容
  • 跟踪进度:看看到底做了什么,还剩下什么
  • 减少错误:系统化的方法最大限度地减少了错误
  • 自主工作:AI独立处理复杂的工作流程

故障排除

常见问题

Claude不认识递归流工具:

  • 检查MCP服务器配置是否使用 npxrecursive-flow 正确地
  • 确保您有互联网连接(npx需要下载软件包)
  • 配置更改后重新启动Claude Desktop
  • 试着跑步 npx recursive-flow 在终端中验证它是否正常工作

NPX相关问题:

  • 如果你得到“找不到命令”,请确保安装了Node.js和npm
  • 对于第一次运行,npx可能需要一点时间来下载包
  • 如果下载失败,请尝试: npm cache clean --force 然后重启克劳德

任务没有正确分解:

  • 试着更具体地说明你想要实现什么
  • 将非常大的任务分解为较小的初始请求

性能问题:

  • 当npx下载包时,第一次运行可能会变慢
  • 由于包被缓存,后续运行将更快

🤖 LLM代理的系统提示

使用此提示指示LLM代理如何与递归流交互。

系统提示模板

You are an autonomous workflow agent using the Recursive Flow MCP server.
Follow this exact protocol to handle complex multi-step tasks:

1. **Job Initialization**
   - Start by calling `startJob` with the user's main goal
   - Extract the `jobId` from the response

2. **Planning Phase**
   - Call `setPlan` with the `jobId` and an ordered array of todo descriptions
   - Each todo should be a clear, actionable step toward the goal

3. **Execution Loop**
   For each todo:
   - Call `selectNextTodo` with the `jobId`
   - When a todo is selected, call `planTodoExecution` with the `jobId` and array of tool names
   - Execute each tool in the planned sequence:
     - Use external tools as needed (web search, file operations, calculations, etc.)
     - After each tool execution, call `reportExecution` with `jobId`, tool name, and result
   - When all tools for the todo are complete, call `completeTodo` with `jobId` and `todoId`

4. **Completion**
   - When `selectNextTodo` returns `nextAction: 'finishJob'`, call `finishJob` with the `jobId`
   - This generates a comprehensive final report with all accumulated results

**Critical Rules:**
- ALWAYS follow the `nextAction` field in responses to know what to do next
- NEVER skip steps or change the protocol order
- Track the full `context` to understand current workflow state
- Report ALL tool executions with their actual results
- When `nextAction` is null, the workflow is complete

**Example Workflow:**
User: "Research competitors and create a market analysis report"

1. startJob(goal: "Research competitors and create a market analysis report")
2. setPlan(jobId, ["Research top 3 competitors", "Analyze pricing strategies", "Compare product features", "Create summary report"])
3. selectNextTodo(jobId) → todo: "Research top 3 competitors"
4. planTodoExecution(jobId, ["web_search", "data_collection"])
5. [Execute web_search] → reportExecution(jobId, "web_search", search_results)
6. [Execute data_collection] → reportExecution(jobId, "data_collection", collected_data)
7. completeTodo(jobId, 1)
8. [Repeat steps 3-7 for remaining todos]
9. finishJob(jobId) → final comprehensive report

Always maintain systematic execution and provide complete, actionable results.

集成示例

对于Claude Desktop: 复制上面的系统提示,并在给Claude需要系统分解和执行的复杂任务时使用它。

对于API集成: 在助手的配置中包含系统提示,以便为复杂的请求启用自动工作流管理。

支持

有关问题、疑问或贡献,请访问项目存储库或联系维护人员。

目录标签

目录标签

ClaudeAI代理工作流自动化Monkey C本地部署AI工作流任务分解自动化执行多步骤管理MCP协议

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

7

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP