Better Data Logo

The Loop Engine

Enterprise AI fails in chaos. It succeeds in structure.

The Loop Engine turns operational processes into bounded state machines - finite, observable, and improvable. Every human action and AI decision runs inside a loop. Every loop closes with evidence.

Finite states

No freeform AI improvisation

Complete trace

Every transition recorded

Apache 2.0

Core primitives - open source

Outcome-aligned

Billing tracks loop completions

Systems of record don't learn. Control systems do.

Traditional enterprise software

  • Stores data. Does not learn from it.
  • AI guesses what to do next in unbounded environments.
  • Outcomes are logged. Decisions are not.
  • No actor attribution - who did what is reconstructed later, if at all.
  • Compliance is a separate audit step.

The Loop Engine

  • Every completed loop generates training data automatically.
  • AI reasons over finite states - what is allowed, what comes next.
  • Decision evidence is recorded at transition time, not reconstructed.
  • Every actor - human or AI - leaves the same evidence trail.
  • Compliance is a byproduct of operation, not a separate workflow.

The Loop Engine is not a workflow tool. It is a control layer.

EVENT STREAM
SIGNAL ENGINE
LOOP ENGINE
DECISION (human or AI)
ACTION
OUTCOME
LEARNING

The Loop Engine is the control layer. It does not replace your ERP or CRM. It makes them improvable.

LOOP TYPE 01

Self-Learning Loops

Each completed loop produces a structured dataset: transition history, decision evidence, actor attribution, and outcome metrics. That dataset becomes the training signal for the next iteration - without any data pipeline or ETL step.

Loop: scm.replenishment
LOW_STOCK_SIGNAL
↓ [system:demand-signal]
REPLENISHMENT_RECOMMENDED
↓ [system:replenishment-engine]
PO_CREATED
↓ [drew.kim@lumebonde.co - human approval]
PO_RECEIVED
↓ [system:fulfillment]
STOCK_STABILIZED - CLOSED
Outcome logged:
demand_forecast: 200 units
actual_demand: 260 units ← learning signal
supplier_lead_time: 12 days
actual_lead_time: 16 days ← learning signal
stockout_occurred: true

The next loop adjusts supplier lead time estimates automatically.

Learning signal table

AttributePredictedActualΔ
Demand200260+60
Lead time12d16d+4d
Stockout riskLowHighMiss
Loop: scm.procurement
Aggregate: PO-2026-0012
Transitions:
OPEN → PO_CONFIRMED 12s [drew.kim@lumebonde.co]
PO_CONFIRMED → RECEIPT_SCHEDULED 4m [system:replenishment]
RECEIPT_SCHEDULED→ RECEIVED 3d [warehouse:dc-east]
RECEIVED → CLOSED 2m [system:fulfillment]
Correlation: corr_abc123
Every actor - human or AI - leaves the same evidence trail.

LOOP TYPE 02

Fast Feedback Loops

The faster a loop closes, the faster the system improves. Every state transition emits a structured event - actor, timestamp, evidence, outcome - creating a continuous feedback signal that AI can act on immediately.

scm.procurement - Last 30 days

Avg close time: 3.2 days

Exception rate: 4.1%

AI-acted transitions: 67%

Human-approved: 33%

OPEN
IN_PROGRESS
CLOSED
ERROR

AI doesn't wait for a nightly batch job. It sees the result of every action as it happens.

LOOP TYPE 03

Signal Loops

Raw events are noise. Signal loops extract structured, high-confidence alerts from the event stream and use them to trigger downstream loops - without manual monitoring.

Signal pipeline:
Raw events:
sale_recorded SKU: BRS-001 qty: 847 location: DC-East
shipment_delayed carrier: FedEx ETA: +4 days
stock_movement BRS-001 DC-East on_hand: 12 units
↓ feature extraction
Signal produced:
type: DEMAND_SPIKE
sku: BRS-001
location: DC-East
confidence: 0.84
on_hand: 12 units (below reorder point: 50)
↓ loop triggered
scm.replenishment: OPEN
aggregate: REPLEN-2026-0041

Signal loops also learn - tracking their own accuracy and adjusting confidence thresholds over time.

Live Signals

DEMAND_SPIKEBRS-001conf: 0.842 min ago
STOCKOUT_RISKBRS-003conf: 0.9114 min ago
THRESHOLD_CLEARCRM-110conf: 0.771 hr ago

Signals trigger loops. Loops close with evidence.

A control layer for any enterprise system

The Loop Engine primitives - state machine runtime, event trace model, actor model, signal definition framework - are open source under Apache 2.0. The same pattern that makes SCM replenishment AI-safe applies to any bounded enterprise workflow.

CRM

Lead qualification and pipeline

crm.lead_qualification
crm.pipeline_progress
crm.customer_retention

AI improves lead scoring, outreach timing, and churn prediction. Same actor model. Same evidence trail.

ERP

Procurement, fulfillment, collections

erp.procurement
erp.order_fulfillment
erp.cash_collection

Supplier selection, payment timing, and logistics routing - each loop closes with measurable outcomes.

SUPPORT

Ticket resolution and escalation

support.ticket_resolution
support.escalation

Routing efficiency, escalation triggers, and knowledge base gaps - all visible in transition history.

The primitives are open. The SCM implementation is where Better Data runs deepest.

Why AI fails without loops

AI WeaknessWithout the Loop EngineWith the Loop Engine
Unbounded decisionsAI guesses what to do nextFinite state machine - only valid transitions allowed
No training dataOperational data sits in a database, unusedEvery closed loop produces a structured learning signal
No accountabilityWho decided what is reconstructed laterActor model records every human and AI action at transition time
Unclear outcomesSuccess is measured manually, inconsistentlyLoop completion is a measurable, billable outcome
Compliance burdenSeparate audit workflow requiredAudit trail is a byproduct of operation

Every actor leaves the same evidence

The Loop Engine does not distinguish between human operators and AI agents at the infrastructure level. Both are actors. Both produce transition evidence. Both are auditable.

Loop ID: scm.procurement
Aggregate: PO-2026-0012
Current state: RECEIPT_SCHEDULED
Transition history:
OPEN → PO_CONFIRMED
actor: drew.kim@lumebonde.co
actor_type: human
timestamp: 2026-02-14T09:14:22Z
evidence: { approved: true, method: "3-way-match" }
PO_CONFIRMED → RECEIPT_SCHEDULED
actor: system:replenishment
actor_type: automation
timestamp: 2026-02-14T09:18:45Z
evidence: { warehouse: "DC-East", eta: "2026-02-17" }
RECEIPT_SCHEDULED → [pending]
actor: agent:commerce-gateway/claude
actor_type: ai-agent
recommended: RECEIVE
evidence: { shipment_scan: "confirmed", quantity_match: true }
status: awaiting human approval
Correlation: corr_abc123

Human, automation, AI agent - one evidence model.

AI agents connect to the Loop Engine via the Commerce Gateway (MCP). They can query loop state, surface exceptions, and recommend next actions within loop guardrails.

Explore Commerce Gateway

See it in action

Explore how loop-native operations improve throughput, resilience, and compliance.

Book a demo