Hybrid Symbolic + AI Event Router
Routes incoming business events in <1ms via exact rules, or safely uses a read-only AI classifier for messy ones.
Every ambiguous webhook either drops on the floor or runs an unconstrained AI prompt directly on the event bus.
Clear events route in <1ms; messy events are safely classified into your closed route menu with full audit logs.
What It Does (In Plain English)
When your company receives thousands of mixed events (support emails, billing alerts, ops pings), simple rules handle the clear ones instantly (<1ms). For ambiguous events, Event Router queues a separate read-only AI check task restricted strictly to your pre-approved route list — and escalates low-confidence cases to a human.
Real-World Example
- 1A
billing.alertevent matches an exact rule → routed to thebilling-triagequeue in <1ms. - 2An ambiguous customer escalation arrives → Event Router queues a tainted, read-only AI classification task.
- 3The AI picks
refund-disputewith 0.91 confidence from your allowed list. - 4Event Router dispatches a clean task using your operator prompt template (or alerts a human if confidence < 0.6).
When Should You Turn It On?
Enterprise Edition. Add when routing high-volume mixed events across multiple teams or worker roles.
Safety level note: Level 1 · Review — Read-only. Can inspect and answer, never changes outside systems.
How to Add It (workspace.yaml)
# Enterprise Edition (@neusym/kit-event-router)
kits:
- "@neusym/kit-event-router@0.1.0"
kitConfigs:
event-router:
minConfidence: 0.7
lowConfidenceAction: escalate_humanKits It Works With
Technical Details & Configuration Options (10 settings)
| Package | @neusym/kit-event-router |
|---|---|
| Provides Ports | event-router@1 |
| Requires Ports | tasks@1 |
| Optional Ports | notifier@1scheduler@1secrets@1 |
| Publishes Events | route.decidedroute.ignoredroute.escalated |
| Owned DB Collections | event_routesrouting_decisions |
Configuration Options (kitConfigs.event-router)
| Setting | Type | Default | Description |
|---|---|---|---|
routerWorkerRole | string | — | Optional workerRole assigned to queued read-only LLM semantic check tasks. |
routerAgentDefId | string | — | Optional pinned agentDefId assigned to queued read-only LLM semantic check tasks. |
minConfidence | number | 0.6 | Minimum confidence (0..1) required for an LLM semantic check to route automatically; lower confidence follows lowConfidenceAction. |
lowConfidenceAction | string | "escalate_human" | Action taken when an LLM semantic check chooses route with confidence below minConfidence. |
failurePolicy | string | "escalate_human" | Action taken when a queued LLM semantic check task fails, halts, or produces an invalid verdict. |
semanticCheckTimeoutMs | integer | 3600000 | How long (ms) a queued LLM semantic check may stay unfinished before its decision settles under failurePolicy with reasonCode ROUTER_TASK_TIMEOUT and the check task is halted (0: never). With scheduler@1 bound a timer settles it on time; without one, it settles when the tenant's next semantic check is queued. |
maxCandidateRoutes | integer | 16 | Maximum candidate routes passed to a single LLM semantic check task. |
maxPayloadPreviewChars | integer | 4096 | Maximum serialized characters of the event payload attached to the tainted semantic check context item. |
notifyOnEscalate | boolean | true | When true and notifier@1 is bound, escalations dispatch a structured operator notice. |
routes | array | [] | Static declarative route catalog loaded at boot (complemented by tenant-registered routes via event-router@1). |