An analyst that shows its rules, and knows when to stop
A useful risk agent has to do two things a plain chatbot won’t: cite the exact rules behind every flag, and hand the high-risk cases to a person instead of deciding them itself. I’m building one to learn LangGraph on a problem where those two constraints matter.
Learning buildEverything here runs on synthetic data. It is a learning project, not a product, and nothing runs in production.
Four stages, one done
-
S1: Rules service (done)
Deterministic rules over transactions with sliding windows and categorical escalation, behind an assess endpoint.
-
S2: LangGraph analyst (planned)
An agent that reads the rule hits, writes a structured decision memo, and pauses for human approval on high-risk cases.
-
S3: API and observability (planned)
An async API with streaming, tracing, latency and cost per case, packaged in Docker.
-
S4: Cloud deploy (planned)
A deploy to AWS Bedrock AgentCore, plus a comparison when the model is swapped.
Stage 1: the rules service
The rules service applies 6 AML-style rules with sliding windows and categorical escalation, and exposes single and bulk assessment endpoints. It is covered by 59 tests.
I tested it on a synthetic set of 303 transactions from 20 customers with suspicious patterns planted in it: it caught 5/5 of them with no false alarms. The same run surfaced a real bug in my design: the thresholds could never reach the HIGH level, so I recalibrated them.
Stage 1, on synthetic data
Caught, with 0 false alarms.
On the rules service.
The agent itself, then the cloud
Next is the LangGraph analyst with human approval, then the API with tracing and cost per case, then the AgentCore deploy, planned through November 2026. This page will say what is done as each stage lands, with its own measured number: memo accuracy, latency, cost per case.