← 返回
未分类 中文

FlowForge Workflow Engine

Run structured multi-step workflows via FlowForge engine. Use when user requests step-by-step execution, structured workflows, or when a task needs enforced...
通过FlowForge引擎运行结构化多步骤工作流。在用户请求分步执行、结构化工作流或任务需要强制执行时使用。
kagura-agent
未分类 clawhub v1.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 314
下载
💾 0
安装
1
版本
#latest

概述

FlowForge Workflow Runner

Execute multi-step workflows defined in YAML files using the FlowForge state machine engine.

Prerequisites

FlowForge CLI must be installed. Check with:

flowforge --version

If the command fails or is not found, run the setup flow in setup.md before proceeding.

My Workflows

IntentWorkflow
------------------
(add your mappings here as you use FlowForge)

Core Loop

1. Start or Resume

# Check for active instances
flowforge active

# Resume if exists
flowforge status

# Or start new
flowforge start <workflow>

2. Get Action

flowforge run <workflow>

Returns JSON: { action: { type, node, task, branches, ... } }

3. Execute by Action Type

type: 'spawn' — Node has executor: subagent. MUST spawn a sub-agent:

sessions_spawn(
  task: action.task,
  mode: "run",
  label: "flowforge-<workflow>-<node>"
)

Wait for sub-agent to complete. Collect its output.

⚠️ NEVER execute spawn tasks yourself in the main session. The whole point of subagent nodes is delegation — they run in parallel, unblock the main session, and use the best tool for the job. If you do it yourself, you're blocking the main session and defeating the purpose.

type: 'prompt' — Node needs your direct judgment. Execute the task yourself in the main session. Use this for decision-making, lightweight checks, and coordination — not heavy implementation work.

type: 'complete' — Workflow finished. Report results to the user.

4. Advance

After getting the result (from sub-agent output or your own work):

echo "<result summary>" | flowforge advance

Or:

flowforge advance --result "<result summary>"

If the node had branches, include Branch: N in the result so the engine knows which path to take.

5. Repeat

Go back to step 2. Loop until type: 'complete'.

Rules

  • spawn = sub-agent. When action type is spawn, use sessions_spawn. Not exec, not a coding CLI, not doing it yourself in the main session.
  • Never skip nodes. Execute every node's task before advancing.
  • Run to completion. Execute all nodes before reporting to the user. If a node spawns a sub-agent, wait for it to finish, then advance.
  • State persists. Workflows survive session restarts. Use flowforge active to resume.
  • Post-run: Record results in your daily log.

Manual Mode

If you prefer step-by-step control instead of the run/advance JSON loop:

flowforge status          # See current task
# ... execute task ...
flowforge next            # Advance (linear node)
flowforge next --branch N # Advance (branching node)

The same spawn rules apply: if the current node has executor: subagent, spawn a sub-agent.

Creating New Workflows

See references/yaml-format.md for the full YAML spec.

name: my-workflow
description: What this workflow does
start: first-node

nodes:
  first-node:
    task: What to do (detailed instructions for the executor)
    executor: subagent    # spawn a sub-agent for this node
    next: second-node

  second-node:
    task: Make a decision based on results
    # executor defaults to 'inline' — agent does it directly
    branches:
      - condition: success
        next: done
      - condition: retry
        next: first-node

  done:
    task: Report results
    terminal: true

Node Fields

  • task (required): Natural language instruction for what to do
  • executor: 'subagent' (spawn) or 'inline' (default, do it yourself)
  • next: Single next node for linear flow
  • branches: Array of {condition, next} for branching
  • terminal: true for end nodes

Troubleshooting

  • "No active instance": Run flowforge start
  • "Workflow not found": Run flowforge list to see available workflows
  • Wrong node / stuck: Use flowforge reset to restart
  • Sub-agent failed: Check the error, fix the issue, re-run the node or advance manually

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-05-07 09:55 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Pulse TODO

kagura-agent
统一任务管理和调度,适用于AI代理。使用时机:(1) 做出承诺时(如“我会做X”“帮你跟进”“记得…”),(2) 检查待办时(如待办、wha…)
★ 0 📥 401

Agent Memes

kagura-agent
发送表情包(梗图)反应图片到聊天。使用一条命令即可挑选并发送。支持多平台(Discord、飞书、Telegram 等)。在对话需要视觉表达时使用。
★ 0 📥 656

Gogetajob

kagura-agent
开源贡献流程——查找 GitHub Issues、实现修复、提交 PR、追踪结果。适用于:① 开始工作循环或贡献周期时
★ 0 📥 376