Skip to content
Sign up
Architecture & Investigation GuideUpdated for Iteration 2

Securing the Transaction Network: The ML Model, the Agent Pass, and the Graph

Start from the bank’s side of the counter. A machine learning model scores every transfer; a bounded LLM agent adds a second pass over flagged alerts; and every claim the agent makes has to be backed by graph evidence retrieved from FalkorDB.

TA
Tripwire Intelligence TeamCore
October 2026·14 min read

1. The Bank and the Money-Flow Network

Start from the bank’s side of the counter. You operate a transactional network that clears hundreds of thousands of transfers, and you already run a machine learning model that scores every one of them. The open question is no longer whether the model can flag suspicious activity. It is what happens after an alert fires: how much of the surrounding network a reviewer can actually see, and how far the evidence behind a decision can be trusted.

New engineers tend to arrive with one straightforward rule: “Why can’t we just write an SQL query that flags transactions greater than $10,000?” Sophisticated bad actors anticipate exactly that query. Real-world money laundering rarely takes the form of a single million-dollar wire from an illicit entity into a luxury asset account. Illicit syndicates fracture capital across dozens of intermediary conduit accounts, stagger timestamps across banking holidays, and calibrate individual amounts to sit just beneath regulatory thresholds.

The Three Classical Stages of Money Laundering

Placement: Injecting illegitimate cash into legitimate financial institutions (e.g., small cash deposits across multiple automated teller machines).

Layering: Concealing the audit trail through an intricate web of transfers, cross-border wires, and shell companies.

Integration: Withdrawing the cleaned funds through legitimate commerce, commercial invoices, or real estate purchases.

Tripwire is organized around that reality as a layered system, not a single oracle:

  • Layer one, the model: a gradient-boosted model scores every replayed transaction, and deterministic policy routes each score to a simulated block, the review queue, or straight-through processing.
  • Layer two, the agent pass: a bounded LLM agent picks up flagged reviews and reads the surrounding activity in context, instead of guessing from the aggregates the model was trained to carry.
  • The graph underneath: accounts and transfers live in FalkorDB as first-class nodes, so the agent’s context is retrieved evidence rather than model memory.

This guide follows that layered path in order: what the model can and cannot do (section 2), what changes when an agent pass is added on top (section 3), and how the agent reads the transaction graph through bounded tools (section 4). The remaining sections cover the AML patterns the graph exposes, the full pipeline, the analyst workbench, and further reading.

2. Layer One: The Model That Scores the Stream

The first layer is deliberately boring technology, because it has to run across the whole stream. Tripwire pairs graph-derived features with a high-performance gradient boosting detection engine. During the model selection tournament (recorded in the Iteration 2 benchmarks), three candidate architectures were evaluated against the baseline:

Model CandidateFeature SetTest APHard Bulk APRecall @ Budget
Baseline (Iter 1)Simple tabular counts0.1580.15021.4%
Candidate C3Tabular + velocity windows0.2410.15021.4%
Candidate C2Graph degree + ratios0.7330.57447.5%
Champion C1Full Vectorized Graph Features0.7520.60047.7%
Why Hard Bulk AP Matters

Standard test splits often include easy, high-value transfers. Tripwire evaluates models on the stringent Hard Bulk September 9–10 split, isolating structured, multi-account syndicate activity. Champion C1 maintains an outstanding 0.600 Average Precision on this difficult slice.

The Three Deterministic Routes

Scores produced by the Champion model are mapped into three operational lanes:

1. Blocked by Rule

Score >= 0.999. Immediate simulated containment. Automated hold on funds. Cannot be reversed by LLM agents.

2. Flagged for Review

Score >= Review Threshold (0.475 - 0.700). Primary operational queue (1,585 alerts). Dispatched to compliance investigators.

3. Standard Path

Score < Threshold. Standard straight-through processing. Preserved in replay audit log for historical baseline reference.

Score In, Policy Out
The model and any LLM output are scores or proposals. Only deterministic policy owns the allow, review, and simulated block decisions: a score at or above the block threshold is held regardless of what a later agent concludes, and no model output moves money on its own.

One limitation of this layer is structural, not a tuning problem. Every feature the model consumes was designed in advance, and many of them are aggregates: counts, velocities, ratios, balances. That compresses a sequence of related transfers into a handful of numbers, and a pattern that only exists in the shape of the activity, such as a fan-out ring or a pass-through chain, survives only as a blur. The model can rank the stream; it cannot follow a funds path, and it cannot explain itself to a reviewer. That gap is where the second layer comes in.

