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.

level 1single task
intake3s

Ingest alert payload

IntakeAgent

Normalise the alert from the transaction monitoring system.

deps:

level 23 tasks in parallel
history8s

Analyse 90-day pattern

PatternAgent

Structuring, rapid movement, round-tripping.

deps: intake

kyc6s

Pull KYC dossier

KYCAgent

Identity, beneficial ownership and refresh dates.

deps: intake

sanctions4s

Screen sanctions & PEP lists

ScreeningAgent

Fuzzy-match names and jurisdictions.

deps: intake

level 3single task
graph7s

Expand counterparty graph

GraphAgent

Two-hop traversal over the property graph.

deps: kyc, history

level 4single task
risk5s

Score composite risk

RiskAgent

Combine screening, pattern and network signals.

deps: sanctions, graph

level 5single task
policy2s

Evaluate runtime guardrails

PolicyAgent

Deny-overrides check before any autonomous action.

deps: risk

level 6single task
narrative6s

Draft investigator narrative

WriterAgent

SAR narrative with citations to each observation.

deps: policy

level 7single task
review1s

Route 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.