Adding document classifiers
You can add custom document classifiers to agentic workflows to automatically identify document types. You can define the document classes such as invoices, contracts, and bills, and the classifier uses AI to categorize documents based on those classes.
When you configure a document classifer, you can choose a model from the list of available models. You can also add your own custom model through AI Gateway. For more information, see Adding AI models through AI Gateway.
To add a document classifier to an agentic workflow:
Open the agentic workflow in the workflow builder.
Click the Add flow items icon
.Select the Flow nodes tab.
Drag Document classifier to the agentic workflow.
Alternatively, to add a document classifier, click the connector line between the start and end nodes, then select Add a flow activity > Document classifier.
Configuring a document classifier
The watsonx/ibm/granite-3-3-8b-instruct model is deprecated as of November 24, 2025, and will be withdrawn on February 22, 2026. Use the default model or another supported model for the document classifier.
To configure a document classifier to identify documents:
Select the document classifier that you added to the agentic workflow.
Add the classes to identify the documents such as invoices, contracts, and bills.
Select the model to use for the document classifier.
Click Done in the document classifier dialog.
Testing a document classifier
To test the document classifier and see how documents are classified:
Select the document classifier in the agentic workflow.
Select Test classifier and upload up to five documents.
To delete a document, click the Delete icon
on the document row. You can click Delete all to delete all documents. To add documents, click Upload or drag the files to the panel.
It might take some time to upload the documents. After your documents are processed, you can see the predicted classification for each of your documents.
Documents that do not match the defined classes are classified as Other. You cannot delete the Other class. Documents that are classified as Other trigger a user review. For more information, see Configuring a user review.
If you add, edit, or delete a class, all documents are reclassified.
After you test and get the expected results, click Done in the document classifier dialog.
Mapping data to inputs
By default, auto-mapping is enabled. However, you can map values to the inputs.
To map values to inputs, complete the following steps:
Select the document classifier node and then click Edit data mapping.
Specify the input values for data mapping. For more information about data mapping, see Mapping data.
Configuring a user review
Preview
You can configure a user review activity for documents that are classified as Other.
If the system classifies a document as Other, it creates a user review task. The system notifies the user in the chat that a review is required.
To configure a user review:
Select the document classifier, and set the User Review switch to on.
Click the Edit icon
.In the Assign to list, select one of these options:
Option | Description |
|---|---|
Flow initiator | Only a user who starts the flow can review the document. |
Specified user | Only a specified user can review the document. If no users are assigned, click Assign user to select a user. The selected user is displayed in the Assigned user field. To change the user, click the Edit icon |
User from a variable | Only a user who is specified in a variable can review the document. |
If the user review is configured, and the system classifies a document as Other, it notifies the user in the chat that a review is required.

The user can click the chat notification to view the review activity.

The user can then review the document and the system’s prediction, optionally update the classification, and submit the review. After submission, the workflow continues with the updated classification that is provided by the user.

Document classifier limits and restrictions
Document classifiers have the following limits and restrictions.
Area | Description |
|---|---|
Maximum file size | 10 MB |
Maximum number of uploaded files | 5 files |
Accepted file types | .doc, .docx, .jpe, .jpeg .jpg, .pdf, .png, .ppt, .pptx, .tif, .tiff |
Minimum length of the class name | 3 characters |
Maximum length of the class name | 30 characters |
Maximum number of classes | 10 classes |
An agentic workflow defines a set of linked activities and controls that are designed to achieve a specific business purpose or goal. Learn more about agentic workflows.