3. Layer Two: The Agent Pass on Flagged Reviews

To increase security, the bank adds a second pass. Instead of asking one model to carry the whole decision, Tripwire runs an LLM agent downstream of the detector, over the transactions the model already flagged. The agent’s job is narrow and explicit: look at the alert in the context of the surrounding network, and say whether the evidence supports escalation.

The pass is opt-in per investigation. With the agent disabled, a request returns the deterministic report: fast, free, and evidence-bound. With use_llm enabled and a provider configured, the same evidence set feeds a Gemini tool-calling agent. It selects among the approved graph tools, drafts a hypothesis with a risk level and reasoning, and the draft then has to survive a deterministic verifier. The provider is allowed to fail; the review is not.

The Four Rules That Keep the Pass Bounded

Route selectively:

The agent is invoked only for flagged reviews that opt in. The bulk of the stream keeps the speed and low cost of the deterministic path, so spending on context follows attention, not volume.

Tools, not database access:

The model never writes Cypher and never touches the raw database. It asks through typed, read-only tools over the Model Context Protocol: trace_funds, inspect_counterparties, and detect_flow_patterns. Arguments are validated against their ranges before any database call, and hops, windows, and row limits are capped.

A reviewer, not an actor:

The model never sets the risk score, the decision, or the recommendation; the recommendation is fixed to human review by code. A rule-based block cannot be reversed by the agent. Case proposals pass a separate deterministic gate and can only write to the local case store.

Bounded, observable, fallible:

Tool calls, model rounds, and wall time are bounded by configuration, and every executed statement, parameter set, row count, and duration lands in the tool trace. Provider errors, timeouts, invalid output, and failed verification all resolve to the deterministic report, with the reason recorded instead of an exception shown.

What reaches the analyst is only what survived verification. A verified draft reads like a review, not a lecture: a risk level from 1 to 5, a hypothesis, supporting and counter-evidence transaction IDs, and one to six reasoning points, each tied to the evidence IDs that back it. If any cited ID, amount, currency, timestamp, or path is not in the records the tools actually returned, the draft is rejected and the deterministic report stands in its place.

Field note: the same shape of system at Coinbase

Coinbase’s Onramp team layered an LLM risk agent onto their existing ML model and rules, downstream of those checks: the agent can block a transaction that would otherwise be allowed, but it cannot override an upstream block. In an online experiment, the agent-enabled flow recorded 30% fewer fraudulent transactions and 22% less fraud value than the existing stack alone. Their write-up, How Coinbase Built, Evaluated, and Post-Trained a Fraud Agent, is the closest public account of the same design decisions, and it is worth a full read. It is referenced again in section 9.

4. What the Agent Reads: The Graph

The agent pass is only as good as the context it can reach, and in Tripwire that context is the money-flow graph itself. The bank’s ledger was always a sequence of transfers between accounts; the design decision is how to store it. Modeling transactions as edges between accounts (e.g., (:Account)-[:TRANSFERRED]->(:Account)) is a common pitfall. When multiple transfers occur between the same two accounts over time, edges accumulate arrays of timestamps and amounts, and multi-hop Cypher queries become slower and less precise.

Tripwire enforces a fundamental architectural invariant: First-Class Transactions.

(:Account)--[:SENT]-->(:Transaction)--[:RECEIVED]-->(:Account)

Tripwire Canonical Graph Schema: Transactions are nodes holding immutable attributes (timestamp, amount, currency, channel).

This modeling choice delivers three major operational advantages:

  • Stable Transaction IDs: Every transfer possesses a permanent node ID, allowing deterministic joins between machine learning inference artifacts and graph topology.
  • Bi-directional Traversal: An investigator can effortlessly trace upstream sources of funds (SENT) or downstream dispersion (RECEIVED) in a single Cypher hop.
  • Zero Multi-Edge Overhead: FalkorDB stores each transaction as an independent entity in sparse matrix memory, keeping neighbor degree operations O(1).
The Evaluation Isolation Invariant
Tripwire operates in a strictly target-free environment during live workbench inference. Target labels (is_laundering) and ground-truth typologies remain quarantined in offline evaluation test sets. The inference graph and API contracts never receive or return ground-truth labels.

When a reviewer or the agent asks a question, it is answered by bounded Cypher executed against FalkorDB, a high-throughput graph database engine built upon Redis that translates queries into sparse-matrix operations via GraphBLAS. The agent reaches it through the same three approved read-only tools every time:

