Let's integrate AI Agents in Event-Sourced Systems — Divakar Kumar, FlyersSoft
Jul 30, 2026 · 21:37
Divakar Kumar explains how to layer AI agents onto event-sourced systems to resolve ambiguous fraud cases that rule-based engines and ML models cannot score. In his architecture, bounded contexts (transaction, device, account) feed events through change feeds into a semantic layer that agents read asynchronously via a message broker in a saga-style loop. A risk analyzer agent and a behavior analyzer agent fan out, each using tools to query the semantic layer, then a third verdict agent synthesizes their outputs to decide whether to approve or block a transaction. Kumar emphasizes keeping memory short and guarding against infinite loops to meet sub-500ms SLAs. The key takeaway: event sourcing already carries the state and history an agent needs, so the cleanest way to add judgment is to layer agents onto the events you already emit.