dromara/liteflow

Lightweight, fast, stable, programmable component-based rule engine — where AI Agents orchestrate just like ordinary components. Uniquely designed DSL: component reuse, sync/async & dynamic orchestration, multi-language scripting, nested rules, hot deployment and smooth refresh. If you can orchestrate LiteFlow, you can orchestrate AI.

What it solves

LiteFlow is designed to decouple complex business logic in Java applications. It replaces bloated, hard-to-maintain code with a flexible rules engine that allows developers to orchestrate business processes using a lightweight Domain Specific Language (DSL) rather than hard-coding the sequence of operations.

How it works

The framework treats every piece of logic as a "component." These components are then arranged into a workflow using rules defined in XML, JSON, or YML files. The engine supports various orchestration operators (like THEN for sequential, WHEN for parallel, and IF for conditional routing) to manage how components are executed.

Starting with v2.16.0, it integrates AI Agents as first-class citizens. By wrapping a ReAct (Reasoning + Acting) Agent into a standard LiteFlow component, AI can be inserted directly into a business rule chain alongside traditional Java components.

Who it’s for

It is primarily for Java developers building complex, componentized business systems that require high flexibility, the ability to update business rules without restarting the application (hot refresh), and the the ability to integrate LLM-driven agents into their workflows.

Highlights

  • AI Agent Integration: Integrates ReAct Agents as standard components, allowing AI to be orchestrated using the same operators as business logic.
  • Hot Refresh: Update business rules instantly without restarting the application.
  • Multi-Language Support: Supports script nodes in Groovy, Java, Kotlin, JavaScript, Python, Lua, and others.
  • Flexible Storage: Rules can be loaded from databases, Nacos, Etcd, Zookeeper, Apollo, or Redis.
  • Broad Compatibility: Works with Spring Boot (2.x, 3.x, 4.x), Spring, and JDK 8 through 25.