← All seeds & suites
iddesk ADL 0.5.1 KYC & Identity Verification

Identity Desk

KYC review where AI checks documents and selfies and scores risk, and analysts decide: watchlist hits are blocked until compliance clears them, high-risk applicants need compliance sign-off, and every decline states its reason.

Resources (5)
applicant, onboarding, verification, assessment, escalation
Roles (3)
analyst, compliance, admin
Features (10)
suitepermissionsstate_machinevalidationrules_engineviewsscheduled_tasksauditindexeshistory_events

identity-desk.infinity-sdg.com — KYC and identity verification review where AI checks and scores, analysts decide, and compliance owns the hard cases.

applicant → onboarding (submitted → in review)
  ← verifications: document · selfie match · database · address · device (AI, vendor or analyst)
                   sanctions · PEP screening (pass | review | hit)
  ← AI risk assessment (model, score, tier, factors) → analyst accepts or overrides the tier
  → approve · decline (with the reason the applicant is told) · request information · escalate
  → compliance: clear (false positive) or confirm (blocks approval)
nightly: applications waiting on information for 30 days expire

What it enforces

RuleWhy
Approval needs a passing document check, selfie match and sanctions screeningThe core KYC checks are never skipped
A failed check blocks approvalNo approving over a red flag
A watchlist hit blocks approval until compliance clears it as a false positiveName matches are common; only compliance can clear one
A confirmed escalation can never be approvedConfirmed concerns end in a decline
No approval while the AI risk score is unreviewed, or without oneThe AI scores; an analyst decides
Overriding the AI’s tier needs a written reasonDisagreements are explained and measurable
A high final risk tier needs compliance clearance before approvalEnhanced due diligence for high risk
Escalations go to someone other than the analyst who raised themIndependent review
Every decline states the reason the applicant is toldAdverse decisions are explained

Every resource is audited. Applications keep a readable history of every decision. No government ID numbers are stored.

Resources, views, roles

  • Resources: applicant, onboarding, verification, assessment (AI), escalation
  • Views:
    • reviewQueue
    • complianceQueue
    • aiRiskAgreement: AI tier versus final tier, with the reason when they differ
  • Roles:
    • analyst: reviews applications and AI scores, approves, declines, escalates
    • compliance: enhanced due diligence, decisions on escalated cases
    • admin

Demo data

The demo holds 26 applications across five products, in every state:

  • 14 approved:
    • 7 clean
    • 4 after compliance cleared a watchlist name match as a false positive
    • 2 after a high risk tier was cleared
    • 1 after an analyst overrode the AI’s tier with a written reason (the “shared device” was a library computer)
  • 4 declined:
    • 2 for a failed document check
    • 1 after compliance confirmed a watchlist match
    • 1 over an unexplained source of funds
  • 2 open escalations
  • 2 AI scores awaiting review
  • 2 waiting on information
  • 2 just submitted

Watchlist matches are described (“name and birth year partially match a watchlist entry”), never tied to a real listed person. Every decision is made by the demo user who would make it (analyst1, analyst2, compliance1, compliance2), with that user’s own roles. That needs Kalos seeder 1.2.0 or later.

Every applicant is invented, and phone numbers use the 555 range. To regenerate the data, run python3 seeds/gen_seed.py.

Run it

scripts/kalos.sh validate    # static checks
scripts/kalos.sh start       # kalosd on :9220
scripts/kalos.sh verify      # live checks

By default, KALOS_REPO is ../kalos.

Sign in with admin / Admin123!. The other users are analyst1, analyst2, compliance1 and compliance2, all with password Demo123!.

Domain Resource Summary

