Templates / Document processing / document-classification

AI Document Classification

Classifies incoming documents with one model call that returns JSON, then routes each to the team that owns it: invoices to accounts payable, contracts to legal. Anything the model is unsure about — low confidence or an unknown type — lands with a human who files it by hand.

aiai agent taskroutingjson output
Open in editor Download .bpmn
casen template use document-classification
invoice contract unsure Classifydocument Route toaccountspayable Route tolegal Classifymanually Document uploaded Document type? Filed as invoice Filed as contract Filed by hand

Scenarios · 2

  • A confident invoice goes to accounts payable classify-document → route → route-to-ap → filed-invoice
  • A contract the model is unsure about goes to a human route → classify-manually → filed-manually

Job types · 2

  • dms-route Route to accounts payable, Route to legal
  • io.camunda.agenticai:aiagent:1 Classify document

Files · 2

Every scenario passes on @bpmnkit/engine's runScenario in the package's tests. casen template use document-classification [dir] writes the files above into your project — see the templates guide for running the scenarios and deploying.