OMDA — Open Mobile Document Agent

An open specification for turning documents into verified, cited records on the phone.

View the Project on GitHub open-mobile-document-agent/open-mobile-document-agent

OMDA — Open Mobile Document Agent Specification

Version: 0.1 (draft) · Date: 2026-11-26 · Editor: Mallikarjunayya Hiremath Sangamesh

OMDA is an open specification for turning paper and digital documents into verified, cited records on a phone, readable by any model and any agent.

The key words MUST, MUST NOT, SHOULD, SHOULD NOT and MAY are to be interpreted as described in RFC 2119 and RFC 8174. Machine-readable schemas live in /schemas; registries live in /registry.

Positioning

Principle across the spec: disclose, don’t prohibit. Gaps are allowed when labelled; hidden gaps are non-conformance.

§0 Scope and non-goals

OMDA covers reading, verifying, storing, answering from and exchanging documents held on the owner’s phone.

In scope: capture from camera, share sheet, files, screenshots, email attachments and NFC chips; extraction into evidenced assertions; deterministic verification; lineage; on-device store; answers; selective-disclosure export.

Out of scope: actions taken on the owner’s behalf (forms, renewals, payments, messages); indexing and retrieval algorithms (only the interface is specified); connecting to institutions to fetch documents; medical, legal or financial judgement.

§1 Conformance

A runtime reports the lowest level it fully meets and lists every gap.

Level Name Requires
L1 Read Capture, provenance, document identity (§3, §4)
L2 Evidenced Every assertion carries quote, region and page hash (§5)
L3 Verified Check registry and gate semantics (§6); generated answers cite (Answer model)
L4 Exchange Signed selective-disclosure packages (§11)

§2 Runtime and model slots

A slot is a role with an input/output contract; any model meeting it may fill it — OS-provided, bundled or remote. Schema.

Slot Input → output
ocr Page image → text lines with normalized boxes and confidence
layout Page image + OCR → blocks (text, table, MRZ zone, photo, signature), reading order, proposed segments; DoclingDocument-compatible
classifier Segment → doc_type + profile id (§7)
extraction Segment + profile field list → assertions (value, quote, region); output SHOULD be JSON-Schema constrained
embedding Text or assertion → vector; declares dimension and model
interpreter Question → query plan (§9)
answer_generator Question + retrieved items → answer with citations
matcher Quote + region crop → fuzzy_match score (§6)

§3 Capture and provenance

Every super document records how it entered the runtime. Schema.

Channels: camera, scanner, share_sheet, file_import, screenshot, email_attachment, nfc_chip, consumer:<id>, note.

§4 Document identity

Schema.

Level ID Answers Status values
Super document sd_ What was captured together? captured, processing, processed, failed
Segment sg_ Which logical document sits in the capture? proposed, confirmed, rejected
Document entity de_ Which real-world document is this? active, expired, superseded, archived
Relationships: supersedes, amends, attached_to, related, duplicate_of. Status: proposed → verified (deterministic evidence) → confirmed rejected.

§5 Assertion model

An assertion is one fact read from one document, carrying its own evidence. Schema · example.

Status ladder (strongest first; an answer inherits the weakest status it cites):

Status Meaning
issuer_signed Valid issuer signature (ePassport chip via ICAO passive authentication; ISO 18013-5 mDL)
confirmed Owner accepted the value
verified Passed a deterministic check
unverified Evidence present, no check applies
candidate Weak evidence or region mismatch; shown, never hidden
illegible The only valid reason to withhold a value
rejected / suppressed Excluded from answers and exports

§6 Verification

Checks are deterministic, offline and model-free; only they lift an assertion to verified. Models assist the gate only, capped at candidate. Registry: registry/checks.json; reference code: tools/omda_tools/checks.py.

Kind Tests Lifts to verified
checksum Check digit on one field (Verhoeff, Luhn, ISO 7064 mod 97) yes
structure Check digits across a structure (ICAO 9303 MRZ incl. composite) yes
cross_field Two sources agree (MRZ vs printed) yes
consistency Logical sense (issue before expiry) no
format Patterns and code lists (ISO 3166) no

§7 Domain profiles

A profile is a versioned registry file. v0.1 ships identity complete plus a template; health (FHIR mapping), education, travel, finance, insurance and property follow in v0.2. Schema.

§8 Store and security

§9 Agent interface

One operation set, defined as MCP tools and bound one-to-one to Android AppFunctions (the platform’s on-device MCP) and iOS App Intents. Query plan schema.

Operation Purpose
omda.query Structured query plan → assertions or entities with citations
omda.ask Natural-language question → answer (Answer model)
omda.retrieve Chunks or assertions with scores and regions, for the consumer’s own RAG
omda.list_entities / omda.get_entity Browse by doc type, entity status or subject
omda.ingest Hand a document into the store (channel consumer:<id>)
omda.request_grant Ask the owner for access (§8)
omda.propose_disclosure Build an exchange package (§11) for owner approval

§10 Skills manifest

A skill runs inside the runtime and analyses the owner’s store. Skills read and report; actions belong to products. Schema.

§11 Exchange

A package proves that a genuine conforming runtime read these values from a document the owner holds and that these checks passed. It does not prove the document is genuine unless a value is issuer_signed. Schema · example.

§12 Conformance suite

Conformance is proven by running a runtime against shared synthetic fixtures through the MCP binding.

Answer model

Kind Produced by Exportable
extracted Value taken directly from an assertion Yes (§11 rules)
derived Deterministic computation Yes (§11 rules)
generated Model composition via RAG over the store Never

Decision log

See DECISIONS.md.