What you’ll build
You’ll build a comprehensive KYB (Know Your Business) verification workflow that processes multiple identity documents in parallel using AI vision models. The workflow analyzes Emirates ID, trade license, and passport documents simultaneously, merges the results, and routes them through confidence-based validation before sending verification results. This workflow demonstrates how to:- Process multiple documents concurrently for faster verification
- Use private vision models for sensitive identity data
- Implement human-in-the-loop approval for low-confidence cases
- Automate the verification notification process

Prerequisites
Before you begin, ensure you have:- MagOneAI instance with access to the workflow builder
- Vision model access — either:
- Private vision model (Qwen3-VL recommended for sensitive documents)
- Cloud vision model (GPT-4V, Claude 3.5 Sonnet)
- Email tool configured for sending verification results
- Sample documents for testing (Emirates ID, trade license, passport)
Architecture
The KYB verification workflow follows a parallel processing pattern that maximizes efficiency while maintaining accuracy:Workflow components
Parallel Processing
Three document analysis agents run simultaneously to reduce total processing time from ~45s to ~15s
Vision Models
Each agent uses vision capabilities to extract text, verify authenticity, and validate document structure
Confidence Routing
Automatically routes low-confidence results to human reviewers while approving high-confidence cases
Audit Trail
Captures all verification steps, confidence scores, and approval decisions for compliance
Step-by-step build
Create the project and agents
Start by creating a new project in MagOneAI and setting up the four agents you’ll need.Navigate to Projects → Create New Project → Name it “KYB Document Verification”Create four agents:
-
Emirates ID Analyzer
- Name: Emirates ID Analyzer
- Model: Qwen3-VL (private) or GPT-4V
- Persona:
-
Trade License Analyzer
- Name: Trade License Analyzer
- Model: Qwen3-VL (private) or GPT-4V
- Persona:
-
Passport Analyzer
- Name: Passport Analyzer
- Model: Qwen3-VL (private) or GPT-4V
- Persona:
-
Merge & Summary Agent
- Name: KYB Summary Agent
- Model: GPT-4 or Claude 3.5 Sonnet (text model)
- Persona:
Build the workflow foundation
Open the workflow builder and add the initial nodes.
-
Add Trigger Node
- Type: Manual Trigger (or API trigger if integrating with your system)
- Configure inputs:
emirates_id_image(file)trade_license_image(file)passport_image(file)applicant_name(text)application_id(text)
-
Add Parallel Node
- Drag a Parallel Node onto the canvas
- Connect it to the trigger
- You’ll configure the branches in the next step
Configure parallel document analysis branches
Set up three parallel branches, one for each document type.In the Parallel Node configuration:
-
Branch 1 - Emirates ID
- Add Agent Node: Emirates ID Analyzer
- Map input:
{{trigger.emirates_id_image}} - Enable vision mode
-
Branch 2 - Trade License
- Add Agent Node: Trade License Analyzer
- Map input:
{{trigger.trade_license_image}} - Enable vision mode
-
Branch 3 - Passport
- Add Agent Node: Passport Analyzer
- Map input:
{{trigger.passport_image}} - Enable vision mode
All three branches execute simultaneously, reducing total processing time significantly.
Add merge agent to consolidate results
After the Parallel Node, add the merge agent to consolidate findings.
- Add Agent Node: KYB Summary Agent
- Configure inputs to receive all three parallel outputs:
- Enable structured output to ensure consistent JSON format
Add confidence-based routing
Add a Condition Node to route based on confidence scores.
- Add Condition Node after the merge agent
- Configure condition:
- Label branches clearly: “Auto-Approve” and “Human Review”
Configure human review for low-confidence cases
On the “Human Review” branch, add a Human Task node.
- Add Human Task Node
-
Configure task:
- Title: KYB Document Review Required
- Description:
- Assignee: Compliance team
- Attachments: Include all three document images and analysis outputs
- Actions: Approve, Reject, Request More Info
- Add merge point after Human Task to rejoin with auto-approve branch
Add email notification
Add a final Tool Node to send verification results.
- Add Tool Node: Email
- Configure email:
- To:
{{trigger.applicant_email}} - Subject:
- Body:
- To:
- Add condition to customize email based on approval/rejection status
Test with sample documents
Test your workflow with sample documents to verify it works correctly.
-
Prepare test documents:
- Sample Emirates ID (use test data, not real IDs)
- Sample trade license
- Sample passport
- Run the workflow with test inputs
-
Verify:
- All three agents execute in parallel
- Merge agent consolidates results correctly
- Condition routing works based on confidence
- Email notification sends successfully
-
Test edge cases:
- Expired document
- Low-quality image
- Missing document
- Mismatched names across documents
Key concepts demonstrated
Private Model Deployment
Deploy vision models (like Qwen3-VL) on your own infrastructure to ensure sensitive identity documents never leave your network.
Parallel Execution
Process multiple documents simultaneously using the Parallel Node, reducing total workflow time by 60-70%.
Condition-Based Routing
Dynamically route execution based on AI confidence scores, balancing automation with human oversight.
Human-in-the-Loop
Seamlessly escalate low-confidence cases to human reviewers while auto-processing high-confidence ones.
Vision Model Integration
Use multimodal AI models to analyze document images, extract text, and verify authenticity markers.
Tool Integration
Connect to email, ticketing, or CRM systems to automate downstream notifications and record-keeping.
Customization ideas
Take this workflow further by adding these enhancements:Add more document types
Add more document types
Extend the parallel processing to include additional documents:
- Utility bills for address verification
- Bank statements for financial verification
- Articles of Association for corporate structure
- Shareholder certificates
Integrate with KYB database
Integrate with KYB database
Connect to external databases for enhanced verification:
- UAE government databases (if you have API access)
- International sanctions lists
- Corporate registry lookups
- Credit bureau checks
Add OCR preprocessing
Add OCR preprocessing
For low-quality images, add a preprocessing step:
- Image enhancement (contrast, brightness, deskew)
- OCR with Tesseract or cloud OCR services
- Text extraction before vision model analysis
Connect to compliance systems
Connect to compliance systems
Automate compliance workflows:
- Log all verifications to compliance management systems
- Trigger AML/CFT screening workflows
- Generate audit reports automatically
- Archive documents in compliant storage
Implement multi-language support
Implement multi-language support
Handle documents in multiple languages:
- Add language detection in document analysis agents
- Configure agents with multilingual capabilities
- Translate extracted data to a common language for cross-validation
- Support Arabic, English, and other languages common in UAE business
Add fraud detection scoring
Add fraud detection scoring
Enhance security with dedicated fraud detection:
- Create a fraud detection agent that analyzes document metadata
- Check for common forgery patterns
- Validate photo quality and tampering signs
- Calculate fraud risk score
- Flag high-risk applications for enhanced review
Next steps
Now that you’ve built a KYB verification workflow, explore these related cookbooks:- Document Compliance Review - Learn to analyze contracts and legal documents
- IT Support Triage - See another example of confidence-based routing
- RFP Proposal Analysis - Explore more parallel agent patterns
Need help? Join our community or contact support for assistance with implementing KYB workflows in production.