Most fraud teams already detect well. Their bottleneck is investigation: an analyst opens eight to ten tools to work one alert, and the queue grows faster than people can clear it. We build an investigation agent that picks up each flagged transaction from a Redpanda topic, gathers the evidence through governed MCP tools, and writes a case file with every claim cited and a recommended action. The analyst decides. The agent never blocks a card or moves money on its own. Redpanda’s Agentic Data Plane supplies the controls that make this safe to run: an AI Gateway with spend caps, tool-level policy outside the model, on-behalf-of identity, and a complete trace of every run on an immutable topic that can be materialized to Iceberg. Below are the architecture, the topics, one alert worked end to end, the guardrails, what to measure, and a 30-day pilot plan.
The bottleneck is investigation, not detection
Walk the floor of most fraud operations teams and the scoring models are not the problem. Rules and machine-learning models flag suspicious card, ACH and instant-payment transactions within milliseconds. What happens next is slow, manual and expensive.
An analyst picks up the alert and starts gathering. Customer profile in one system. Account and transaction history in another. Device fingerprint and IP reputation in a third. Merchant risk profile, prior disputes and chargebacks, login history, recent changes to contact details, velocity across cards and accounts — each in its own screen. Only after all of that does the actual judgment begin: is this the customer, or is it fraud?
Three things follow from that workflow:
- Most of the analyst’s time goes to gathering, not deciding. The judgment call takes a minute; assembling the evidence takes much longer.
- Quality varies by person and by hour. A tired analyst at the end of a shift checks fewer sources than a fresh one at the start.
- False positives cost twice. Every legitimate transaction held for review is analyst time spent and a customer inconvenienced.
This is a good shape of problem for an AI agent. The gathering is repetitive and well defined, the sources are known, and the final decision can stay with a person who has the authority to make it.
The design principle: the agent prepares, the analyst decides. It assembles evidence and recommends; it does not act on accounts or money. That one rule keeps the regulatory, legal and customer-experience questions manageable from day one.
Why streaming plus a governed agent
Fraud is a race against time. An investigation that starts when the analyst opens the alert is already late; one that starts the moment the transaction is flagged can have the case file waiting before anyone looks. That makes the event stream the natural place to start the agent: the flagged transaction lands on a topic, and investigation begins immediately.
Streaming alone does not make an agent safe, though. Fraud data is some of the most sensitive data a financial institution holds, and an agent that can call tools is a new kind of actor in the environment. Before a risk or compliance team approves it, they will ask:
- Whose authority does the agent act under, and can it see more than the analyst could?
- Which tools can it call, and what stops it calling the wrong one?
- How much can it spend on model calls, and who notices if it loops?
- Can we reconstruct exactly what it saw, called and concluded, months later?
Redpanda’s Agentic Data Plane (ADP), launched in October 2025 and expanded in February 2026, is a governance layer built around exactly those questions: it connects AI agents and MCP servers to live enterprise data with identity, policy, cost control and observability in the path. That is why we use it as the control plane for this pattern on Redpanda.
Reference architecture
The architecture has five parts: the event path that starts an investigation, the agent itself, the two gateways it goes through, the tools behind them, and the topics where cases, decisions and traces land.
The event path
Scored transactions above the review threshold are published to fraud.flagged. In our pattern a small Redpanda Connect pipeline (or a lightweight consumer service) consumes that topic and invokes the agent with the transaction ID and alert context. We keep this hop deliberately thin: it handles ordering, retries and deduplication, and it is where back-pressure lives if alert volume spikes.
The agent
Agents in ADP are declarative: a system prompt that defines the role and constraints, a chosen model, and attached tools, with optional subagents for focused tasks. Teams that already have agent code can bring their own framework, such as LangChain or LlamaIndex, and run it as a self-managed agent that ADP registers and routes through its gateways. For a first fraud use case we start declarative; there is less code to review and the behavior lives in configuration that risk teams can read.
The two gateways
Every model call goes through the AI Gateway, a managed proxy for LLM APIs. Providers are configured once (OpenAI, Anthropic, Bedrock, Google AI or any OpenAI-compatible endpoint), Redpanda holds the upstream credentials, and the agent calls a Redpanda-hosted URL with the provider’s native SDK. Every tool call goes through the MCP Gateway to MCP servers that are either managed from a catalog or self-managed and fronted by Redpanda. Agents can only use MCP servers that are created or registered in ADP, so there is no side door.
The topics and data contracts
Four topics carry the workflow. Each has an owner, a schema and a retention policy agreed with the fraud and compliance teams before the pilot starts.
| Topic | Producer | Contents | Consumers |
|---|---|---|---|
fraud.flagged | Scoring service | Transaction ID, score, reason codes, rule hits | Trigger pipeline |
fraud.cases | Investigation agent | Case file: evidence with citations, risk summary, recommended action, confidence | Case management UI, analytics |
fraud.decisions | Analyst workflow | Decision, reason, whether the recommendation was accepted | Account actions, model training, evaluation |
| Traces topic | Agentic Data Plane | Prompts, responses, tool calls, token usage, timings | Audit, evaluation, replay |
The case file is the most important contract. It is what the analyst reads, what the decision references, and what an auditor will examine. We make every claim in it point to the tool call that produced it.
// fraud.cases — one case file per flagged transaction (illustrative) { "case_id": "c-7f3e9", "txn_id": "t-2210-88a1", "summary": "Card-not-present purchase from a new device in a new country, 40 minutes after a contact-email change.", "evidence": [ { "claim": "Device first seen today", "source": "device_ip_lookup", "call_id": "tc-04" }, { "claim": "Email changed 40 min before txn", "source": "customer_history", "call_id": "tc-02" }, { "claim": "No prior disputes on account", "source": "dispute_history", "call_id": "tc-06" } ], "recommendation": "hold_and_contact_customer", "confidence": "high", "requires_approval": true, "trace_id": "<OTel trace id>" }
The tools the agent gets, and the ones it doesn’t
Tool design is where most of the safety comes from. The agent gets read-only tools, each narrow, each returning exactly the fields the investigation needs.
| Tool | Returns | Access |
|---|---|---|
customer_history | Tenure, recent profile changes, contact-detail changes, segment | Read-only, masked PII |
account_transactions | Recent transactions on the account, summarized | Read-only, bounded window |
device_ip_lookup | Device first-seen date, IP reputation, geolocation | Read-only |
merchant_profile | Merchant category, risk tier, recent fraud rate band | Read-only |
dispute_history | Prior disputes and chargebacks on the customer | Read-only |
velocity_aggregates | Counts and amounts across cards, accounts and devices over recent windows | Read-only |
Most of these are thin wrappers over services the fraud team already has. Redpanda Connect can expose pipelines and processors as MCP tools defined in YAML, served with rpk connect mcp-server; each tool starts, executes and stops, with no polling between calls. That makes it straightforward to turn an existing lookup — an API call, a database query, a cache read — into a governed tool without writing a new service.
What the agent does not get: no tool that blocks a card, freezes an account, reverses a payment, changes a limit or contacts a customer. Those actions exist, but they sit behind the analyst’s decision in the case management workflow. If the agent cannot call the tool, no prompt injection, model error or bad day can make it happen.
One alert, step by step
Here is a single flagged transaction from topic to decision.
The transaction is flagged
A card-not-present purchase scores above the review threshold. The scoring service publishes it to fraud.flagged with its reason codes.
The agent is invoked
The trigger pipeline deduplicates on transaction ID and invokes the agent with the alert context. The invocation carries the identity of the fraud-operations service user the work is done on behalf of.
It plans the investigation
The system prompt lists the evidence required for each alert type. For this reason code — new device, card not present — it needs customer history, device and IP, merchant, velocity and disputes.
It gathers evidence
Five read-only tool calls through the MCP Gateway. Each response is small and structured; personal data arrives already masked to what the investigation needs.
It writes the case file
The model drafts a summary, the evidence list with a citation for each claim, a recommended action from a fixed set, and a confidence level. Anything it cannot support with a tool result is left out, not guessed.
The analyst decides
The case appears in the queue with the evidence already assembled. The analyst checks the citations they care about, accepts or overrides the recommendation, and the decision is written to fraud.decisions — including whether the agent’s recommendation was accepted, which becomes the most valuable evaluation signal you have.
The system prompt does most of the shaping. An excerpt of the kind we write:
# Investigation agent — system prompt excerpt (illustrative)
You prepare fraud case files for human analysts. You never take action on
accounts, cards or payments, and you never contact customers.
For each alert: gather the evidence listed for its reason code, using only
the tools provided. Every claim in the case file must cite the tool call it
came from. If a tool fails or returns nothing, say so; do not infer.
Recommend exactly one action from: release, hold_and_contact_customer,
escalate_to_senior, decline_recommended. Mark requires_approval=true for
any action other than release.
Guardrails
Each control maps to a question the risk team will ask. None of them depend on the model behaving well.
| Guardrail | How it works | Question it answers |
|---|---|---|
| On-behalf-of identity | ADP uses OIDC with an on-behalf-of model: each action is authorized as the user who invoked the agent | Can the agent see more than the person could? |
| Registered tools only | Agents can use only MCP servers created or registered in ADP | Can it reach a system nobody approved? |
| Tool-level policy | Deterministic policies enforced at the MCP Gateway, outside the model | What stops a prompt injection calling the wrong tool? |
| Spend caps and budgets | The AI Gateway tracks usage by provider, model and user, with spend caps and per-agent budgets | What if it loops, or alert volume triples? |
| Read-only tools | No action tools in the agent’s toolset | Can it block a card or move money? |
| Human approval | Every non-release recommendation requires an analyst decision | Who is accountable for the outcome? |
| PII minimization | Tools return masked fields; full identifiers stay in source systems | What personal data reaches the model? |
Audit and replay
Fraud decisions get challenged: by customers, by internal audit, by regulators. For an agent-assisted decision, “the model said so” is not an answer. You need to show exactly what the agent saw, which tools it called, what came back and what it concluded.
ADP gives two levels of record. Transcripts are read-only execution logs of each run: prompts, responses, tool calls and token usage. Traces are emitted as OpenTelemetry data to an immutable Redpanda topic with 100% sampling, and execution logs can be materialized to Iceberg tables for long-term retention. Redpanda positions these records as support for frameworks such as ISO 42001 and the EU AI Act; for a fraud team, the practical value is simpler:
- Every case file links to a trace. The
trace_idin the case points to the full record of how it was produced. - Disputes become look-ups. When a customer challenges a hold, the team can show the evidence that existed at the time, not a reconstruction.
- Changes can be replayed. Before a new prompt or model goes live, run it against last month’s alerts and compare its case files and recommendations with the decisions analysts actually made.
Measuring it
We agree the measures with the fraud team before the pilot starts, and we measure the same things for a control group of alerts worked without the agent. The numbers are yours to discover; these are the ones that matter.
| Measure | What it tells you |
|---|---|
| Time from flag to decision | Whether customers and losses benefit, not just analysts |
| Analyst touches per case | How many tools and screens the analyst still opens |
| Recommendation acceptance rate | How often the agent’s recommendation matches the analyst’s decision, by alert type |
| False-positive release time | How quickly legitimate customers get their transaction back |
| Evidence completeness | Share of case files with every required source present and cited |
| Cost per case | Model and tool cost per investigation, from AI Gateway usage data |
| Overrides with reasons | Where the agent is wrong, and why — the input to the next prompt revision |
Watch acceptance rate by alert type, not overall. An agent that is excellent on account-takeover alerts and weak on merchant-fraud alerts looks average in aggregate. Expand alert types one at a time, as each earns trust.
The same pattern on Confluent or Apache Kafka
The pattern — event-triggered investigation, read-only governed tools, human decision, complete trace — is not tied to one platform. What changes is how much of the governance layer you get from the platform and how much you build.
| Platform | Agent and tool layer | What you build yourself |
|---|---|---|
| Redpanda | Agentic Data Plane: AI Gateway, MCP Gateway, declarative or self-managed agents, transcripts and traces | The trigger pipeline, tools over your systems, case UI |
| Confluent Cloud | Streaming Agents and the Real-Time Context Engine, announced October 2025; availability varies by feature, so verify the current status before you design on it | Depends on which features are available in your region and plan |
| Apache Kafka + Flink | Your own MCP server layer, LLM gateway and tracing | Identity propagation, tool policy, spend control and audit trail — all of it |
Our Kafka POD has built streaming platforms on all three. The choice usually follows the platform you already run; the governance controls in the guardrails table are non-negotiable on any of them.
The failure modes we plan for
1. Giving the agent action tools “for later”. A block-card tool attached but “not used yet” is a tool the model can call. Keep action tools out of the agent’s toolset entirely.
2. Uncited case files. A fluent summary without citations trains analysts to trust prose instead of evidence. Reject any case file where a claim has no source.
3. Tools that return too much. A customer tool that returns the full profile sends unnecessary personal data to the model and slows every call. Return only the fields the investigation uses.
4. No back-pressure on alert spikes. A fraud attack produces a burst of alerts exactly when the team is busiest. Without spend caps and a bounded trigger pipeline, cost and latency spike together.
5. Measuring only speed. Faster wrong decisions are worse than slow right ones. Track acceptance, overrides and evidence completeness alongside time-to-decision.
6. Changing prompts without replay. A prompt edit that improves one alert type can quietly degrade another. Replay a representative month of alerts before every change.
A 30-day pilot
Week 1 — Scope and contracts
Choose one or two alert types, agree the evidence list for each, define the four topics and the case-file schema, and agree the measures and the control group with the fraud and risk teams.
Week 2 — Tools and gateways
Wrap existing lookups as read-only MCP tools, register them in ADP, configure the AI Gateway with budgets, and set up identity and tool policies.
Week 3 — Shadow mode
The agent produces case files for live alerts, but analysts work as usual and do not see them. Compare the agent’s recommendations with their decisions, and tune the prompt using replay.
Week 4 — Assisted mode
Case files appear in the analyst queue for the pilot alert types. Measure against the control group and present the results, with the traces, to risk and compliance.
Readiness checklist
| Before the pilot | Ready when |
|---|---|
| Alert scope | One or two alert types chosen, with a written evidence list for each |
| Topics | Flagged, cases, decisions and traces topics have owners, schemas and retention |
| Tools | Every tool is read-only, returns minimal fields and has a policy at the gateway |
| Identity | The on-behalf-of user for agent work is defined and its access reviewed |
| Cost | Per-agent budget and spend cap set in the AI Gateway |
| Human decision | Case management shows the case file and records accept or override, with a reason |
| Audit | Case files carry trace IDs; traces are retained and queryable |
| Measures | Baseline and control group agreed before the agent goes live |
The bottom line
Fraud teams do not need an agent that decides. They need one that does the gathering — consistently, immediately and with every claim cited — so that analysts spend their time on judgment. Started from the event stream, limited to read-only tools, and governed by identity, tool policy, spend caps and a complete trace, that agent is something a risk committee can approve.
Redpanda’s Agentic Data Plane supplies most of that governance out of the box; the work that remains is the part specific to your institution: the evidence lists, the tools over your systems, the case-file contract and the measures. That is the part our Kafka POD builds with your fraud team, in a pilot sized to prove the value on one alert type before you scale it to the rest.