Rules4J
Github

First version coming soon! Track updates

JVM-native rule engine

Dynamic rules, native performance.

With no-restart updates at runtime, confidently keep your business logic in your code.

Define your rules
Fluent Java/Kotlin API with minimal boilerplate.
data_object check
Define your rule flow
Directed Acyclic Graphs (DAGs) for complex rule dependencies.
account_tree check
Compose Rules
Either use your application's classes or define dynamic rules via Kotlin.
integration_instructions check
Configure the Engine
Keep execution deterministic under overlap.
tune check
Execute Your Rule Flow
Provide a full audit trail for every decision.
play_arrow check
Update Rules at Runtime
See a quick walkthrough of the update process.
autorenew check
Fluent DSL
Get Started Read Docs

How it works

code

Write in Kotlin

Author rules in pure Kotlin with a fluent, type-safe API.

memory

Compiled to Bytecode

The library compiles and loads your rules as JVM .class files.

bolt

Native Speed

Rules execute as compiled bytecode — no interpretation overhead.

Build Rule Flows Visually

Drag nodes to explore the payment-screening flow from the code above.

How It All Fits Together

Rules4J assembles native classes and dynamic Kotlin files into one compiled flow.

deployed_code

Your Application

data_object VelocityCondition.java
data_object VelocityAction.java
data_object GeoAnomalyCondition.java
account_tree Flow definition
Rules4J Engine
cloud_sync

Rule Store

code MerchantRule.kt
code ScoreCondition.kt
code DecisionAction.kt
bolt

One compiled flow. Native speed. Like calling a method in your app.

Designed for Performance

Rules are compiled to JVM bytecode and executed with native speed.

Update at Runtime

Flows and rules are updated without restarting the application.

Cloud Native

Updates are distributed across all instances of a running application.

Non-Invasive API

Drop-in solution with minimal changes to your existing codebase. No need for external DSLs or configuration files.

Built with Compliance in Mind

All rules are versioned and stored in a central repository, providing a clear audit trail for regulatory compliance and internal governance.

Provable & Replayable Decisions

Every decision is logged and replayable, with full context, ensuring provable and reliable rule execution.