SwarmFlow - openJiuwen open-source multi-agent workflow orchestration framework
SwarmFlow is an open-source, multi-agent controllable workflow orchestration framework from openJiuwen. It separates orchestration from intelligence, with collaborative processes executed stably by the system and inference and judgment handled by the Agent.
What is SwarmFlow?
SwarmFlow is an open-source, multi-agent, controllable workflow orchestration framework from openJiuwen. It separates orchestration from intelligence, ensuring stable execution of collaborative processes while delegating inference and decision-making to agents. The framework utilizes... workflow.py The script solidifies the operators used for team collaboration, supports orchestration modes such as parallel, pipeline, and phased, and is built into JiuwenSwarm's SwarmSkill Creator. An executable team skill can be generated with just one line of code.
SwarmFlow's main functions
-
Operator-based workflow orchestration:supply
agent,parallel,pipeline,phase,workflow,agent_session,human,budgetModular operators are used to assemble complex collaborative processes. -
Swarm Skill Dual-Form SupportThe same set of team skills can be retained for open collaboration (without scripts), and can support executable orchestration (with...).
workflow.pyIt automatically adapts to the characteristics of the task. -
SwarmSkill Creator automatically generatesInput a natural language requirement, and the system will automatically complete role design, arrangement generation, constraint verification, and produce a reusable team skill set.
-
Team mode automatic routingUsers describe tasks in natural language, and the system automatically identifies the workflow intent and determines whether to use SwarmFlow, open Swarm Skill, or a single agent.
-
TUI Visual Monitoring: In the JiuwenSwarm terminal interface via
/swarmflowsView the real-time tree-structured flowchart to track stage progress, Agent status, and logs. -
Human-computer interaction nodesInsert at key stages
humanOperators request input or approval from humans during execution. -
Resource budget constraints:pass
budgetOperators set resource consumption limits for workflows to prevent uncontrolled spending.
SwarmFlow's technical principles
- Orchestration and Intelligence Separation ArchitectureTraditional multi-agent collaboration relies on the Leader Agent to handle both orchestration and inference. SwarmFlow removes the orchestration logic—such as order of operations, parallel processing, and failure handling—from the Leader's on-the-spot judgments, transforming it into an automatically executable script. Agents are invoked at the nodes requiring inference. This frees the Leader from process management, allowing it to focus on the truly crucial decision-making tasks.
- Operator-driven declarative orchestrationSwarmFlow does not provide a black-box orchestration engine, but instead exposes a set of atomic operators:
agentDistribute order tasks.parallelThe results are summarized after multiple agents execute in parallel.pipelineBatch entry processing in a step-by-step pipeline.agent_sessionRetains multiple rounds of memory and supports forking clones for hypothesis deduction.phaseBreak down long processes into observable phases.workflowReuse existing subprocesses,humanInsert manual approval.budgetResource limits are constrained. Developers use operators to construct scripts, and the system steadily progresses according to the order of declaration. - Morphological adaptive determination mechanism. SwarmSkill Creator automatically determines whether task orchestration can be predetermined during the generation phase: it generates open Swarm Skills without scripts for dynamic collaboration scenarios; and it generates tasks with fixed workflows.
workflow.pyAn executable version is available; both are also possible. The calling Team mode further automatically routes to the appropriate form based on the user's natural language intent.
How to use SwarmFlow
-
Install JiuwenSwarmVisit the JiuwenSwarm official website https://openjiuwen.com/jiuwenswarm#quick-start to execute.
pip install jiuwenswarmInstall the core package, then executepip install jiuwenswarm-tuiInstall the terminal interface. -
Initialize environment:run
jiuwenswarm-initComplete the initial configuration and usejiuwenswarm-startStart the service. -
Launch TUI interface:run
jiuwenswarm-tuiEnter the terminal interactive environment to prepare to create or invoke team skills. -
Generate Swarm SkillDescribe the target to SwarmSkill Creator using natural language, and the system will automatically determine the shape and generate character, choreography, and constraint files.
-
Write or verify workflow.pyIf an executable file is generated, check...
scripts/workflow.pyCheck whether the operator arrangement in the code meets expectations, and make minor adjustments if necessary. -
Execute workflowIn Team mode, trigger a task using natural language (e.g., "Analyze this company using Swarmflow"), and the system will automatically route and launch Swarmflow.
-
Monitoring and debuggingEnter in TUI
/swarmflowsOpen the visual tree diagram to view the stage progress and Agent status, and drill down to check the prompts and logs.
SwarmFlow's core advantages
-
Determinism Priority: Scripting fixed collaboration processes ensures that the same task is executed multiple times along the same path, avoiding instability caused by Leader Agent's on-the-spot judgment.
-
Orchestration and Intelligent DecouplingThe system manages process advancement, the agent manages sub-task reasoning, and the leader is no longer overwhelmed by the context, each focusing on its own responsibilities.
-
Low threshold generationSwarmSkill Creator supports generating complete team skills with a single line of code, eliminating the need for users to manually write complex orchestration scripts.
-
Dual-form flexible adaptationIt supports both open collaboration and executable orchestration within the same framework, automatically selecting based on task characteristics and avoiding forced scripting of dynamic scenarios.
-
Production-level observableTUI provides real-time visualization, breakpoint resume, and resource budget constraints, meeting the engineering requirements for implementing complex tasks.
Comparison of SwarmFlow with similar competitors
| Dimension | SwarmFlow (openJiuwen) | CrewAI |
|---|---|---|
| Arrangement concept | The orchestration is handled by the system, while the intelligence is handled by the agent. The collaborative process is executed stably by the system, and the agent is only responsible for reasoning. | The orchestration is driven by the Crew process, with the Agent executing autonomously within the task and potentially triggering subsequent actions. |
| Core Abstraction | Operator (agent/parallel/pipeline/phase/workflow/human/budget) Build the script. |
The three core elements are Crew (team), Agent (role), and Task (task), with the execution order defined by Process. |
| Coding threshold | SwarmSkill Creator supports generating complete team skills from a single line of natural language, eliminating the need for users to manually write and orchestrate scripts. | The developer needs to manually write Python code to define Crew, Agent, Task, and Process, which requires programming skills. |
| Dynamic Collaboration | Dual-mode adaptive: Retains the unscripted open Swarm Skill when orchestrating dynamically, and follows the path when orchestrating is fixed. workflow.py script. |
Mainly through Process.sequential or Process.hierarchical The pre-set process has limited dynamic adjustment capabilities. |
| Visualization | TUI built-in /swarmflows A real-time interactive tree diagram allows you to directly view stage progress, agent status, and drill-down logs. |
It lacks a native visual interface and relies on log output or third-party tools for tracing, resulting in a backend-oriented debugging experience. |
| Human-computer interaction | native human Operators allow manual input or approval to be inserted at any node in the workflow without requiring additional code. |
Human-in-the-loop implementation requires a custom tool or callback function, and there is no native workflow interruption mechanism. |
| Resource control | native budget Operators can set resource consumption limits for the entire workflow or sub-processes to prevent the limits from getting out of control. |
There is no native resource budget or token limit mechanism; control logic needs to be encapsulated in the Agent or Task layer. |
| Applicable Scenarios | Complex deterministic processes (financial quantitative analysis, paper analysis, batch PPT generation, office automation). | Standard business process automation (market research, content creation, customer support) is suitable for tasks of medium complexity. |
Application scenarios of SwarmFlow
-
Financial Quantitative AnalysisThe five-dimensional stock analysis workflow involves parallel data collection and scoring from five agents: financial, market, capital, public opinion, and industry. Finally, cross-validation is used to generate trading signals and backtesting reports.
-
Paper reading and office automationEnter the paper link, and it will automatically complete the parsing, method analysis, document generation, email composition, and sending to the specified recipient, which is suitable for research teams to share literature regularly.
-
Large document batch generationFor example, when creating a 200-page PPT, first plan the division of labor among the chapters, then generate 10 chapters in parallel, and finally merge and summarize them to ensure a unified structure and consistent style.
-
Technology research automationGiven a topic, the system automatically searches for papers and materials, organizes resources, extracts images, analyzes trends, and finally generates a technical sharing email to send to team members.
-
Multi-expert reviewIn a scriptless format, experts from industry, risk, and data perspectives will participate in roundtable discussions, with fixed stages but dynamic changes in viewpoints.