Shipped reference path — synthetic W-2 through Docling, classify, HITL, vault.
W-2 intake with confidence routing
The lending W-2 pack demonstrates the full pattern agents use for income verification: parse, score confidence, human review when needed, persist decisions durably.
- 1Route PDFinspect_pdf on W-2 PDF — TextBased → local markdown; else Docling OCR.
- 2Parse layoutexecute docling_convert_file on fixtures/synthetic-w2.txt — layout-aware OCR for boxed forms.
- 3Classifyclassify_document routes W-2 vs pay stub vs bank statement before extraction schema selection.
- 4Route low confidenceScore below threshold → hitl_enqueue_label_studio with Label Studio project from label-studio-config.xml.
- 5Persist reviewWebhook fires → memory_ingest appends reviewer fields with wikilinks to the loan file note.
inspect_pdf()execute()classify_document()hitl_enqueue_label_studio()memory_ingest()