RuleGo: an embeddable Go rule engine where JSON rule chains of components replace hard-coded business flow
⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
At a glance
- What is it?
- rulego/rulego is an Apache-2.0 Go framework that runs business logic as chains of reusable components defined in JSON. It can be embedded in an existing Go application or run as a standalone service, and it reached v1.0.0 in October 2026 after a long 0.x series.
- Who is it for?
- RuleGo suits Go teams whose business flow changes often or whose service has to bridge many protocols such as HTTP, MQTT and Kafka, and who accept describing that flow as JSON rule chains. It is not the right pick if you want a decision-table rule engine, if your stack is not Go, or if you need published throughput figures.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 9 days ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.
Star history
- rulego/rulego1,637 ★ · +37
| Repository | 2026-09-12 | 2026-11-22 |
|---|---|---|
| rulego/rulego | 1.6k | 1.6k |
37 Stars in the last 71 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Business logic becomes JSON rule chains of components, not Go code you recompile
The central idea is that every piece of business logic is a component, and components are linked into rule chains that you define in JSON. The README presents rule chains as the way to build loosely coupled systems that respond to changing requirements. Chains can be nested, so a sub-chain is reused as a step in a larger one, and the project says orchestration can be changed dynamically, replacing or adding business logic without restarting the application.
The consequence is that behaviour lives in data. You get change without a redeploy, and you also take on a second language to maintain: the rule chain DSL, documented on the project website. The usage section starts with defining chains in JSON and then loading the file to create an engine instance, so plan for chain files to be versioned and tested like code.
Embedded and standalone are two modes of the same engine
RuleGo describes a dual mode. In embedded mode you add the engine to an existing application. In standalone mode it is deployed independently as middleware that provides rule engine and orchestration services. The repository has a server directory and example projects such as ui_api and web_api alongside the core packages.
Choosing between the two is a deployment decision with design consequences. Embedded keeps everything in one Go process and ties the rule engine's lifecycle to your service. Standalone separates it, which suits teams who want to change chains without touching the host application, but then your other systems talk to it over its endpoints. To add RuleGo to an existing Go module, use the module path declared in `go.mod`:
go get github.com/rulego/rulegoEndpoints bring data in, and components act on it
Data enters through endpoints, which the README says can be configured dynamically: HTTP, MQTT, TCP and UDP, Kafka and Schedule endpoints. From there, built-in components cover Message Type Switch, JavaScript Switch, JavaScript Filter, JavaScript Transformer, HTTP Push, MQTT Push, Send Email and Log Recording, and more can be added through extension interfaces. Dynamic loading of components and extensions is supported through Go plugins.
The example directory is the clearest map of what is covered. It includes call_rest_service, db_client, delay_node, functions_node, group_filter_node, hot_loading, http_endpoint, js_transform, mqtt_client, mqtt_endpoint_example, msg_type_switch, net_node, ssh_node and temperature_alarm. The pattern is the same each time: an endpoint receives something, a chain filters or transforms it, and a node pushes it somewhere. Each external system still has to exist; the engine routes data, it does not replace your broker or database.
The lightweight claim means no middleware of its own, not no dependencies
The first listed feature is lightweight: no external middleware dependencies, efficient data processing and linkage on low-cost devices, suitable for IoT edge computing. go.mod requires Go 1.20 and lists goja, expr, the Paho MQTT client, the MySQL and PostgreSQL drivers, gorilla websocket, httprouter and robfig cron among its direct dependencies.
So the engine runs without a message bus or database of its own, but it still links client libraries for the protocols it speaks. For an edge device, that is a Go binary with no separate service to run. For a server, it means upgrades to those libraries come with RuleGo releases. The README names Go's coroutine pools and object pools as part of its high performance, and it gives no throughput or latency figures, so measure on the hardware you target.
Context isolation and AOP address the problems of running many chains at once
Two features target concurrency and cross-cutting behaviour. The context isolation mechanism is described as reliable, so data does not stream between messages under high concurrency. The AOP mechanism lets you add behaviour around the execution of a rule chain or a node, or replace the original logic of a chain or node, without modifying it.
In practice AOP is where audit logging, metrics or error handling would go, and replacement lets you stub a node while testing. Both are claims in the README and it gives no test results for either, so run your own concurrency test with messages that carry distinguishable data before trusting isolation under load. The hot_loading and plugin examples show the dynamic side of the same design.
The use-case list is broad, so RuleGo is general glue and the real work is custom components
RuleGo names edge computing, IoT, data distribution, application integration, centralised processing of heterogeneous data, highly customised business, complex orchestration, microservice orchestration, decoupling of business code such as points calculation and risk control, automation such as CI/CD, and low-code or iPaaS and ETL systems. It even mentions LangFlow-like systems that interface with large models to extract intent and then trigger chains.
That range tells you it is general glue, not a specialised product in any one of them. The IoT example is a temperature alarm: device data is collected, a rule chain judges it and triggers actions such as email or linking with other devices. For anything beyond that, expect to write custom components. It describes itself as a component orchestration rule engine, so judge it on chains and components rather than on a rule syntax of its own.
v1.0.0 landed on 2026-10-19 after 0.36 and 0.37, and a demo link uses a bare IP
The recent releases are v1.0.0 on 2026-10-19, v0.37.0 on 2026-08-03 and v0.36.0 on 2026-05-29. The last push was on 2026-10-30 and the repository is not archived. A first 1.0 tag two weeks old means you should read what changed from 0.37 before upgrading a chain definition.
The README's more running modes link points at an IP address with port 9090 over plain HTTP, not at the project domain. Treat that as a demo UI to look at, and do not enter credentials or production data into it. The documentation, the rule chain DSL reference and the contribution guide are on rulego.cc and in CONTRIBUTING.md.
Editorial conclusion
RuleGo suits Go teams whose business flow changes often or whose service has to bridge many protocols such as HTTP, MQTT and Kafka, and who accept describing that flow as JSON rule chains. It is not the right pick if you want a decision-table rule engine, if your stack is not Go, or if you need published throughput figures. Before adopting it, check how v1.0.0 differs from the 0.x line you may have read about and prototype one real chain with its endpoint and its failure path.
Frequently asked questions
Can you give an example of a rule engine?
RuleGo is one: a Go rule engine where JSON rule chains of components filter, transform and distribute data. The repository's temperature_alarm example and the IoT use case show device data being judged by a chain that triggers alarms or emails.
Does RuleGo run embedded or standalone?
Both. It can be embedded into an existing application, or deployed independently as middleware that provides rule engine and orchestration services.
How do I install RuleGo?
From your Go module, run `go get github.com/rulego/rulego`. RuleGo’s `go.mod` declares Go 1.20.
Official sources
Was this useful?