BorderLink AI โ€” Technical Architecture

Pre-filing compliance co-pilot for Canadian SME importers ยท Multi-agent relay pipeline on serverless infrastructure

Users
๐Ÿ“ฆ
SME Importer
Uploads invoice or product details
๐Ÿšข
Freight Forwarder
Refers clients, views progress
๐Ÿ’ผ
Customs Broker
Receives cleaner docs & reports
Upload documents
& product info
Web Application
๐ŸŒ
BorderLink AI Web App
User-facing web interface where importers submit shipment data and view compliance results
Cloudflare Workers
Triggers analysis
๐Ÿ”— AI Agent Pipeline โ€” Each agent handles one job, then passes results to the next
1
๐Ÿ“‹
Orchestrator
Extracts product info and invoice fields from uploaded documents
2
๐Ÿ”€
Classifier
Decides the analysis route: HS lookup, cost estimate, or full review
3
๐Ÿ”
Researcher
Searches official government data sources for evidence
4
๐Ÿ“Š
Synthesizer
Builds the compliance report with HS codes, cost breakdown, and risk signals
5
โœ…
Fact Checker
Validates HS codes, checks SIMA / permits, assigns risk level
6
๐Ÿ”
Vault Manager
Archives the verified report and creates an audit trail
Read / Write
Data & Storage Layer
๐Ÿ—„๏ธ
D1 Database
Client info, shipments, analyses, audit events
๐Ÿ“‚
R2 Storage
Documents and compliance reports
๐Ÿง 
Vectorize
Legal knowledge search (RAG)
๐Ÿ›ก๏ธ
KV Store
SIMA flags, FX rates, runtime rules
๐Ÿค–
Workers AI
Product intelligence inference
๐Ÿ”’
S3 Mirror
Canadian data residency backup
Delivers verified results
Output to Users
๐Ÿท๏ธ
HS Code
Suggestions
Source-backed with confidence score
๐Ÿ’ฒ
Landed Cost
Estimate
Duty + GST + levies breakdown
๐Ÿšฆ
Risk Traffic
Light
Green / Yellow / Red at a glance
๐Ÿ“„
Shareable
Report
Evidence-cited for broker handoff
๐Ÿ—ƒ๏ธ
Compliance
Vault
6-year audit trail & retention
Trusted Government Data Sources
โ† Researcher queries these sources
๐Ÿ‡จ๐Ÿ‡ฆ
CBSA Customs Tariff
HS codes, duty rates, permit indicators
๐Ÿ“œ
Advance Rulings & D-Memos
Past classification decisions
๐Ÿ’ฐ
CARM Duties & Taxes
Official duty/tax calculator API
๐Ÿงพ
CRA GST / HST Rules
Tax exemptions, zero-rated goods
๐ŸŽ
CFIA / AIRS
Food safety, import controls
Planned
๐Ÿšข
Freight Forwarder Portal
Roadmap
Track referred clients' shipment progress
View client compliance health at a glance
Monitor referral incentives & bonuses
Receive high-risk shipment alerts
Access pre-screened reports
Planned
๐Ÿ“ฑ
Mobile & Messaging
Roadmap
Telegram bot: snap invoice โ†’ risk summary
PWA mobile-first interface
Proactive risk scanning (subscription)