trace_funds

Ordered transaction and account paths outward from the anchor transfer, by direction, depth, time window, and row limit.

inspect_counterparties

The accounts on both ends of the anchor and the source-backed repeated activity around them.

detect_flow_patterns

Fan-in, fan-out, and pass-through matches, with the supporting transaction IDs for each match.

trace_funds.cypher
MATCH path = (origin:Account)-[:SENT]->(tx:Transaction)-[:RECEIVED]->(destination:Account)
WHERE tx.id = $transaction_id
OPTIONAL MATCH (destination)-[:SENT]->(downstream_tx:Transaction)-[:RECEIVED]->(second_hop:Account)
WHERE downstream_tx.timestamp >= tx.timestamp 
  AND downstream_tx.timestamp <= tx.timestamp + $time_window
RETURN path, downstream_tx, second_hop LIMIT $result_limit;

In production sweeps against 998,021 transactions and 354,660 accounts, FalkorDB delivers:

  • Trace Funds P95: 6.20 milliseconds
  • Counterparty Inspection P95: 2.33 milliseconds
  • Pass-Through Detection P95: 1.98 milliseconds
Empty Results Are Not Safety
Every tool query is parameterized and bounded: traversals cap at a few hops, windows at days not years, and every result set has an explicit row limit. An empty result is not evidence that no suspicious activity exists outside the query scope, and it never maps to an allow decision.

5. The AML Patterns the Graph Exposes

In the synthetic IBM AMLworld dataset, laundering syndicates repeat a small set of structural behaviors. Each is awkward to express as a predefined feature and natural to express as a traversal, which is why the second layer works on a graph in the first place:

Interactive AML Typology Explorer

Select a synthetic IBM AMLworld typology pattern to see its graph mechanism, red flags, and the Cypher pattern that exposes it

284 detected in test cohort
Layered Fan-Out (Dispersion)

A primary origin account transfers a large sum into multiple intermediate mule accounts within a compact time window to fracture audit visibility.

Graph Mechanism

A single high-balance account sends funds to between 5 and 20 recipient accounts within 10 to 60 minutes. Recipient accounts typically disperse the money further or liquidate via physical branch withdrawals.

Primary Detection Red Flags
  • Source account out-degree explodes from 1.2 to >15.0 within 24 hours.
  • Outbound transfer amounts are near-uniform or structured in tranches.
  • Recipient accounts have low historical activity prior to receiving funds.
Executed FalkorDB Cypher Pattern
typology_matcher.cypher
MATCH (origin:Account {id: $source_id})-[:SENT]->(tx:Transaction)-[:RECEIVED]->(mule:Account)
WHERE tx.timestamp >= $window_start AND tx.timestamp <= $window_end
WITH origin, count(DISTINCT mule) AS fan_out_degree, collect(tx.amount) AS tranche_amounts
WHERE fan_out_degree >= 5
RETURN origin.id, fan_out_degree, tranche_amounts

Notice how each typology is characterized by a distinctive topological footprint: fan-outs create star graphs, structuring creates inbound bottlenecks, pass-throughs form linear conduit chains, and round-tripping forms directed cycles.

6. The Full Pipeline, End to End

Putting the layers in order: the replay stream feeds a point-in-time feature store, the model scores every transaction into deterministic routes, the agent pass picks up the flagged reviews, the graph supplies the evidence, and the analyst owns the conclusion.

End-to-End System Pipeline

Click any architecture stage to examine its implementation, latency profile, and invariants

Stage 3: Layer One - Champion Detection Model

The LightGBM champion scores every transaction along a calibrated risk distribution; deterministic policy routes each score into block, review, or standard path.

P95 / Throughput: 76,988 transactions/sec (1 CPU thread)
Engineering Architecture
  • 0.752 average precision on the held-out test cohort, 0.600 on the hard September 9-10 bulk slice.
  • 76,988 transactions per second on a single CPU thread.
  • Three deterministic routes: blocked_by_rule, flagged_for_review, standard_path.
Operational Invariant

Deterministic policy ownership: models output scores, deterministic rules decide.

The pipeline is engineered for sub-second analyst responsiveness. While the model scores over 76,000 transactions per second, graph evidence traversal completes in under 7ms on the demo slice, so the wait a reviewer actually notices is the agent pass, never the database.

7. The Analyst Workbench Guide