ResourcePurpose & Lifecycle
applicantA person applying for an account.
onboardingOne application for one product, from submission to decision. (States: submitted, in_review, info_requested, escalated, approved, declined, expired)
verificationOne identity check on an applicant.
assessmentThe AI’s risk score for an applicant. An analyst accepts it or overrides the tier. (States: draft, accepted, overridden)
escalationEnhanced due diligence by compliance, assigned to someone other than the escalating analyst. (States: open, cleared, confirmed)
Inspect domain.yaml (319 lines)
# identity-desk/backend/domain.yaml
#
# Identity Desk — KYC / identity verification review.
#
#   applicant → onboarding (submitted → in review)
#     ← verifications: document, selfie match, database, address, device
#       (AI, vendor or analyst), sanctions / PEP screening (pass | review | hit)
#     ← AI risk assessment (model, tier, factors) → analyst accepts or overrides it
#     → approve, decline (with the reason the applicant is told),
#       request information, or escalate to compliance (enhanced due diligence)
#     → escalation: cleared (false positive) | confirmed (blocks approval)
#   Nightly: onboardings waiting on information for 30 days expire.
#
# The AI checks and scores; people decide. A watchlist hit can't be
# approved until compliance clears it, and a confirmed hit can't be approved
# at all.
#
# An ISDG product for fintechs, banks, exchanges and marketplaces.
# All applicants are invented; no government ID numbers are stored.
# query() filter keys are single lowercase words.

