Architectural views of the CORTEX Framework.
The framework is documented through five complementary architectural views that together constitute a 4+1 style description tailored to research-grade intelligent document processing: (i) the orchestrator graph, which captures the unidirectional choreography of agents; (ii) the high-level pipeline, exposing the macroscopic dataflow between enterprise ingestion and decision-support emission; (iii) the component decomposition, projecting each agent onto its internal subsystems; (iv) the typed data-flow view, formalising the algebra of envelopes, records and verdicts that cross stage boundaries; and (v) the cross-source validation topology, where consistency analysis is treated as a first-class kernel rather than a post-hoc quality check. Each view is presented at the level of formal abstraction required for independent evaluation, ablation, and reproducible engineering.
Orchestrator graph
Figure A0 portrays the orchestrator graph adopted as the canonical reference topology for the framework. A single root agent (CORTEX · ORCHESTRATOR) dispatches typed action tokens to five action branches — ingestion, document intelligence, cross-source validation, restriction analysis and emission — each of which is internally bifurcated into a wrapper rail (declarative adapters) and a python rail (numerical kernels). Cross-rail validation hops materialise the consistency checks described in §3.4; OK and FAIL terminals encode the typed result envelope, whose disjoint sum is consolidated at the END node. Animated cyan pulses depict the traversal of in-flight messages and are derived from a synthetic execution trace.
High-Level Architecture
At the macroscopic scale the framework reduces to a five-stage unidirectional pipeline. Enterprise documents enter through a typed acquisition boundary and traverse three cooperating agents whose responsibilities are mutually disjoint by construction. The pipeline is intentionally acyclic: feedback is expressed through provenance annotation and reprocessing, never through back-edges, which preserves the algebraic properties required for compositional reasoning and replay-based audit.
Component Decomposition
Each agent admits an internal decomposition into four canonical subsystems. The decomposition is intentionally symmetric across modules: an interface boundary (acquisition / adapters / catalogue), a computational kernel (extraction / consistency / symbolic evaluator), a provenance fabric (store / tracker / rationale builder) and an emission boundary (structured output / verdict / decision). Symmetry across modules enables reusing the same orchestration, observability and benchmarking infrastructure for all three agents and admits a single uniform ablation protocol.
Typed Data Flow
Information crossing stage boundaries is materialised as a small algebra of typed envelopes: Source bytes → Envelope[mime, provenance] → Record (schema-bound) → Verdict (agreement, confidence, evidence) → Decision (status, violations, rationale). Each transition is a total function over its declared input type; partial failure is encoded inside the envelope itself rather than expressed through exceptional control flow, eliminating an entire class of silent corruption observed in monolithic pipelines.
Cross-Source Validation Topology
The validation kernel of NEXUS is parameterised by an agreement function a(R, E) over the extracted record R and an indexed family of independent evidence sources E = {S₁,…,Sₙ}. Sources are weighted by an empirically calibrated reliability prior, and the kernel returns both a scalar confidence and a provenance tree that records every contributing source, transformation, and arbitration. The topology is deliberately fan-in/fan-out: it admits redundant sources to attenuate the variance of any individual extractor and supports principled disagreement resolution under heterogeneous reliability profiles.
Architectural invariants
Six invariants are preserved at every stage of the framework and constitute the contract under which formal reasoning, ablation studies and audit-grade traceability remain valid.
The runtime call-graph is a directed acyclic graph. Feedback is expressed through provenance and replay, never through back-edges, preserving the algebraic structure required for compositional reasoning.
Every stage is a total function over its declared input envelope; partial failure is represented inside the typed result rather than as exceptional control flow.
For every emitted decision δ there exists a closed provenance subgraph G(δ) admitting full causal replay against a stored evidence snapshot.
The constraint satisfaction problem solved by AEGIS is monotone in the set of active restrictions; adding a constraint never converts a reject into an approve.
Transient failures are contained at stage granularity through bounded queues, time-outs and bulkheads, eliminating the global stall modes characteristic of monolithic pipelines.
Every typed envelope crossing a stage boundary is observable at a single instrumentation surface, enabling closed-loop SLO enforcement and post-hoc analysis without re-execution.
Process automation substrate
The perception–arbitration–restriction core does not operate on isolated documents but inside a documentary regularisation lifecycle: an asset-bound case that accumulates evidence, human interventions and administrative state transitions until a terminal status is reached. Figure A5 projects the framework onto that lifecycle. Typed acquisition adapters abstract over the channel through which each document class arrives — authenticated portal, structured export, machine-readable feed or scanned artefact — so no architectural claim depends on any particular provider. Work is executed in bounded lots with idempotent retry and per-lot quarantine; the workflow kernel advances the case only when AEGIS returns a non-blocking status; and every act, machine or human, is appended to a single immutable ledger that simultaneously serves audit, process mining and model training.
One typed adapter per document class, each exposing fetch, normalise and evidence-hash operations. Channel heterogeneity — interactive portals, bulk exports, machine-readable feeds, scanned artefacts — is absorbed at this boundary and never leaks into the agent core.
Work is partitioned into bounded lots with per-lot isolation, exponential-backoff retry, deterministic ordering under a fixed seed, and a quarantine sink. Failure of a lot cannot propagate into a global stall, which makes throughput measurable under partial failure.
A declarative phase machine over the case alphabet Φ. Transitions are guarded by the AEGIS status; identity transitions (origin = destination) update evidence without advancing the case; every transition emits a signed event.
The authorisation surface. The human selects scope, reviews proposed transitions, and executes with live progress and pause / resume / finalise control. Decision remains human; only technical execution is delegated.
Append-only, content-addressed store of every envelope, transition, annotation and decision. It is simultaneously the audit trail, the process-mining substrate and the training corpus of the predictive layer — one surface, three consumers.
A retrieval-grounded conversational layer that answers managerial questions by composing typed queries over the ledger, returning the query and the aggregated row count alongside every assertion, and refusing to answer where no query supports the claim.
Observability and predictive feedback loop
Figure A6 renders the closed loop that converts operational execution into scientific measurement and back into operational guidance. Raw events are normalised into a canonical trace, deduplicated at visit granularity — a phase visited n times emits up to 3n event rows carrying the same residence duration, and naive summation inflates waiting time by that multiplicity — and projected into a directly-follows graph over the phase alphabet. From that graph the harness derives cycle time, residence time, rework ratio and queueing delay per phase; the same features drive an interpretable regressor that estimates residual cycle time for open cases. Predictions are not consumed autonomously: they are surfaced to the operator console as ranked attention, closing the loop without removing the human from the decision.
