---
schema: 1
type: video
title: 'Let''s integrate AI Agents in Event-Sourced Systems — Divakar Kumar, FlyersSoft'
description: >-
  A card gets declined and no one, including the customer, can say exactly why.
  That gray zone is where Divakar Kumar points his agents. In a payments and
  fraud system, a rule based engine and an ML model already score most
  transactions cleanly; the hard cases are the ambiguous ones that neither can
  resolve. His approach adds an agentic layer on top of an existing event
  sourced architecture rather than replacing it, so the bounded contexts already
  in the system, transaction, device, and account, become the context the agents
  reason over. Events flow through change feeds into projections and a semantic
  layer that the agents read, communicating asynchronously through a message
  broker in a saga style loop. A risk analyzer agent, a second agent that
  reaches a verdict, and a third work the case while guarding against infinite
  loops and keeping memory short, all runnable serverless. The takeaway is
  architectural: event sourcing already carries the state and history an agent
  needs, so the cleanest way to add judgment to a production system is to layer
  agents onto the events you are already emitting. Speaker info: -
  https://www.linkedin.com/in/divakar-kumar/ - https://iamdivakarkumar.com
  Timestamps: 0:00 - Introduction: adding agents to an existing system 1:20 - A
  declined transaction you can't explain 3:04 - Where rule based and ML systems
  fall short 5:40 - Handling the gray zone with agents 5:53 - Bounded contexts:
  transaction, device, account 8:24 - Event sourcing and change feeds 10:57 -
  Building the semantic layer 13:16 - Avoiding infinite loops 14:07 - The risk
  analyzer and verdict agents 15:24 - The saga orchestration loop 19:00 -
  Putting the architecture together
canonical: >-
  https://liquidgold.cc/channel/aidotengineer/explore/video/let-s-integrate-ai-agents-in-event-sourced-systems-a8d8e7740622
markdown: >-
  https://liquidgold.cc/channel/aidotengineer/video/let-s-integrate-ai-agents-in-event-sourced-systems-a8d8e7740622.md
llms: null
parent: 'https://liquidgold.cc/channel/aidotengineer.md'
channel: aidotengineer
updated: '2026-10-24T06:29:41.826Z'
language: null
children: []
videoId: o6U_2vd967Y
durationSeconds: 1297
publishedAt: '2026-07-30T00:00:06.000Z'
searchChunks:
  - ordinal: 0
    text: null
    startSeconds: 23
    endSeconds: 90
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=23'
    heldReason: rights
  - ordinal: 1
    text: null
    startSeconds: 198
    endSeconds: 349
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=198'
    heldReason: rights
  - ordinal: 2
    text: null
    startSeconds: 100
    endSeconds: 188
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=100'
    heldReason: rights
  - ordinal: 3
    text: null
    startSeconds: 198
    endSeconds: 349
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=198'
    heldReason: rights
  - ordinal: 4
    text: null
    startSeconds: 371
    endSeconds: 512
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=371'
    heldReason: rights
  - ordinal: 5
    text: null
    startSeconds: 371
    endSeconds: 512
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=371'
    heldReason: rights
  - ordinal: 6
    text: null
    startSeconds: 523
    endSeconds: 658
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=523'
    heldReason: rights
  - ordinal: 7
    text: null
    startSeconds: 523
    endSeconds: 658
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=523'
    heldReason: rights
  - ordinal: 8
    text: null
    startSeconds: 658
    endSeconds: 670
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=658'
    heldReason: rights
  - ordinal: 9
    text: null
    startSeconds: 670
    endSeconds: 802
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=670'
    heldReason: rights
  - ordinal: 10
    text: null
    startSeconds: 802
    endSeconds: 814
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=802'
    heldReason: rights
  - ordinal: 11
    text: null
    startSeconds: 861
    endSeconds: 929
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=861'
    heldReason: rights
  - ordinal: 12
    text: null
    startSeconds: 861
    endSeconds: 929
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=861'
    heldReason: rights
  - ordinal: 13
    text: null
    startSeconds: 941
    endSeconds: 1144
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=941'
    heldReason: rights
  - ordinal: 14
    text: null
    startSeconds: 670
    endSeconds: 802
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=670'
    heldReason: rights
  - ordinal: 15
    text: null
    startSeconds: 941
    endSeconds: 1144
    watch: 'https://liquidgold.cc/watch/o6U_2vd967Y?t=941'
    heldReason: rights
---


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

A card gets declined and no one, including the customer, can say exactly why. That gray zone is where Divakar Kumar points his agents. In a payments and fraud system, a rule based engine and an ML model already score most transactions cleanly; the hard cases are the ambiguous ones that neither can resolve. His approach adds an agentic layer on top of an existing event sourced architecture rather than replacing it, so the bounded contexts already in the system, transaction, device, and account, become the context the agents reason over. Events flow through change feeds into projections and a semantic layer that the agents read, communicating asynchronously through a message broker in a saga style loop. A risk analyzer agent, a second agent that reaches a verdict, and a third work the case while guarding against infinite loops and keeping memory short, all runnable serverless. The takeaway is architectural: event sourcing already carries the state and history an agent needs, so the cleanest way to add judgment to a production system is to layer agents onto the events you are already emitting. Speaker info: - https://www.linkedin.com/in/divakar-kumar/ - https://iamdivakarkumar.com Timestamps: 0:00 - Introduction: adding agents to an existing system 1:20 - A declined transaction you can't explain 3:04 - Where rule based and ML systems fall short 5:40 - Handling the gray zone with agents 5:53 - Bounded contexts: transaction, device, account 8:24 - Event sourcing and change feeds 10:57 - Building the semantic layer 13:16 - Avoiding infinite loops 14:07 - The risk analyzer and verdict agents 15:24 - The saga orchestration loop 19:00 - Putting the architecture together

Canonical: https://liquidgold.cc/channel/aidotengineer/explore/video/let-s-integrate-ai-agents-in-event-sourced-systems-a8d8e7740622 · Channel: [AI Engineer](https://liquidgold.cc/channel/aidotengineer.md)

> Search chunk text is held until public-source provenance is verified.

## Document chunks

> Missing: no stored document chunks are available.