Now that you understand the underlying architecture, here is how to navigate the Tripwire workbench interface efficiently:

1. Overview Command Center (/overview)

Your operational cockpit. The top KPI HUD shows cohort size, risk triage breakdown, and FalkorDB engine status. The alert queue defaults to Flagged for review (1,585 alerts). Click the Inspect eye button on any row to open the peek drawer for a quick risk preview without losing queue position.

2. Investigation Canvas (/investigation/[id])

The graph workstation. The conversation pane logs the agent pass as it runs: every graph tool call with its purpose, the executed Cypher and its parameters, and what each result added to the graph. The review ends with a verdict: the simulated decision, the risk level, the path through the escalation chain, and the verified reasoning with clickable evidence. The graph canvas shows traveling money-flow animations on the retrieved edges, and the queue stepper (Previous Alert / Next Alert) moves through queued items sequentially.

3. Performance & Evaluation Lab (/performance)

The benchmark hub. Review Champion vs Baseline Average Precision deltas (+374%) and latency distributions. Use the Interactive Alert Budget Simulator slider to project daily alert volume, true vs. false positive ratios, and analyst workload hours.

Global Keyboard Shortcuts

Press ? anywhere in the application to view the shortcuts cheat-sheet. Press / to focus the transaction search input, and Esc to dismiss drawers and modals.

8. Technical Glossary & Key Terms

A searchable reference guide explaining the core vocabulary across machine learning, graph databases, and financial crime compliance:

Interactive Technical Glossary

Quick reference for core concepts across Machine Learning, Graph Databases, and AML

A ranking metric that calculates the area under the Precision-Recall curve. It summarizes how accurately a model ranks illicit transactions above legitimate ones.
The finite maximum number of alerts a human compliance department can investigate per calendar day without inducing analyst fatigue or backlog.
A graph data modeling pattern where transactions are distinct labeled nodes rather than simple edge properties: (:Account)-[:SENT]->(:Transaction)-[:RECEIVED]->(:Account).
A high-throughput low-latency graph database engine built on Redis that utilizes GraphBLAS sparse-matrix linear algebra for Cypher query execution.
The strict principle that no feature calculated for a transaction occurring at timestamp t may incorporate information or aggregate statistics generated after timestamp t.
A formalized legal dossier submitted by financial institutions to regulatory authorities (such as FinCEN or FIUs) detailing detected suspicious transactions.
The optional second layer of review in Tripwire: an LLM tool-calling agent that runs downstream of the model on flagged transactions, with bounded tools and a fixed human-review recommendation.
The recorded facts of each graph tool call: tool name, bounded arguments, the executed Cypher statements, row counts, duration, and outcome.
An open protocol developed to standardize how LLMs connect with external data tools, APIs, and graph query execution engines.
The rule that ML models and LLMs produce scores and recommendations, but only deterministic software rules own actual financial action execution (allow, review, block).

9. Further Reading: Field Notes

The layered design in this guide is not unique to Tripwire; banks, exchanges, and payment processors are converging on the same division of labor. The closest public account is Coinbase’s three-part series on their Onramp fraud agent, which documents the build, the evaluation method, and the post-training work in unusual detail:

Field notesCoinbase Engineering Blog | October 2026

Part 1: How Coinbase Built, Evaluated, and Post-Trained a Fraud Agent

Coinbase Onramp placed an LLM risk agent downstream of its existing ML model and rules engine. The agent reviews recent transaction sequences in context as a constrained reviewer rather than an open-ended workflow, can block a transaction the model would have allowed, and can never override an upstream block. Part 1 covers the build and the online experiment; the later parts cover how the team evaluated frontier models on a domain benchmark and post-trained a smaller model to own the task.

30%

Fewer fraudulent transactions in the agent-enabled treatment group

22%

Less fraud value than the existing stack alone

3x

Projected fraud savings over estimated inference cost

  • Route selectively: the model and rules handle broad screening, the agent adds contextual review.
  • Keep the decision path simple and bounded, with application code owning the policy.
  • Instrument the serving layer so detection behavior and serving behavior stay separable.
Read the full write-up

One scope note before you cite anything on this page: Tripwire is a synthetic IBM AMLworld workbench, not a production deployment and not a Coinbase replica. The shared lesson is about the shape of the system, a model for coverage, an agent for context, and deterministic code for authority. The benchmark numbers in this guide describe the synthetic replay only and do not establish real-world AML effectiveness.