Core primitives of the 9thSense platform — how Document Types, Checks, Goal Rules, Agents, Cases, and Executions fit together

Concepts


9thSense is built from six primitives that compose into complete verification workflows. Understanding how they fit together makes everything else easier to reason about.


Document Types

A Document Type is a pre-built extraction configuration. It knows what a document looks like, what fields to pull out, and how to validate them.

Each Document Type has:

  • context_id — unique identifier used in API calls (e.g., kyc_pan_card, fin_bank_statement)
  • display_name — human-readable name (e.g., "PAN Card", "Bank Statement")
  • category — one of 7 categories
  • output_schema — the typed fields that extraction produces, with descriptions
  • validation_rules — post-extraction checks (format, checksum, range, cross-field)

40+ pre-built Document Types across 7 categories:

CategoryExamples
identityPAN Card, Aadhaar, Passport, Driving Licence, Voter ID
financialBank Statement, ITR, Form 16, Salary Slip, GST Return
businessGST Certificate, Company Incorporation, MSME Certificate
travelPassport, Visa, Boarding Pass, Travel Insurance
scenePremises Inspection, Vehicle Assessment, Accident Scene
classificationGeneric document routing and type detection
otherDomain-specific types that don't fit the above

Document Types are config-driven — no code changes required to add or update one. Editing a Document Type auto-snapshots the previous version so you can roll back at any time. You can also create custom Document Types for your own forms and contracts from the dashboard.

💡

See Document Types for a walkthrough of the dashboard interface, including how to define output schemas and validation rules.


Checks

Checks are the verification capabilities that decide whether evidence can be trusted. Where extraction reads a document, checks interrogate it — and the person presenting it.

FamilyWhat it answers
Deepfake DetectionIs this footage genuine, or generated/manipulated?
LivenessIs a real human present — not a photo, replay, or mask?
Face Match & LikenessIs it the right person, and the same person throughout the session?
Lip-Sync & AV IntegrityDoes the voice on the call come from the face on camera?
Synthetic & Tampered DocumentsWas this document issued — or generated/edited?
Cross-VerificationDoes everything in the case agree with everything else?

Every check returns a structured verdict with a confidence score and is recorded as an Execution (see below). Checks run automatically as part of an agent's workflow; which ones run, and what confidence they must reach, is policy — defined by Goal Rules.

💡

Start with the Checks Overview for the full picture of what each check catches.


Goal Rules

Goal Rules are the declarative policy checklist attached to every agent. A case cannot complete until every rule passes.

Rules come in three kinds:

  • Deterministic comparators — field formats and ID checksums, date validity, numeric thresholds, cross-field consistency. Same input, same answer, every time.
  • Verdict thresholds — minimum confidence on check results: liveness ≥ 0.9, face match ≥ 0.85, deepfake risk below ceiling.
  • Custom rules — policy written in plain language that the AI evaluates against extracted data.

Each rule declares a severity (hard_stop denies immediately; require allows resubmission) and an on_deny block controlling retries and reviewer messaging. Rules are versioned with the agent and snapshotted into every case.

💡

See Goal Rules for the full rule anatomy and check-type reference.


Agents

An Agent is an orchestration unit. It defines a verification workflow as a JSON configuration — what to collect, which checks to run, and what Goal Rules gate completion.

Agents support three intelligence modes:

ModeDashboard labelWhen to use
PipelineAutomatic processingSequential processing with rules-based decisions. No conversation. Best for batch and automated ingestion flows.
GuidedAI conversationMulti-turn chat with the end user. The agent requests documents, handles re-uploads, and gates progress on Goal Rules. Best for customer-facing onboarding.
AutonomousIndependent agentThe agent reasons over documents, makes decisions independently, and can self-correct. Best for complex, open-ended workflows.

Key Agent properties:

{
  "goal": "kyc_individual",
  "name": "Individual KYC Agent",
  "tenant_id": "your_tenant",
  "version": "1.0.0",
  "allow_cloud": true,
  "deployed": true,
  "definition": {
    "persona": "...",
    "goal_rules": [...],
    "checks": [...]
  }
}

allow_cloud: false routes all inference through your self-hosted model endpoint — no document data leaves your infrastructure.

Agents auto-snapshot on every save. When a Case is created, the exact agent version used is captured as an agent_snapshot so the audit trail is immutable. You can view version history and redeploy any previous version from the dashboard.

💡

See Agents for a step-by-step guide to building, testing, and deploying agents from the dashboard.


Cases

A Case is the unit of work. It represents one verification run for one subject.

A Case has a lifecycle:

collecting → processing → review → completed
  • collecting — Documents are being uploaded. The agent may be in conversation with the user.
  • processing — Extractions and checks are running.
  • review — Automated processing is done; a human reviewer has been flagged.
  • completed — A final decision has been made.

A Case contains:

  • Documents — uploaded files with their extracted data and check results
  • Messages — the conversation thread (for Guided and Autonomous agents)
  • Agent snapshot — the exact agent version frozen at case creation time
  • Goal progress — which Goal Rules have been satisfied, which are outstanding, and which failed

Cases are created against a specific Agent. The agent's definition at that moment is captured in agent_snapshot — a future change to the agent (or its rules) does not affect the audit record of any existing case.

💡

See Cases for details on creating cases, reviewing them, and using the case detail view.


Executions

An Execution is the recorded run of one processing step — an extraction, a check, a webhook delivery — within a case or a direct API call.

Each Execution captures:

  • statuspending, running, completed, failed
  • result — the structured output: extracted fields, or a check's verdict and confidence
  • latency_ms — wall-clock time for the invocation
  • from_self_hosted — whether inference ran on your infrastructure or the cloud

Executions are the basis for the audit log, analytics, and cost reporting. Every extraction, check verdict, rule evaluation, and webhook delivery has a corresponding Execution record.

Executions are immutable once completed. You can query them via the API but not modify or delete them — they are the evidentiary record for compliance and audit purposes.


How They Fit Together

A typical KYC verification flow:

Create a Case

Your backend creates a Case against the kyc_individual agent via POST /v1/cases.

Documents and selfie collected

The user uploads a PAN card and takes a selfie. Uploads are auto-classified and routed to the right Document Type.

Extraction and checks run

Fields are extracted; liveness, deepfake, face match, and document integrity checks produce verdicts. Each step is an Execution record.

Goal Rules evaluate

Deterministic rules (PAN checksum, name consistency) and verdict thresholds (liveness ≥ 0.9, face match ≥ 0.85) are checked against the results.

Decision or review

All rules pass → completed. A flagged verdict routes the case to review, where a reviewer sees each check's evidence — including timestamped markers in any video.

Webhook delivery

The final structured result — extracted data, check verdicts, rule outcomes — is delivered to your backend.

The agent definition, its Goal Rules, document type schemas, and all execution records are versioned and immutable. Six months later you can reconstruct exactly what happened in any case.


Further reading

Checks & Goal Rules

What each fraud check catches and how policy gates decisions. Start with the Checks Overview.

Platform Guide

Step-by-step guides to Cases, Agents, Playground, Document Types, Analytics, and Admin from the dashboard. Start with Dashboard Overview.

Build a KYC Agent

End-to-end guide: create a document type, define Goal Rules, test, and deploy. See Build a KYC Agent.

SDK Reference

Run verifications and manage cases from your code. Python SDK and Java SDK.