Infrastructure Troptions
XXXIII.io · Document Operations Architecture · xxxiii.io

Architecture specification

Document Intelligence stack

System topology

CLOUDFLARE EDGE
  docs.unykorn.org (Pages)          doc-intel-api (Worker)
         |                                    |
         +----------------+-------------------+
                          |
          +---------------+---------------+
          |               |               |
     Workers AI      DOC_INTEL_KV     XRPL / IPFS
     (6 agents)     (proof index)    (optional anchor)
ComponentImplementationExposureStatus
Pages frontendStatic HTML — overview, workspace, generate, verifydocs.unykorn.orgLIVE
Worker APIapi.js router — health, AI, contract, company, anchordocs.unykorn.org/api/*LIVE
Workers AILlama 3.1 8B · BGE Base v1.5 embeddingsInternal bindingLIVE
KV storeDOC_INTEL_KV — proofs, profiles, embeddingsInternal bindingLIVE
XRPL anchorPure JS Ed25519 · AccountSet + Memos1.ripple.com submitPARTIAL
IPFS pinKubo via Cloudflare TunnelTunnel-dependentPARTIAL
Cron recovery*/5 * * * * anchor queue retryInternal triggerLIVE

Worker modules

api.js
API router

Request routing, CORS, cron self-healing, health monitoring. Endpoints for AI, batch, contract verify/list, company profiles, anchor operations.

ai-agents.js
Agent system

Six agents, thirteen templates, RAG pipeline, company profile injection, contract hashing and proof storage.

xrpl.js
XRPL codec

Binary codec and Ed25519 signing for AccountSet transactions with structured Memo payloads.

Six-agent pipeline

Agent 1
Extractor

Structured field extraction from raw document text.

Agent 2
Drafter

Template-based agreement generation with profile injection.

Agent 3
Compliance

ESIGN, UETA, Reg D, FINRA, KYC/AML review.

Agent 4
Reviewer

Final QA — completeness and enforceability.

Agent 5
Chat

RAG-backed document Q&A.

Agent 6
Capital compliance

UCC, ICC, Basel, ISDA for banking instruments.

Eight-step proof record

#StageOperationOutput
01InputPDF, text, or template via workspaceRaw content
02DraftDrafter agent + company profileContract text
03ComplianceCompliance agent reviewReviewed draft
04HashSHA-256 deterministic fingerprintHash + contract_id
05XRPLAccountSet + Memo when configuredTransaction hash
06StoreDual-index KV recordProof record
07IPFSCID pin via Kubo tunnelContent ID
08VerifyPublic /api/contract/verifyVerification result

Template catalog (13)

TemplateClassPrimary fields
NDAStandardparties, confidentiality period, jurisdiction
LOIStandardtransaction description, exclusivity, due diligence
SUBSCRIPTIONStandardinvestment amount, accreditation, risk acknowledgment
CONSULTINGStandardscope, compensation, IP ownership
TERM_SHEETStandardvaluation, equity percentage, liquidation preference
SIDE_LETTERStandardreference agreement, modifications
BROKER_AGREEMENTStandardcommission rate, FINRA disclosures
OPERATING_AGREEMENTStandardmembers, capital contributions, management
SBLCCapitalissuing bank, beneficiary, ICC reference
MTNCapitalface value, coupon, maturity, ISIN
CAPITAL_TERM_SHEETCapitalinstrument type, principal, yield, term
FUNDING_RIDERCapitaldisbursement schedule, conditions precedent
COLLATERAL_VERIFICATIONCapitalasset description, custodian, valuation date

EDITORIAL catalog maintained in worker; human review required before execution

API surface

MethodEndpointPurpose
GET/api/healthSystem health and version
POST/api/ai/generateGenerate document and anchor proof
POST/api/ai/extractStructured field extraction
POST/api/ai/complyCompliance review
POST/api/ai/capital-complyCapital instrument review
POST/api/ai/chatRAG-backed chat
POST/api/batchBatch generation and anchoring
GET/api/contract/verifyVerify proof by id or hash
GET/api/contract/listList anchored proofs
POST/api/companySave company profile
GET/api/company/:idRetrieve company profile
POST/api/anchorManual XRPL anchor
POST/api/anchor/ipfsIPFS pin + dual anchor

XXXIII.io integration

Infrastructure Troptions