AI Engineer

Let's integrate AI Agents in Event-Sourced Systems — Divakar Kumar, FlyersSoft

Published 2026-07-30 · Duration 21:37

Summary

The presentation outlines an advanced architectural pattern for integrating AI agents into existing enterprise systems, specifically targeting real-time fraud detection. Instead of replacing established Rule-Based Engines or ML models, the approach layers agentic intelligence to resolve 'gray zone' transactions—cases where current deterministic systems lack sufficient context. The architecture leverages Event Sourcing and Domain-Driven Design (DDD) principles by building a centralized semantic layer that aggregates data from multiple bounded contexts (e.g., Transaction, Device, Account). Agents then consume this enriched context via an orchestration layer in a saga pattern to reach a final verdict.

Download summary

Key takeaways

  1. AI Agents Augment, Not Replace, Existing Systems

    The primary value of AI agents is not replacing existing systems (like rule-based or ML engines) but rather adding an agentic layer to handle ambiguous cases—the 'gray zone' where current models lack necessary context. The goal is to enhance business workflows using the state and history already captured by event sourcing.

  2. Context Aggregation via Semantic Layer 17:37

    To provide sufficient context for agents, data from disparate bounded contexts (Transaction, Device, Account, Payment) must be aggregated into a semantic layer or materialized view. This is achieved by propagating domain events using Change Data Capture (CDC) mechanisms or message brokers.

  3. Saga Orchestration and Agentic Decision Making

    The system uses an orchestration layer to manage the process. This layer employs a fan-out pattern, sending events simultaneously to multiple specialized agents (e.g., Risk Analyzer Agent, Behavior Analyzer Agent). A final Verdict Agent then analyzes these responses to reach a consensus event.

Technical details

  • Event Sourcing and Data Flow 824s

    The system follows Event Sourcing methodology, where commands are recorded as immutable events (business facts) in an event store (e.g., Cosmos DB). Changes are propagated using Change Feeds or message brokers to populate multiple read models and the central semantic layer.

  • Domain-Driven Design (DDD) Bounded Contexts 553s

    The architecture is built around distinct bounded contexts: Transaction, Account, Device, Payment. These contexts maintain data isolation and communicate asynchronously via a message broker, necessitating an orchestrator layer for cross-context data sharing.

  • AI Agent Components 1057s

    Agents are composed of three main components: Language Models (can be SLMs or open-source), Tools (APIs/methods interacting with the application layer), and Memory. For low latency, an in-memory short memory is used.

  • Agentic Workflow Pattern

    The process involves the orchestration layer consuming data from the semantic layer via tools. Multiple agents run concurrently (fan-out pattern) to generate specialized conclusions, which are then synthesized by a final verdict agent before being emitted as a new event.

Mentioned resources

  • Divakar Kumar (Speaker/Expert)

Channel & topics

Watch on YouTube · Back to latest

This independent, AI-assisted summary is provided for commentary and informational purposes. It may contain errors or omit important context. Please watch the original video for the creator's complete presentation. Video, thumbnail, and related copyrights belong to their respective owners.