<?xml version="1.0" encoding="UTF-8"?>
<rfc category="info"
     docName="draft-nunez-mfop-federated-ai-orchestration-00"
     ipr="noModificationTrust200902"
     submissionType="independent"
     xml:lang="en"
     version="3">

  <front>
    <title abbrev="MFOP">Mahalaxmi Federation and Orchestration Protocol (MFOP)</title>

    <seriesInfo name="Internet-Draft"
                value="draft-nunez-mfop-federated-ai-orchestration-00"
                status="informational"/>

    <author fullname="Ami Hoepner Nunez" initials="A." surname="Nunez">
      <organization>ThriveTech Services LLC</organization>
      <address>
        <postal>
          <city>West Palm Beach</city>
          <region>FL</region>
          <country>United States of America</country>
        </postal>
        <email>ami.nunez@mahalaxmi.ai</email>
        <uri>https://mahalaxmi.ai/mfop/draft</uri>
      </address>
    </author>

    <date month="March" year="2026"/>

    <area>Applications and Real-Time</area>

    <keyword>federated AI</keyword>
    <keyword>orchestration</keyword>
    <keyword>compliance</keyword>
    <keyword>billing receipts</keyword>
    <keyword>distributed inference</keyword>
    <keyword>AI safety</keyword>

    <abstract>
      <t>
        This document defines the Mahalaxmi Federation and Orchestration
        Protocol (MFOP), a protocol for coordinating parallel artificial
        intelligence (AI) agent execution across a distributed network of
        heterogeneous compute nodes. MFOP specifies node identity and
        registration, capability advertisement, compliance-zone-aware job
        routing using database-layer enforcement, semantic input
        partitioning, cryptographically signed billing receipts,
        configurable economic settlement, and a layered security model
        comprising AI safety policy validation and execution sandbox
        isolation. The protocol is designed to operate across three
        simultaneous deployment configurations: private enterprise meshes,
        managed cloud pools, and open community marketplaces. MFOP is
        agnostic to the underlying AI model provider.
      </t>
    </abstract>

    <note title="Discussion Venues" removeInRFC="true">
      <t>
        Discussion of this document should take place at the MFOP discussion
        list maintained at https://mahalaxmi.ai/mfop/discuss. The current
        draft and revision history are maintained at
        https://mahalaxmi.ai/mfop/draft.
      </t>
    </note>

  </front>

  <middle>

    <section anchor="intro" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
        The growth of large language model (LLM) deployments across enterprise
        environments has created a need for a coordination layer that can span
        heterogeneous compute infrastructure while satisfying compliance,
        billing, and safety requirements that vary by jurisdiction and industry.
      </t>
      <t>
        MFOP addresses this need by defining a protocol for federated AI
        orchestration. A federation consists of one or more compute nodes,
        each of which may be operated by different entities under different
        compliance regimes. A submitter -- a user, application, or automated
        system -- presents a job to the federation. The federation routes the
        job to an appropriate node based on the job's compliance zone
        requirements, the node's capability advertisement, and the economic
        terms in effect.
      </t>
      <t>
        Existing distributed AI systems suffer from four specific limitations
        that this protocol addresses. First, they require complete trust between
        all participating nodes, making them unsuitable for multi-tenant or
        community-contributed compute deployments. Second, they lack
        fine-grained regulatory compliance zone enforcement at the data layer.
        Third, they provide no standardized economic model for compensating
        independent node operators with tamper-evident proof of work. Fourth,
        they do not provide a configurable, operator-adjustable economic fee
        model modifiable at runtime without code deployment.
      </t>
      <t>
        This specification defines the wire protocol, data formats,
        cryptographic mechanisms, and behavioral requirements for all
        components of a conforming MFOP federation. The full protocol
        specification is maintained at <xref target="MFOP-SPEC"/>.
      </t>
    </section>

    <section anchor="terminology" numbered="true" toc="default">
      <name>Terminology</name>
      <t>
        The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
        "OPTIONAL" in this document are to be interpreted as described in
        BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and
        only when, they appear in all capitals, as shown here.
      </t>
      <dl newline="false" spacing="normal">
        <dt>Federation:</dt>
        <dd>A logical grouping of one or more MFOP-conformant compute nodes
        operating under a shared governance configuration.</dd>
        <dt>Node:</dt>
        <dd>A compute resource registered with a federation that accepts,
        executes, and returns AI workloads. A node may be a single server,
        a cluster, or a cloud compute pool.</dd>
        <dt>Submitter:</dt>
        <dd>An entity (user, application, or automated system) that presents
        AI workloads to the federation for execution.</dd>
        <dt>Compliance Zone:</dt>
        <dd>A named policy context that constrains job routing, data handling,
        and output validation. Defined zones: public, enterprise (SOC2),
        hipaa, sox, fedramp.</dd>
        <dt>Job:</dt>
        <dd>A discrete unit of AI workload submitted to the federation for
        execution. A job carries a payload, compliance zone assertion, and
        billing authorization.</dd>
        <dt>Receipt:</dt>
        <dd>A cryptographically signed record of a completed job execution,
        including token counts, timestamps, node identity, and billing
        amounts.</dd>
        <dt>Economic Settlement:</dt>
        <dd>The process by which accumulated billing receipts are converted
        into financial transfers between submitters, node operators, and the
        platform.</dd>
        <dt>PAK Key (Platform API Key):</dt>
        <dd>A bearer credential issued by the platform that authorizes access
        to federation API endpoints.</dd>
      </dl>
    </section>

    <section anchor="node-identity" numbered="true" toc="default">
      <name>Node Identity and Registration</name>
      <t>
        Each node in a MFOP federation is identified by a stable, globally
        unique node identifier (node_id). The node_id is a 128-bit UUID
        (version 4) <xref target="RFC9562"/> assigned at registration time
        and persists across node restarts and software upgrades.
      </t>

      <section anchor="registration-flow" numbered="true" toc="default">
        <name>Registration Flow</name>
        <t>
          A node initiates registration by sending a NodeRegistrationRequest
          to the federation's registration endpoint
          (POST /v1/federation/nodes/register). The request MUST include:
        </t>
        <ul spacing="normal">
          <li>node_id: a candidate UUID (the federation MAY override this)</li>
          <li>operator_id: the UUID of the registering operator account</li>
          <li>display_name: a human-readable name (max 64 characters)</li>
          <li>public_key: an Ed25519 public key in base64url encoding</li>
          <li>capability_advertisement: a CapabilityAdvertisement object
          (see <xref target="capability-advertisement"/>)</li>
          <li>compliance_zones: the set of compliance zones the node is
          certified to handle</li>
          <li>endpoint_url: the HTTPS URL at which the node accepts job
          submissions</li>
        </ul>
        <t>
          The federation returns a NodeRegistrationResponse containing the
          assigned node_id, a registration_token for subsequent authenticated
          calls, and the federation's current billing configuration.
        </t>
      </section>

      <section anchor="key-rotation" numbered="true" toc="default">
        <name>Re-registration and Key Rotation</name>
        <t>
          Nodes MUST re-register when their Ed25519 key pair is rotated.
          During key rotation, the node submits a re-registration request
          with both the old and new public keys, signed with the old private
          key. The federation verifies the old-key signature before accepting
          the new key. There is a 24-hour overlap window during which receipts
          signed with either key are accepted.
        </t>
      </section>

      <section anchor="node-health" numbered="true" toc="default">
        <name>Node Health and Deregistration</name>
        <t>
          Nodes MUST send a heartbeat to
          POST /v1/federation/nodes/{id}/heartbeat at least once every 60
          seconds. A node that misses three consecutive heartbeat windows is
          marked INACTIVE and excluded from routing. Nodes may deregister
          voluntarily via DELETE /v1/federation/nodes/{id}.
        </t>
      </section>
    </section>

    <section anchor="capability-advertisement" numbered="true" toc="default">
      <name>Capability Advertisement</name>
      <t>
        A node's capability advertisement declares the AI models available
        on the node, the hardware characteristics relevant to job routing,
        and the compliance certifications held by the node operator.
      </t>

      <section anchor="capability-object" numbered="true" toc="default">
        <name>CapabilityAdvertisement Object</name>
        <t>The CapabilityAdvertisement object includes the following
        fields:</t>
        <ul spacing="normal">
          <li>models: an array of ModelDescriptor objects
          (see <xref target="model-descriptor"/>)</li>
          <li>hardware_class: one of { cpu, gpu_consumer, gpu_datacenter,
          tpu }</li>
          <li>vram_gb: total GPU VRAM in gigabytes (0 for CPU nodes)</li>
          <li>max_context_tokens: the maximum context window the node can
          service</li>
          <li>max_concurrent_jobs: the maximum number of simultaneous
          jobs</li>
          <li>compliance_certifications: an array of certification
          identifiers (e.g., "soc2-type2", "hipaa-baa",
          "fedramp-moderate")</li>
          <li>nemo_rails_version: the NeMo Guardrails runtime version
          installed</li>
        </ul>
      </section>

      <section anchor="model-descriptor" numbered="true" toc="default">
        <name>ModelDescriptor</name>
        <t>Each model available on a node is described by a
        ModelDescriptor:</t>
        <ul spacing="normal">
          <li>model_id: a canonical model identifier string</li>
          <li>model_family: one of { llama, mistral, gemma, falcon, phi,
          custom }</li>
          <li>parameter_count_b: approximate parameter count in
          billions</li>
          <li>quantization: one of { fp16, bf16, int8, int4, none }</li>
          <li>context_window_tokens: the maximum context window for this
          model</li>
          <li>supports_tool_use: boolean</li>
          <li>supports_vision: boolean</li>
        </ul>
      </section>

      <section anchor="capability-refresh" numbered="true" toc="default">
        <name>Capability Refresh</name>
        <t>
          Nodes MUST update their capability advertisement via
          PUT /v1/federation/nodes/{id}/capabilities whenever their available
          models or hardware configuration changes. The federation propagates
          updated capability advertisements to the routing layer within 30
          seconds.
        </t>
      </section>
    </section>

    <section anchor="compliance-routing" numbered="true" toc="default">
      <name>Compliance-Zone-Aware Job Routing</name>
      <t>
        MFOP routes each job to a node that satisfies the job's compliance
        zone requirements. Compliance zone satisfaction is a hard constraint:
        a job MUST NOT be routed to a node that is not certified for the
        job's compliance zone.
      </t>

      <section anchor="compliance-zones-list" numbered="true" toc="default">
        <name>Compliance Zones</name>
        <t>
          MFOP defines five compliance zones, ordered from least to most
          restrictive:
        </t>
        <ul spacing="normal">
          <li>public: No compliance requirements beyond the baseline NeMo
          safety rails.</li>
          <li>enterprise (SOC2): Requires SOC 2 Type II certification. Adds
          data residency detection, API credential exfiltration detection,
          and access logging enforcement.</li>
          <li>hipaa: Requires HIPAA BAA. Adds PHI pattern detection,
          PHI de-identification, and minimum-necessary output checks.</li>
          <li>sox: Requires SOX compliance controls. Adds financial PII
          isolation, price prediction blocking, and MNPI detection.</li>
          <li>fedramp: Requires FedRAMP authorization. Adds CUI handling,
          export control detection, and classification marking
          enforcement.</li>
        </ul>
      </section>

      <section anchor="routing-algorithm" numbered="true" toc="default">
        <name>Routing Algorithm</name>
        <t>
          When a job is received, the routing layer executes the following
          algorithm:
        </t>
        <ol spacing="normal">
          <li>Filter: Identify all nodes with status ACTIVE that are
          certified for the job's compliance zone.</li>
          <li>Filter: Remove nodes whose max_context_tokens is less than
          the job's estimated token count.</li>
          <li>Filter: Remove nodes whose max_concurrent_jobs is currently
          exhausted.</li>
          <li>Score: For each remaining node, compute a routing score:
          score = w_latency x latency_score + w_cost x cost_score +
          w_affinity x affinity_score. Default weights: w_latency = 0.4,
          w_cost = 0.4, w_affinity = 0.2.</li>
          <li>Select: Route to the highest-scoring node. On tie, select
          uniformly at random.</li>
        </ol>
        <t>
          If no node satisfies all filters, the job is queued with a
          configurable timeout (default: 120 seconds). If no node becomes
          available within the timeout, the federation returns HTTP 503
          with a Retry-After header.
        </t>
      </section>

      <section anchor="affinity-rules" numbered="true" toc="default">
        <name>Affinity Rules</name>
        <t>
          Submitters MAY specify affinity rules in their job submission:
        </t>
        <ul spacing="normal">
          <li>node_affinity: a list of preferred node_ids (soft
          preference)</li>
          <li>anti_affinity: a list of node_ids to exclude (hard
          constraint)</li>
          <li>geography: a preferred geographic region (ISO 3166-1 alpha-2
          country code)</li>
        </ul>
        <t>
          Affinity rules affect only the affinity_score component;
          compliance zone certification and capacity remain hard
          constraints.
        </t>
      </section>
    </section>

    <section anchor="partitioning" numbered="true" toc="default">
      <name>Semantic Input Partitioning</name>
      <t>
        For jobs whose input exceeds a single node's max_context_tokens,
        MFOP provides a semantic partitioning mechanism that splits the
        input into coherent sub-jobs, routes each sub-job independently,
        and aggregates the results.
      </t>

      <section anchor="partition-strategies" numbered="true" toc="default">
        <name>Partition Strategies</name>
        <t>MFOP defines three partition strategies:</t>
        <ul spacing="normal">
          <li>sliding_window: Splits the input into overlapping windows
          of configurable size and overlap. Suitable for tasks where
          context continuity at boundaries is important.</li>
          <li>semantic_boundary: Splits at detected semantic boundaries
          (paragraph breaks, section headers, topic transitions). Produces
          more coherent sub-jobs at the cost of variable sub-job
          sizes.</li>
          <li>task_decomposition: Interprets the input as a structured
          task list and routes each task as an independent sub-job.
          Requires the input to conform to the MFOP TaskList schema.</li>
        </ul>
      </section>

      <section anchor="partition-request" numbered="true" toc="default">
        <name>Partition Request</name>
        <t>
          A submitter requests partitioned execution by setting
          partition_strategy in the job submission. The federation's
          partition engine splits the input, assigns sub-job IDs
          (parent_job_id + sequence number), and routes each sub-job
          independently. Sub-jobs inherit the compliance zone and billing
          authorization of the parent job.
        </t>
      </section>

      <section anchor="aggregation" numbered="true" toc="default">
        <name>Aggregation</name>
        <t>
          Once all sub-jobs complete, the federation's aggregation layer
          assembles the results in sequence-number order. For
          sliding_window partitions, the aggregator de-duplicates content
          in the overlap regions using a longest-common-subsequence merge.
          The assembled result is returned to the submitter as a single
          JobResult with an array of sub_job_receipts.
        </t>
      </section>
    </section>

    <section anchor="billing-receipts" numbered="true" toc="default">
      <name>Cryptographically Signed Billing Receipts</name>
      <t>
        Every completed job execution produces a BillingReceipt signed by
        the executing node. Signed receipts are the authoritative record
        for economic settlement and dispute resolution.
      </t>

      <section anchor="receipt-structure" numbered="true" toc="default">
        <name>Receipt Structure</name>
        <t>A BillingReceipt contains:</t>
        <ul spacing="normal">
          <li>receipt_id: a UUID (version 4) unique to this receipt</li>
          <li>job_id: the UUID of the completed job</li>
          <li>node_id: the UUID of the executing node</li>
          <li>submitter_id: the UUID of the submitter</li>
          <li>model_id: the model used for execution</li>
          <li>compliance_zone: the compliance zone under which the job
          executed</li>
          <li>input_tokens: the number of input tokens processed</li>
          <li>output_tokens: the number of output tokens generated</li>
          <li>wall_time_ms: total execution time in milliseconds</li>
          <li>completed_at: RFC 3339 <xref target="RFC3339"/> timestamp
          of job completion</li>
          <li>fee_schedule_id: the UUID of the BillingFeeConfig in
          effect</li>
          <li>input_token_cost_usd: computed input token cost in USD
          (6 decimal places)</li>
          <li>output_token_cost_usd: computed output token cost in USD
          (6 decimal places)</li>
          <li>platform_fee_usd: the platform's fee for this job</li>
          <li>node_earnings_usd: the node operator's earnings</li>
          <li>total_cost_usd: total cost to the submitter</li>
        </ul>
      </section>

      <section anchor="signature-scheme" numbered="true" toc="default">
        <name>Signature Scheme</name>
        <t>
          Receipts are signed using Ed25519. The node signs the canonical
          JSON serialization of the receipt (keys sorted
          lexicographically, no whitespace) with its registered private
          key. The signature is base64url-encoded and included in the
          receipt as the signature field.
        </t>
        <t>
          The federation verifies the receipt signature upon receipt using
          the node's registered public key. Receipts with invalid
          signatures MUST be rejected and MUST trigger a node integrity
          alert.
        </t>
      </section>

      <section anchor="receipt-storage" numbered="true" toc="default">
        <name>Receipt Storage and Retrieval</name>
        <t>
          The federation stores all receipts for a minimum of 7 years to
          support compliance audit requirements. Submitters may retrieve
          their receipts via GET /v1/federation/receipts. Node operators
          may retrieve receipts via
          GET /v1/federation/nodes/{id}/receipts.
        </t>
      </section>
    </section>

    <section anchor="economic-settlement" numbered="true" toc="default">
      <name>Configurable Economic Settlement</name>
      <t>
        MFOP separates billing (the accumulation of signed receipts) from
        settlement (the financial transfer of funds). Settlement is
        configurable and may occur on different schedules for different
        participant types.
      </t>

      <section anchor="billing-fee-config" numbered="true" toc="default">
        <name>BillingFeeConfig</name>
        <t>
          The platform administrator configures fee rates via a
          BillingFeeConfig object. Each BillingFeeConfig has a version
          identifier and an effective date. A new config may be created
          at any time; it takes effect at the start of the next billing
          period. BillingFeeConfig fields:
        </t>
        <ul spacing="normal">
          <li>input_token_rate_usd_per_1k: USD charged per 1,000 input
          tokens</li>
          <li>output_token_rate_usd_per_1k: USD charged per 1,000 output
          tokens</li>
          <li>platform_fee_pct: the platform's percentage of total token
          cost (0-100)</li>
          <li>node_revenue_share_pct: the node operator's percentage
          (0-100)</li>
          <li>settlement_period_days: how often settlement runs</li>
          <li>minimum_payout_usd: minimum accumulated earnings before a
          payout is issued</li>
        </ul>
      </section>

      <section anchor="submitter-billing" numbered="true" toc="default">
        <name>Submitter Billing</name>
        <t>
          Submitters are billed on a postpay basis. At the end of each
          settlement period, the federation aggregates all receipts for
          the submitter and charges the payment method on file. The
          invoice includes an itemized list of job receipts, grouped by
          compliance zone and model.
        </t>
      </section>

      <section anchor="node-settlement" numbered="true" toc="default">
        <name>Node Operator Settlement</name>
        <t>
          Node operators are paid out at the end of each settlement
          period, provided their accumulated earnings exceed the
          minimum_payout_usd threshold. Operators who do not meet the
          threshold roll their earnings forward to the next period.
        </t>
      </section>
    </section>

    <section anchor="security" numbered="true" toc="default">
      <name>Security Model</name>
      <t>
        MFOP implements a three-layer security model: transport security,
        AI safety policy validation, and execution sandbox isolation.
      </t>

      <section anchor="transport-security" numbered="true" toc="default">
        <name>Transport Security</name>
        <t>
          All MFOP API endpoints MUST be served over HTTPS using TLS 1.3
          or higher <xref target="RFC8446"/>. Mutual TLS (mTLS) is
          RECOMMENDED for node-to-federation communication in private
          enterprise mesh deployments. API authentication uses PAK Keys
          transmitted as the X-Channel-API-Key HTTP header. PAK Keys are
          256-bit random values encoded in base64url.
        </t>
      </section>

      <section anchor="ai-safety" numbered="true" toc="default">
        <name>AI Safety Policy Validation</name>
        <t>
          All job inputs and outputs MUST be validated against NeMo
          Guardrails policies before execution and before delivery to the
          submitter. The baseline policy set (required for all compliance
          zones) includes jailbreak detection and blocking, harmful
          content detection, PII leakage detection in outputs, and prompt
          injection detection. Nodes MUST run the NeMo Guardrails runtime
          version specified in their capability advertisement. Nodes
          running outdated versions MUST be flagged as DEGRADED and
          excluded from routing for compliance zones requiring features
          not present in the installed version.
        </t>
      </section>

      <section anchor="sandbox" numbered="true" toc="default">
        <name>Execution Sandbox Isolation</name>
        <t>
          Each job MUST execute in an isolated sandbox. Nodes MUST
          implement sandbox isolation using one of the following
          mechanisms: gVisor (runsc), RECOMMENDED for cloud deployments;
          Firecracker microVMs, RECOMMENDED for bare-metal deployments;
          or WASM (Wasmtime), permitted for CPU-only inference workloads.
          Sandboxes MUST be destroyed and recreated between jobs.
          Job-specific state MUST NOT persist between jobs.
        </t>
      </section>

      <section anchor="audit-logging" numbered="true" toc="default">
        <name>Audit Logging</name>
        <t>
          All job routing decisions, receipt signatures, and settlement
          events MUST be written to an append-only audit log. The audit
          log is cryptographically chained using SHA-256 hashes. Only
          append operations are permitted.
        </t>
      </section>
    </section>

    <section anchor="wire-protocol" numbered="true" toc="default">
      <name>Wire Protocol</name>
      <t>
        MFOP uses JSON over HTTPS for all API communication. WebSocket
        connections are supported for streaming job output.
      </t>

      <section anchor="request-response" numbered="true" toc="default">
        <name>Request and Response Format</name>
        <t>
          All request and response bodies are UTF-8 encoded JSON. Requests
          MUST include Content-Type: application/json. Successful
          responses use HTTP 200 or 201. Error responses use the standard
          error envelope:
        </t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
{ "error": { "code": "", "message": "", "details": {} } }
        ]]></artwork>
        <t>
          Standard error codes: UNAUTHORIZED, FORBIDDEN, NOT_FOUND,
          VALIDATION_ERROR, QUOTA_EXCEEDED, NO_ELIGIBLE_NODE,
          COMPLIANCE_VIOLATION, INTERNAL_ERROR.
        </t>
      </section>

      <section anchor="streaming" numbered="true" toc="default">
        <name>Streaming Output</name>
        <t>
          Nodes that support streaming output expose a WebSocket endpoint
          at wss://{node_endpoint}/v1/jobs/{id}/stream. The node streams
          token output as JSON-framed delta messages:
        </t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
{ "type": "delta", "text": "...", "token_count": N }
        ]]></artwork>
        <t>The stream is terminated with a completion message:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
{ "type": "done", "receipt": { ... } }
        ]]></artwork>
      </section>

      <section anchor="idempotency" numbered="true" toc="default">
        <name>Idempotency</name>
        <t>
          Job submission requests SHOULD include an Idempotency-Key
          header (UUID). If a request with the same Idempotency-Key is
          received within 24 hours, the federation returns the original
          response without re-executing the job.
        </t>
      </section>
    </section>

    <section anchor="iana" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
        This document has no IANA actions.
      </t>
    </section>

    <section anchor="security-considerations" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
        MFOP uses Ed25519 asymmetric signatures for billing receipt
        integrity. The security of this mechanism depends on the secrecy of
        each node's private key. Implementations SHOULD store private keys
        in the operating system keychain or a hardware security module (HSM)
        and MUST NOT transmit private keys over any network channel.
      </t>
      <t>
        Replay attacks against billing receipts are mitigated by the
        platform-issued nonce mechanism described in
        <xref target="signature-scheme"/>. Implementations MUST enforce
        nonce uniqueness and expiration.
      </t>
      <t>
        Compliance zone enforcement is implemented at the database query
        layer using a generalized inverted index (GIN) on the node's
        compliance_zones array column, ensuring that nodes not certified for
        a compliance zone cannot appear in the eligible node set regardless
        of application-layer logic. Implementations MUST additionally verify
        that the compliance_zone field in a completed receipt matches the
        compliance_zone declared in the original job submission.
      </t>
      <t>
        The execution sandbox isolation requirement
        (<xref target="sandbox"/>) protects submitter credentials and work
        content from node operators. Credentials are injected at cycle
        initialization using a platform-issued session key and are not
        stored on the node filesystem. Nodes MUST report their sandbox
        implementation version in every heartbeat.
      </t>
      <t>
        All MFOP API endpoints MUST be served over TLS 1.3 or higher
        <xref target="RFC8446"/>. mTLS is REQUIRED in fedramp compliance
        zone deployments.
      </t>
      <t>
        The composite AI safety policy attestation hash (SHA-256 of the
        concatenation of baseline, compliance zone, and domain policy
        hashes) provides cryptographic evidence of the safety policy
        configuration active at execution time. Policy hash deviations
        detected via heartbeat MUST result in immediate node suspension.
      </t>
      <t>
        The append-only audit log (<xref target="audit-logging"/>) provides
        a tamper-evident record of all federation activity via SHA-256
        chaining. Audit log storage MUST implement appropriate access
        controls to protect confidentiality of log contents in regulated
        environments.
      </t>
    </section>

  </middle>

  <back>

    <references>
      <name>References</name>

      <references>
        <name>Normative References</name>

        <reference anchor="RFC2119"
                   target="https://www.rfc-editor.org/info/rfc2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement
            Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner"/>
            <date month="March" year="1997"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>

        <reference anchor="RFC8174"
                   target="https://www.rfc-editor.org/info/rfc8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key
            Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba"/>
            <date month="May" year="2017"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>

        <reference anchor="RFC8446"
                   target="https://www.rfc-editor.org/info/rfc8446">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version
            1.3</title>
            <author initials="E." surname="Rescorla"
                    fullname="E. Rescorla"/>
            <date month="August" year="2018"/>
          </front>
          <seriesInfo name="RFC" value="8446"/>
          <seriesInfo name="DOI" value="10.17487/RFC8446"/>
        </reference>

        <reference anchor="RFC3339"
                   target="https://www.rfc-editor.org/info/rfc3339">
          <front>
            <title>Date and Time on the Internet: Timestamps</title>
            <author initials="G." surname="Klyne" fullname="G. Klyne"/>
            <author initials="C." surname="Newman" fullname="C. Newman"/>
            <date month="July" year="2002"/>
          </front>
          <seriesInfo name="RFC" value="3339"/>
          <seriesInfo name="DOI" value="10.17487/RFC3339"/>
        </reference>

        <reference anchor="RFC9562"
                   target="https://www.rfc-editor.org/info/rfc9562">
          <front>
            <title>Universally Unique IDentifiers (UUIDs)</title>
            <author initials="K." surname="Davis" fullname="K. Davis"/>
            <author initials="B." surname="Peabody"
                    fullname="B. Peabody"/>
            <author initials="P." surname="Leach" fullname="P. Leach"/>
            <date month="May" year="2024"/>
          </front>
          <seriesInfo name="RFC" value="9562"/>
          <seriesInfo name="DOI" value="10.17487/RFC9562"/>
        </reference>

      </references>

      <references>
        <name>Informative References</name>

        <reference anchor="RFC8179"
                   target="https://www.rfc-editor.org/info/rfc8179">
          <front>
            <title>Intellectual Property Rights in IETF
            Technology</title>
            <author initials="S." surname="Bradner"
                    fullname="S. Bradner"/>
            <author initials="J." surname="Contreras"
                    fullname="J. Contreras"/>
            <date month="May" year="2017"/>
          </front>
          <seriesInfo name="BCP" value="79"/>
          <seriesInfo name="RFC" value="8179"/>
          <seriesInfo name="DOI" value="10.17487/RFC8179"/>
        </reference>

        <reference anchor="MFOP-SPEC">
          <front>
            <title>Mahalaxmi Federation and Orchestration Protocol
            Specification Version 1.0 Draft</title>
            <author initials="A." surname="Nunez"
                    fullname="Ami Hoepner Nunez"/>
            <date month="March" year="2026"/>
          </front>
          <refcontent>ThriveTech Services LLC</refcontent>
        </reference>

      </references>
    </references>

    <section anchor="rest-api" numbered="false" toc="default">
      <name>Appendix A: REST API Reference</name>
      <t>
        This appendix lists the MFOP REST API endpoints. All endpoints
        require an X-Channel-API-Key header unless noted otherwise.
        Base path: /v1/federation
      </t>
      <table align="left">
        <thead>
          <tr>
            <th>Method and Path</th>
            <th>Name</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>POST /v1/federation/nodes/register</td>
            <td>Node registration</td>
            <td>Register a new node with the federation.</td>
          </tr>
          <tr>
            <td>PUT /v1/federation/nodes/{id}/capabilities</td>
            <td>Capability update</td>
            <td>Update a node's capability advertisement.</td>
          </tr>
          <tr>
            <td>POST /v1/federation/nodes/{id}/heartbeat</td>
            <td>Node heartbeat</td>
            <td>Signal that the node is alive and accepting jobs.</td>
          </tr>
          <tr>
            <td>DELETE /v1/federation/nodes/{id}</td>
            <td>Node deregistration</td>
            <td>Voluntarily deregister a node.</td>
          </tr>
          <tr>
            <td>POST /v1/federation/jobs</td>
            <td>Job submission</td>
            <td>Submit a job to the federation for execution.</td>
          </tr>
          <tr>
            <td>GET /v1/federation/jobs/{id}</td>
            <td>Job status</td>
            <td>Retrieve the current status and result of a job.</td>
          </tr>
          <tr>
            <td>GET /v1/federation/jobs/{id}/receipt</td>
            <td>Job receipt</td>
            <td>Retrieve the signed billing receipt for a completed
            job.</td>
          </tr>
          <tr>
            <td>GET /v1/federation/receipts</td>
            <td>Submitter receipts</td>
            <td>List all receipts for the authenticated submitter.</td>
          </tr>
          <tr>
            <td>GET /v1/federation/nodes/{id}/receipts</td>
            <td>Node receipts</td>
            <td>List receipts for jobs executed by the node.</td>
          </tr>
          <tr>
            <td>GET /v1/federation/nodes/{id}/earnings</td>
            <td>Provider earnings</td>
            <td>Current period tokens, estimated earnings, last
            payout.</td>
          </tr>
          <tr>
            <td>GET /v1/federation/submitters/billing</td>
            <td>Submitter billing summary</td>
            <td>Current period cost and next billing date.</td>
          </tr>
          <tr>
            <td>PATCH /v1/admin/federation/billing-config</td>
            <td>Update fee model</td>
            <td>Admin only. Creates new BillingFeeConfig row.</td>
          </tr>
        </tbody>
      </table>
    </section>

    <section anchor="compliance-policies" numbered="false" toc="default">
      <name>Appendix B: Compliance Zone Policy Requirements</name>
      <t>
        Each compliance zone requires specific NeMo Guardrails policy
        capabilities beyond the baseline.
      </t>
      <table align="left">
        <thead>
          <tr>
            <th>Zone</th>
            <th>Required Rails Beyond Baseline</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>public</td>
            <td>Baseline only.</td>
          </tr>
          <tr>
            <td>enterprise (SOC2)</td>
            <td>Data residency marker detection. API credential
            exfiltration detection. Access logging enforcement.</td>
          </tr>
          <tr>
            <td>hipaa</td>
            <td>PHI pattern detection (names, DOB, MRN, ICD-10,
            diagnoses, insurance IDs). PHI de-identification rail.
            Minimum necessary output check.</td>
          </tr>
          <tr>
            <td>sox</td>
            <td>Financial PII isolation. Price prediction blocking.
            MNPI detection.</td>
          </tr>
          <tr>
            <td>fedramp</td>
            <td>CUI handling. Export control detection (EAR/ITAR).
            Classification marking enforcement.</td>
          </tr>
        </tbody>
      </table>
    </section>

    <section anchor="ipr-disclosure" numbered="false" toc="default">
      <name>Appendix C: IPR Disclosure</name>
      <t>
        The author has filed provisional patent applications with the
        United States Patent and Trademark Office (USPTO) covering certain
        mechanisms described in this specification. These applications,
        filed by ThriveTech Services LLC in March 2026, cover:
        compliance-zone routing enforcement using a GIN-indexed database
        array column; cryptographically signed work unit receipts and
        append-only billing ledger; configurable economic settlement with
        four fee modes; composite AI safety policy attestation hash;
        reputation-weighted federated node dispatch with rolling-window
        scoring; self-healing AI orchestration via signed patch registry
        and meta-instance correction cycles; manager-worker consensus
        orchestration with PTY-native spawning and shell environment
        capture; and escrow-gated AI token metering with actual-consumption
        billing.
      </t>
      <t>
        In accordance with BCP 79 <xref target="RFC8179"/>, the author
        discloses these pending patent applications. ThriveTech Services
        LLC is willing to grant licenses to implementors of this
        specification on reasonable and non-discriminatory (RAND) terms.
        Parties seeking licensing information should contact:
        ami.nunez@mahalaxmi.ai. A formal IPR disclosure will be filed
        at https://datatracker.ietf.org/ipr/ concurrent with or prior
        to submission of this Internet-Draft.
      </t>
    </section>

    <section anchor="acknowledgements" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>
        The author wishes to acknowledge the NVIDIA NeMo team for the NeMo
        Guardrails platform, which provides the foundational AI safety
        infrastructure referenced in this specification.
      </t>
    </section>

  </back>

</rfc>