domain:
  name: iddesk
  version: "1.0.0"
  description: >
    KYC and identity verification review: AI document checks and risk scores,
    analyst decisions, sanctions hits blocked, compliance escalations, and
    declines that always state their reason.

  resources:

    applicant:
      description: "A person applying for an account."
      object:
        id:        { type: uuid, primaryKey: true, protected: true, allowUserProvided: true }
        fullName:  { type: string, required: true, maxLength: 120 }
        birthDate: { type: date, required: true }
        country:   { type: string, required: true, pattern: "^[A-Z]{2}$" }
        email:     { type: email, required: true }
        phone:     { type: phone, required: true }
      permissions:
        list:   [analyst, compliance, admin]
        get:    [analyst, compliance, admin]
        create: [admin]
        update: [analyst, admin]
        delete: [admin]
      features: { audit: true }

    onboarding:
      description: "One application for one product, from submission to decision."
      object:
        id:            { type: uuid, primaryKey: true, protected: true, allowUserProvided: true }
        number:        { type: string, required: true, unique: true, maxLength: 20 }
        applicant:
          type: reference
          references: "adl.iddesk.iddesk.applicant"
          required: true
        product:       { type: string, required: true, enum: [checking, card, crypto_wallet, business_account, brokerage] }
        submittedAt:   { type: datetime, required: true }
        analyst:       { type: string, maxLength: 100 }
        infoRequested: { type: text }
        declineReason: { type: text }
        decidedAt:     { type: datetime }
        status:        { type: string, required: true, default: submitted }
      stateMachine:
        field: status
        initial: submitted
        states:
          submitted:
            transitions:
              assign: { to: in_review, guards: [analyst, admin], requiredFields: [analyst] }
          in_review:
            transitions:
              approve:     { to: approved, guards: [analyst, compliance, admin], sets: { decidedAt: now() } }
              decline:     { to: declined, guards: [analyst, compliance, admin], requiredFields: [declineReason], sets: { decidedAt: now() } }
              requestInfo: { to: info_requested, guards: [analyst, admin], requiredFields: [infoRequested] }
              escalate:    { to: escalated, guards: [analyst, admin] }
          info_requested:
            transitions:
              infoReceived: { to: in_review, guards: [analyst, admin] }
              expire:       { to: expired, guards: [admin] }
          escalated:
            transitions:
              approve: { to: approved, guards: [compliance, admin], sets: { decidedAt: now() } }
              decline: { to: declined, guards: [compliance, admin], requiredFields: [declineReason], sets: { decidedAt: now() } }
          approved: {}
          declined: {}
          expired: {}
      permissions:
        list:   [analyst, compliance, admin]
        get:    [analyst, compliance, admin]
        create: [admin]
        update: [analyst, compliance, admin]
        delete: [admin]
      features: { audit: true }
      history:
        events:
          approved:  { trigger: transition, transition: approve, severity: success }
          declined:  { trigger: transition, transition: decline, capture: [declineReason], label: "Declined: {declineReason}", severity: warning }
          escalated: { trigger: transition, transition: escalate, label: "Escalated to compliance", severity: warning }
          infoAsked: { trigger: transition, transition: requestInfo, capture: [infoRequested], label: "Asked for: {infoRequested}", severity: info }
      indexes:
        - { fields: [applicant] }
        - { fields: [status] }

    verification:
      description: "One identity check on an applicant."
      object:
        id:        { type: uuid, primaryKey: true, protected: true, allowUserProvided: true }
        applicant:
          type: reference
          references: "adl.iddesk.iddesk.applicant"
          required: true
        kind:      { type: string, required: true, enum: [document, selfie_match, database, address, device, sanctions, pep] }
        source:    { type: string, required: true, enum: [ai, vendor, analyst] }
        result:    { type: string, required: true, enum: [pass, fail, review, hit] }
        score:     { type: percentage }
        detail:    { type: text, required: true }
        checkedAt: { type: datetime, required: true }
      validation:
        hitsAreScreenings:
          rule: "result != 'hit' || kind == 'sanctions' || kind == 'pep'"
          message: "Only sanctions and PEP screenings produce hits."
      permissions:
        list:   [analyst, compliance, admin]
        get:    [analyst, compliance, admin]
        create: [analyst, admin]
        update: [admin]
        delete: [admin]
      features: { audit: true }
      indexes:
        - { fields: [applicant] }

    assessment:
      description: "The AI's risk score for an applicant. An analyst accepts it or overrides the tier."
      object:
        id:        { type: uuid, primaryKey: true, protected: true, allowUserProvided: true }
        applicant:
          type: reference
          references: "adl.iddesk.iddesk.applicant"
          required: true
        model:     { type: string, required: true, maxLength: 60 }
        score:     { type: integer, required: true, min: 0, max: 100 }
        aiTier:    { type: string, required: true, enum: [low, medium, high] }
        factors:   { type: text, required: true }
        finalTier: { type: string, enum: [low, medium, high] }
        reviewNote: { type: text }
        reviewedBy: { type: string, maxLength: 100 }
        status:    { type: string, required: true, default: draft }
      stateMachine:
        field: status
        initial: draft
        states:
          draft:
            transitions:
              accept:   { to: accepted, guards: [analyst, compliance], requiredFields: [finalTier], sets: { reviewedBy: $user.id } }
              override: { to: overridden, guards: [analyst, compliance], requiredFields: [finalTier, reviewNote], sets: { reviewedBy: $user.id } }
          accepted: {}
          overridden: {}
      permissions:
        list:   [analyst, compliance, admin]
        get:    [analyst, compliance, admin]
        create: [analyst, admin]
        update: [analyst, compliance, admin]
        delete: [admin]
      features: { audit: true }
      indexes:
        - { fields: [applicant] }

    escalation:
      description: "Enhanced due diligence by compliance, assigned to someone other than the escalating analyst."
      object:
        id:          { type: uuid, primaryKey: true, protected: true, allowUserProvided: true }
        onboarding:
          type: reference
          references: "adl.iddesk.iddesk.onboarding"
          required: true
        reason:      { type: string, required: true, enum: [watchlist_match, high_risk_tier, document_concern, source_of_funds] }
        escalatedBy: { type: string, required: true, maxLength: 100 }
        assignee:    { type: string, required: true, maxLength: 100 }
        finding:     { type: text }
        status:      { type: string, required: true, default: open }
      stateMachine:
        field: status
        initial: open
        states:
          open:
            transitions:
              clear:   { to: cleared, guards: [compliance, admin], requiredFields: [finding] }
              confirm: { to: confirmed, guards: [compliance, admin], requiredFields: [finding] }
          cleared: {}
          confirmed: {}
      permissions:
        list:   [analyst, compliance, admin]
        get:    [analyst, compliance, admin]
        create: [analyst, admin]
        update: [compliance, admin]
        delete: [admin]
      features: { audit: true }
      history:
        events:
          cleared:   { trigger: transition, transition: clear, capture: [finding], label: "Cleared: {finding}", severity: success }
          confirmed: { trigger: transition, transition: confirm, capture: [finding], label: "Confirmed: {finding}", severity: error }
      indexes:
        - { fields: [onboarding] }

  rules:

    approveNeedsCoreChecks:
      description: "Approval needs a passing document check, selfie match and sanctions screening."
      trigger: { resource: onboarding, events: [transition], transition: approve }
      condition: "len(query('verification', { applicant: $record.applicant, kind: 'document', result: 'pass' })) == 0
                  || len(query('verification', { applicant: $record.applicant, kind: 'selfie_match', result: 'pass' })) == 0
                  || len(query('verification', { applicant: $record.applicant, kind: 'sanctions', result: 'pass' }))
                     + len(query('verification', { applicant: $record.applicant, kind: 'sanctions', result: 'hit' })) == 0"
      action: reject
      severity: error
      message: "Document, selfie match and sanctions screening must be on file and passing."

    noApprovalOverFailedChecks:
      description: "A failed check blocks approval."
      trigger: { resource: onboarding, events: [transition], transition: approve }
      condition: "len(query('verification', { applicant: $record.applicant, result: 'fail' })) > 0"
      action: reject
      severity: error
      message: "A verification failed."

    hitsNeedClearance:
      description: "A sanctions or PEP hit blocks approval until compliance clears it as a false positive."
      trigger: { resource: onboarding, events: [transition], transition: approve }
      condition: "len(query('verification', { applicant: $record.applicant, result: 'hit' })) > 0
                  && len(query('escalation', { onboarding: $record.id, status: 'cleared' })) == 0"
      action: reject
      severity: error
      message: "A watchlist hit must be cleared by compliance first."

    confirmedBlocks:
      description: "A confirmed escalation can never be approved."
      trigger: { resource: onboarding, events: [transition], transition: approve }
      condition: "len(query('escalation', { onboarding: $record.id, status: 'confirmed' })) > 0"
      action: reject
      severity: error
      message: "Compliance confirmed a concern. Decline instead."

    decideOnlyOnAReviewedScore:
      description: "No approval while the AI risk score is unreviewed, or without one."
      trigger: { resource: onboarding, events: [transition], transition: approve }
      condition: "len(query('assessment', { applicant: $record.applicant, status: 'draft' })) > 0
                  || (len(query('assessment', { applicant: $record.applicant, status: 'accepted' }))
                      + len(query('assessment', { applicant: $record.applicant, status: 'overridden' }))) == 0"
      action: reject
      severity: error
      message: "Review the AI risk assessment first."

    highRiskNeedsCompliance:
      description: "A high final risk tier needs a compliance clearance before approval."
      trigger: { resource: onboarding, events: [transition], transition: approve }
      condition: "some(query('assessment', { applicant: $record.applicant }), a => a.finalTier == 'high')
                  && len(query('escalation', { onboarding: $record.id, status: 'cleared' })) == 0"
      action: reject
      severity: error
      message: "High-risk applicants need compliance clearance."

    escalateToSomeoneElse:
      description: "Enhanced due diligence is done by someone other than the analyst who escalated."
      trigger: { resource: escalation, events: [create] }
      condition: "$record.assignee == $record.escalatedBy"
      action: reject
      severity: error
      message: "Assign the escalation to a different person."

  schedules:

    expireUnansweredRequests:
      description: "Onboardings waiting on information for 30 days expire."
      recurrence: daily at 03:30
      source:
        resource: onboarding
        filter: "status == 'info_requested' && submittedAt < dateSub(now(), 30, 'day')"
      action: transition
      transition: expire

  views:

    reviewQueue:
      description: "Applications waiting for an analyst."
      source: onboarding
      filter: "status == 'submitted' || status == 'in_review' || status == 'info_requested'"
      permissions: [analyst, compliance, admin]
      columns:
        - { field: number,      label: "Application" }
        - { field: product,     label: "Product" }
        - { field: analyst,     label: "Analyst" }
        - { field: submittedAt, label: "Submitted" }
        - { field: status,      label: "State" }
      defaultLimit: 500

    complianceQueue:
      description: "Open escalations."
      source: escalation
      filter: "status == 'open'"
      permissions: [compliance, admin]
      columns:
        - { field: reason,      label: "Reason" }
        - { field: escalatedBy, label: "Escalated by" }
        - { field: assignee,    label: "Assignee" }
      defaultLimit: 200

    aiRiskAgreement:
      description: "Where analysts kept or changed the AI's risk tier."
      source: assessment
      filter: "status != 'draft'"
      permissions: [compliance, admin]
      columns:
        - { field: model,      label: "Model" }
        - { field: aiTier,     label: "AI tier" }
        - { field: finalTier,  label: "Final tier" }
        - { field: reviewNote, label: "Why changed" }
      defaultLimit: 500

Download seed bundle