mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-06-16 11:21:50 +08:00
docs: 根据 2.16.0 文档更新中英文 README
- 新增 AI Agent 编排章节(liteflow-react-agent,v2.16.0 头号特性) - 同步特性列表:Spring Boot 4、JDK21+ 虚拟线程、脚本语言、规则持久化 - 概述升级为现代化规则引擎定位,补充 AI Agent 一等公民编排 - 顶部互加中英文语言切换链接 - 保留中文 README 赞助商与 LF CLUB 社区段落 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
44
README.md
44
README.md
@@ -9,10 +9,12 @@
|
||||
<h3>Your star is my motivation to keep going. If you like LiteFlow, please help me with a star in the upper right corner.</h3>
|
||||
|
||||
## Overview
|
||||
LiteFlow is a lightweight and powerful rules engine framework, which can be used in the field of complex componenzed business orchestration. DSL rules drive the whole complex business, and can achieve smooth refresh hot deployment, supporting the embedding of multiple scripting language rules. Help the system become more silky and flexible.
|
||||
LiteFlow is a powerful, modern rules engine framework that combines the best of orchestration and rules engines. It can be used in the field of complex componentized business orchestration. DSL rules drive the whole complex business, and can achieve smooth refresh hot deployment, supporting the embedding of multiple scripting language rules. Help the system become more silky and flexible.
|
||||
|
||||
LiteFlow was officially open-sourced in 2020 and has since become an indispensable presence in the field of open-source rule engines in China. What's more, the most crucial aspect is that LiteFlow is an open-source project that continues to iterate at a high speed.
|
||||
|
||||
Starting from v2.16.0, LiteFlow even turns an AI Agent into a first-class citizen that can be orchestrated directly into your rules, standing shoulder to shoulder with your existing business nodes.
|
||||
|
||||
LiteFlow is a community-driven project with a strong emphasis on its large and active user community. We welcome you to raise any issues or suggestions you may have within the community.
|
||||
|
||||
You can find out how to join the community on the official website!
|
||||
@@ -25,12 +27,14 @@ You can find out how to join the community on the official website!
|
||||
* **Rules lightweight:** based on the rules file to arrange the process, learning the rules entry only takes 5 minutes, a read both understand.
|
||||
* **Rule diversification:** rules support XML, JSON, YML three rule file writing methods, which you like to use.
|
||||
* **Arbitrary arrangement:** Synchronous asynchronous mixing, no matter how complex the logic process, using LiteFlow rules, are easy to do, see the rules file to see how the logic works.
|
||||
* **Rules can be loaded from anywhere:** The framework provides implementations of local file configuration sources and ZK configuration sources, as well as an extension interface that allows you to store rules anywhere.
|
||||
* **Rules can be loaded from anywhere:** The framework natively supports storing rules in a structured database, Nacos, Etcd, Zookeeper, Apollo and Redis. It also provides an extension interface that allows you to store rules anywhere.
|
||||
* **Elegant hot refresh mechanism:** Rule changes, instant change of application rules without restarting your application. High concurrency does not cause any errors in executing rules due to refreshing rules.
|
||||
* **Wide support:** LiteFlow works regardless of whether your project is built on Springboot, Spring, or any other Java framework.
|
||||
* **JDK support:** From JDK8 to JDK25. Don't worry about JDK versions.
|
||||
* **Full Springboot support:** Supports Springboot 2.X through the latest Springboot 3.X.
|
||||
* **Scripting language support:** You can define script language nodes that support Groovy, Javascript, QLExpress, Python, Lua, Kotlin and Aviator. More script languages will be supported in the future.
|
||||
* **Wide support:** LiteFlow works regardless of whether your project is built on Spring Boot, Spring, or any other Java framework.
|
||||
* **JDK support:** From JDK8 to JDK25. Don't worry about JDK versions. Virtual threads are supported on JDK21 and above.
|
||||
* **Full Spring Boot support:** Supports Spring Boot 2.X, 3.X, and now the latest Spring Boot 4.X.
|
||||
* **Scripting language support:** You can define script language nodes that support Groovy, Java, Kotlin, JavaScript, QLExpress, Python, Lua and Aviator. More script languages will be supported in the future.
|
||||
* **Scripts fully connected with Java:** All scripting languages can call Java methods, reference any instance, and even make RPC calls inside scripts.
|
||||
* **AI Agent orchestration:** Wraps a full ReAct Agent into a standard LiteFlow component, so AI can be orchestrated directly into your business rules.
|
||||
* **Rule nesting support:** You can use simple expressions to create multiple nested complex logic layouts if you want.
|
||||
* **Component retry support:** Components can support retry, and each component can customize the retry configuration and specify exceptions.
|
||||
* **Context isolation mechanism:** Reliable context isolation mechanism, you do not have to worry about high concurrency data flow.
|
||||
@@ -57,6 +61,34 @@ LiteFlow has 2000 test cases and more. Complete documentation and comprehensive
|
||||
|
||||
Looking forward to your use!
|
||||
|
||||
## AI Agent Orchestration (New in v2.16.0)
|
||||
|
||||
Starting from v2.16.0, LiteFlow ships its own AI Agent module, `liteflow-react-agent`.
|
||||
|
||||
It is not a simple "LLM component". Instead, it wraps a full **ReAct (Reasoning + Acting) Agent** into a standard LiteFlow component — **one component is one Agent**. You only declare a component and implement a few simple methods; talking to LLM providers, multi-turn conversation memory, and the Skills system are all handled for you by the module.
|
||||
|
||||
Once an Agent becomes a LiteFlow component, it automatically inherits the full orchestration power of LiteFlow. You write rules exactly the way you always have — except one of the nodes is now a thinking AI:
|
||||
|
||||
```
|
||||
// Sequential orchestration, the AI node naturally sits between business nodes
|
||||
THEN(prepare, deepseekAgent, recordReply);
|
||||
|
||||
// Let two different LLMs analyze the same question in parallel
|
||||
WHEN(deepseekAgent, qwenAgent);
|
||||
|
||||
// Route to different Agents based on a condition
|
||||
IF(isMath, mathAgent, deepseekAgent);
|
||||
|
||||
// Multi-Agent collaboration: parallel analysis + aggregated decision
|
||||
THEN(prepare, WHEN(analyzerAgent, riskAgent), summaryAgent, notify);
|
||||
```
|
||||
|
||||
None of `THEN`, `WHEN`, `IF`, `SWITCH` or `FOR` here is newly invented for AI — they are the same orchestration operators LiteFlow has used for years. **If you can orchestrate LiteFlow, you can orchestrate AI.**
|
||||
|
||||
The module connects to mainstream LLM platforms — OpenAI, Claude, Gemini, DeepSeek, Qwen (DashScope), Kimi, GLM and more — and provides multi-turn conversation memory, the Skills system, workspace file tools, streaming output, and so on. Switching models is basically a one-line change to `model()`.
|
||||
|
||||
> Note: The AI Agent module is built on agentscope-java and requires JDK 21+ at runtime. See the [official documentation](https://liteflow.cc/) for the full usage guide.
|
||||
|
||||
## Sponsors
|
||||
|
||||
**驰骋工作流引擎**
|
||||
|
||||
@@ -4,13 +4,17 @@
|
||||
</a>
|
||||
</p>
|
||||
|
||||
[English](README.md)
|
||||
|
||||
<h3>您的star是我继续前进的动力,如果喜欢LiteFlow请右上角帮忙点个star</h3>
|
||||
|
||||
## 🌈概述
|
||||
LiteFlow是一个轻量且强大的国产规则引擎框架,可用于复杂的组件化业务的编排领域,独有的DSL规则驱动整个复杂业务,并可实现平滑刷新热部署,支持多种脚本语言规则的嵌入。帮助系统变得更加丝滑且灵活。
|
||||
LiteFlow是一个非常强大的现代化的规则引擎框架,融合了编排特性和规则引擎的所有特性。它可用于复杂的组件化业务的编排领域,独有的DSL规则驱动整个复杂业务,并可实现平滑刷新热部署,支持多种脚本语言规则的嵌入。帮助系统变得更加丝滑且灵活。
|
||||
|
||||
LiteFlow于2020年正式开源,直到现在已经是国内开源规则引擎中不可忽视的存在,而且最关键的是,LiteFlow还是一个持续高速迭代的开源项目。
|
||||
|
||||
从 v2.16.0 起,LiteFlow 更是把 AI Agent 变成了可以被直接编排进规则的"一等公民",让 AI 与你现有的业务节点平起平坐、自由编排。
|
||||
|
||||
LiteFlow是一个由社区驱动的项目,我们非常重视社区建设,拥有一个庞大的使用者社区,在使用中碰到任何问题或者建议都可以在社区中反应。
|
||||
|
||||
你在官网中可以找到加入社区的方式!
|
||||
@@ -23,13 +27,14 @@ LiteFlow是一个由社区驱动的项目,我们非常重视社区建设,拥
|
||||
* **规则轻量:** 基于规则文件来编排流程,学习规则入门只需要5分钟,一看即懂。
|
||||
* **规则多样化:** 规则支持xml、json、yml三种规则文件写法方式,喜欢哪种用哪个。
|
||||
* **任意编排:** 再复杂的逻辑过程,利用LiteFlow的规则,都是很容易做到的,看规则文件就能知道逻辑是如何运转的。
|
||||
* **规则持久化:** 框架原生支持把规则存储在标准结构化数据库,Nacos,Etcd,Zookeeper,Apollo,redis。您也可以自己扩展,把规则存储在任何地方。
|
||||
* **规则持久化:** 框架原生支持把规则存储在标准结构化数据库,Nacos,Etcd,Zookeeper,Apollo,Redis。您也可以自己扩展,把规则存储在任何地方。
|
||||
* **优雅热刷新机制:** 规则变化,无需重启您的应用,即时改变应用的规则。高并发下不会因为刷新规则导致正在执行的规则有任何错乱。
|
||||
* **支持广泛:** 不管你的项目是不是基于Spring Boot,Spring还是任何其他Java框架构建,LiteFlow都能游刃有余。
|
||||
* **JDK支持:** 从JDK8到JDK25,全部支持。无需担心JDK版本。
|
||||
* **Spring Boot支持全面:** 支持Spring Boot2.X到最新的Spring Boot3.X。
|
||||
* **脚本语言支持:** 可以定义脚本语言节点,支持Groovy,JavaScript,QLExpress,Python,Lua,Aviator,Java,Kotlin。未来还会支持更多的脚本语言。
|
||||
* **JDK支持:** 从JDK8到JDK25,统统支持。无需担心JDK版本。JDK21以上支持虚拟线程。
|
||||
* **Spring Boot支持全面:** 支持Spring Boot 2.X、3.X,并已支持最新的Spring Boot 4.X。
|
||||
* **脚本语言支持:** 可以定义脚本语言节点,支持Groovy,Java,Kotlin,JavaScript,QLExpress,Python,Lua,Aviator。未来还会支持更多的脚本语言。
|
||||
* **脚本和Java全打通:** 所有脚本语言均可调用Java方法,甚至于可以引用任意的实例,在脚本中调用RPC也是支持的。
|
||||
* **AI Agent编排:** 把一个完整的 ReAct Agent 封装成标准的 LiteFlow 组件,让 AI 直接被编排进你的业务规则。
|
||||
* **规则嵌套支持:** 只要你想得出,你可以利用简单的表达式完成多重嵌套的复杂逻辑编排。
|
||||
* **组件重试支持:** 组件可以支持重试,每个组件均可自定义重试配置和指定异常。
|
||||
* **上下文隔离机制:** 可靠的上下文隔离机制,你无需担心高并发情况下的数据串流。
|
||||
@@ -56,6 +61,34 @@ LiteFlow拥有极其详细易懂的文档体系,能帮助你解决在使用框
|
||||
|
||||
LiteFlow期待你的了解!
|
||||
|
||||
## 🤖AI Agent编排(v2.16.0 全新特性)
|
||||
|
||||
从 v2.16.0 起,LiteFlow 拥有了自己的 AI Agent 模块 `liteflow-react-agent`。
|
||||
|
||||
它做的不是简单的"大模型组件",而是把一个完整的 **ReAct(Reasoning + Acting)Agent** 封装成标准的 LiteFlow 组件——**一个组件,就是一个 Agent**。你只需声明一个组件、实现几个简单的方法,对接大模型、多轮会话记忆、Skills 技能体系这些能力,模块都替你包揽好了。
|
||||
|
||||
而一旦 Agent 变成了 LiteFlow 组件,它就自动继承了 LiteFlow 的全套编排能力。你原来怎么写规则,现在还怎么写,只不过其中某个节点,是一个会思考的 AI:
|
||||
|
||||
```
|
||||
// 串行编排,AI 节点自然地夹在业务节点中间
|
||||
THEN(prepare, deepseekAgent, recordReply);
|
||||
|
||||
// 让两个不同的大模型并行分析同一个问题
|
||||
WHEN(deepseekAgent, qwenAgent);
|
||||
|
||||
// 根据条件路由到不同的 Agent
|
||||
IF(isMath, mathAgent, deepseekAgent);
|
||||
|
||||
// 多 Agent 协同:并行分析 + 汇总决策
|
||||
THEN(prepare, WHEN(analyzerAgent, riskAgent), summaryAgent, notify);
|
||||
```
|
||||
|
||||
这里的 `THEN`、`WHEN`、`IF`、`SWITCH`、`FOR` 没有一个是为 AI 新造的,全是 LiteFlow 用了多年的编排算子。**你会编排 LiteFlow,你就会编排 AI。**
|
||||
|
||||
该模块对接了主流大模型平台:OpenAI、Claude、Gemini、DeepSeek、通义千问(DashScope)、Kimi、GLM 等,并提供多轮会话记忆、Skills 技能体系、工作空间文件工具、流式输出等能力,换模型基本就是换一行 `model()` 的事。
|
||||
|
||||
> 提示:AI Agent 模块基于 agentscope-java,运行时需要 JDK 21+。完整使用方式请查阅[官方文档](https://liteflow.cc/)。
|
||||
|
||||
## 👑LF CLUB社区
|
||||
|
||||
LF CLUB是由LiteFlow作者创办的高级付费社区
|
||||
|
||||
Reference in New Issue
Block a user