Module 04 · task decomposition
Business workflows as a DAG
Multi-agent systems are only reliable when the work is decomposed first. Each level below can run in parallel; the critical path is the floor on how fast the whole investigation can finish, no matter how many agents you add.
$ python -m fde_toolkit dag --workflow aml
AML alert investigation
A transaction monitoring alert decomposed into agent tasks, ending at a named human approver.
intake3sIngest alert payload
IntakeAgent
Normalise the alert from the transaction monitoring system.
deps: —
history8sAnalyse 90-day pattern
PatternAgent
Structuring, rapid movement, round-tripping.
deps: intake
kyc6sPull KYC dossier
KYCAgent
Identity, beneficial ownership and refresh dates.
deps: intake
sanctions4sScreen sanctions & PEP lists
ScreeningAgent
Fuzzy-match names and jurisdictions.
deps: intake
graph7sExpand counterparty graph
GraphAgent
Two-hop traversal over the property graph.
deps: kyc, history
risk5sScore composite risk
RiskAgent
Combine screening, pattern and network signals.
deps: sanctions, graph
policy2sEvaluate runtime guardrails
PolicyAgent
Deny-overrides check before any autonomous action.
deps: risk
narrative6sDraft investigator narrative
WriterAgent
SAR narrative with citations to each observation.
deps: policy
review1sRoute for human sign-off
HumanInLoop
Nothing is filed without a named human approver.
deps: narrative
Schedule maths
- Sequential (one agent)
- 42s
- Level-parallel
- 32s
- Critical path
- 32s
- Saved by fan-out
- 10s
Adding agents beyond the widest level buys nothing. The only way to beat the critical path is to shorten a task on it or break its dependency.
Why decompose at all
- A single agent asked to “investigate this alert” will improvise a different plan every run. A DAG makes the plan an artifact you can review.
- Each node has one job, one prompt and one set of tools, so a failure is attributable to a node instead of to “the AI”.
- The guardrail node sits between reasoning and action in every workflow here, and the terminal node is always a named human.