<?xml version="1.0" encoding="UTF-8"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     ipr="trust200902"
     submissionType="independent"
     category="exp"
     docName="draft-sogomonian-aiip-architecture-01"
     version="3">

  <front>
    <title abbrev="AIIP Architecture">Architecture for the Artificial Intelligence Internet Protocol (AIIP)</title>

    <author fullname="Aram Sogomonian" initials="A." surname="Sogomonian">
      <organization>Artificial Intelligence Internet Foundation (AIIF)</organization>
      <address>
        <postal>
          <country>US</country>
        </postal>
        <email>waterbottling@icloud.com</email>
      </address>
    </author>

    <date year="2025" month="November" day="2"/>

    <keyword>AIIP</keyword>
    <keyword>URI</keyword>
    <keyword>Autonomous Systems</keyword>
    <keyword>Robotics</keyword>
    <keyword>Gateway</keyword>
    <keyword>Compute</keyword>
    <keyword>Stateless Execution</keyword>
    <keyword>Execution Receipts</keyword>
    <keyword>Settlement Anchors</keyword>

    <abstract>
      <t>
        This document specifies the architectural model and core protocol behaviors for the
        Artificial Intelligence Internet Protocol (AIIP). AIIP provides a uniform way for
        agents, robots, tools, models, and services to be addressed and invoked either
        natively or through an HTTPS gateway. Beyond addressing, AIIP defines a
        <em>stateless compute</em> profile in which endpoints do not
        retain caller data and each invocation returns a signed <em>execution
        receipt</em>. Receipts are <bcp14>REQUIRED</bcp14> to be attested with Trusted Execution
        Environment (TEE) evidence and <bcp14>MAY</bcp14> additionally include zero-knowledge
        proofs (ZKPs). Receipts <bcp14>MAY</bcp14> also be anchored to external settlement
        systems without exposing user data.
      </t>
    </abstract>

    <note>
      <t>Work in Progress</t>
    </note>
  </front>

  <middle>

    <section anchor="intro" title="Introduction" numbered="true">
      <t>
        AIIP enables interoperable addressing and invocation of AI resources, including
        autonomous systems and human-facing services that delegate tasks to such systems.
        AIIP identifiers use the companion <tt>aiip</tt> URI scheme <xref target="AIIP-URI"/>.
        Interoperation with the existing Web is provided via an HTTPS gateway profile.
      </t>
      <t>
        The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 <xref target="RFC2119"/> and RFC 8174 <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.
      </t>
    </section>

    <section anchor="motivation" title="Motivation and Global Demand for AIIP" numbered="true">
      <t>
        Modern networks were designed for document delivery and passive data exchange over HTTP and HTTPS.
        Today, however, many connected systems perform physical actions with safety critical consequences.
        These systems require reliable control, safety enforcement, and verifiable execution guarantees
        beyond what HTTPS alone can provide.
      </t>
      <t>
        AIIP introduces a trust layer for autonomy. It ensures that each invocation is performed under an authenticated and authorized identity,
        is governed by declared safety policies, and results in a signed execution receipt that can be audited.
      </t>
      <t>
        A core requirement for autonomy is continuity. Network outages are inevitable, yet autonomous systems must remain operable
        and safe during disconnection.
      </t>
      <t>AIIP establishes the AIID namespace, enabling the following properties:</t>
      <ul>
        <li><t><em>AIID identity</em> for each AI resource or autonomous agent.</t></li>
        <li><t><em>Cryptographic verification</em> of origin and trust level.</t></li>
        <li><t><em>Portability across networks and mobility domains</em>.</t></li>
      </ul>
      <t>
        With these properties, AIIP supports globally interoperable autonomy that is addressable, controllable, verifiable, and safe across both connected and disconnected conditions.
      </t>

      <figure anchor="fig-gap" title="AIIP fills the Trust and Autonomy Gap">
        <artwork><![CDATA[
                      AUTONOMOUS ACTION (missing today)
                     +----------------------------------+
                     |   AIIP : Control, Safety,        |
                     |   Identity, Verifiable Trust     |
                     +----------------------------------+
                            ^
                            |
         +------------------+------------------+
         |                                     |
   HTTPS / HTTP                          IP Routing
(Document/Data Layer)            (Connectivity Only)
         +-------------------------------------+
        ]]></artwork>
      </figure>
    </section>

    <section anchor="terms" title="Terminology" numbered="true">
      <ul>
        <li><t><em>AI Resource</em>: An addressable agent, model, tool, task endpoint, or robot controller.</t></li>
        <li><t><em>AIIP Resolver</em>: Software that dereferences an <tt>aiip://</tt> URI to an actionable endpoint.</t></li>
        <li><t><em>Gateway</em>: An HTTPS service that accepts client HTTP requests, resolves embedded <tt>aiip://</tt> URIs, and translates results back into HTTP semantics.</t></li>
        <li><t><em>AIID</em>: The AIIF Identifier Authority operating the root namespace and allocation policy.</t></li>
        <li><t><em>Invocation Descriptor (IDesc)</em>: A JSON object returned by resolution that describes how to reach and authenticate to a resource, and which proofs and policies apply.</t></li>
        <li><t><em>Autonomous Identity (AID)</em>: A cryptographic identity for an AI resource or agent whose trust level may evolve based on attested execution history.</t></li>
      </ul>
    </section>

    <section anchor="overview" title="Architectural Overview" numbered="true">
      <t>
        AIIP follows a resolve-invoke pattern. Given an <tt>aiip://</tt> identifier, the
        client or gateway performs <xref target="resolution">Resolution</xref> to obtain
        an Invocation Descriptor and then performs a <xref target="messages">Message Exchange</xref>
        with the resource.
      </t>
      <figure anchor="fig-actors" title="Actors and Flows (simplified)">
        <artwork><![CDATA[
 Client --(A)--> Resolver --(B)--> Resource
    |                     |
    +-- via HTTPS --Gateway+
(A) Resolve aiip://...  (B) Invoke per descriptor
        ]]></artwork>
      </figure>
    </section>

    <section anchor="identifiers" title="Identifiers and Namespace (Dual Model)" numbered="true">
      <t>AIIP supports a dual namespace model to serve Web integrated services and autonomous objects:</t>
      <ol>
        <li><t><strong>Domain Based Names</strong> (service oriented): authority is a DNS name.
           Example: <tt>aiip://bank.example/service/payments</tt>.</t></li>
        <li><t><strong>Object Based Names</strong> (entity oriented): authority is an AIID allocated
           object namespace (for example <tt>aiid:org:1234</tt>) serialized into the authority or path.
           Example: <tt>aiip://id/aiid.org.1234/robot/forklift-42</tt>.</t></li>
      </ol>
      <t>
        The AIIF Identifier Authority (AIID) <bcp14>MUST</bcp14> ensure global uniqueness for object based allocations and <bcp14>SHOULD</bcp14> publish delegation metadata usable by resolvers.
      </t>
    </section>

    <section anchor="syntax" title="URI and Discovery (Summary)" numbered="true">
      <t>
        The normative URI syntax is defined in <xref target="AIIP-URI"/> and follows the generic URI conventions of <xref target="RFC3986"/>.
      </t>
      <t>
        HTTPS discovery uses any of the following mechanisms:</t><ul><li><t>HTTP <tt>Link</tt> headers (<xref target="RFC9110"/>)</t></li><li><t>HTML <tt>link rel="aiip"</tt></t></li><li><t><tt>/.well-known/aiip</tt> (<xref target="RFC8615"/>)</t></li></ul><t>
      </t>
      <t>
        Internationalization: non ASCII characters appearing in path or query components <bcp14>MUST</bcp14> be encoded in UTF-8 and the resulting octets <bcp14>MUST</bcp14> be percent encoded as per <xref target="RFC3987" section="3.1" format="default"/>.
      </t>
    </section>

    <section anchor="resolution" title="Resolution" numbered="true">
      <t>
        Resolution maps an <tt>aiip://</tt> URI to an Invocation Descriptor (IDesc). An IDesc is a small JSON object describing how to reach and authenticate to the resource.
      </t>
      <sourcecode type="json"><![CDATA[
{
  "version": "1",
  "endpoint": "mtls://robot-ctl.example:7443/act",
  "iface": "cmd.v1",
  "auth": { "scheme": "oauth2", "token_endpoint": "https://auth.example/token", "dpop": true },
  "proofs": { "jwks": "https://robot-ctl.example/.well-known/jwks.json", "result_sig": "JWS" }
}
      ]]></sourcecode>
      <t>
        Resolvers <bcp14>MUST</bcp14> validate the IDesc provenance and <bcp14>MUST</bcp14> reject conflicting or unverifiable data.
      </t>
    </section>

    <section anchor="messages" title="Message Model and Invocation" numbered="true">
      <t>
        AIIP defines a simple request and response envelope that can be carried over different transports (HTTPS, mTLS TCP, QUIC). The envelope is JSON; binary payloads are carried via base64url fields.
      </t>
      <sourcecode type="json"><![CDATA[
{
  "id": "b7f7cfd2-6c38-4d7a-8e5a-6f1e1d9e0a10",
  "target": "aiip://id/aiid.org.1234/robot/forklift-42",
  "iface": "cmd.v1",
  "method": "move",
  "params": { "to": "A3", "speed": 0.5 },
  "proof": { "type": "DPoP", "jwk_thumbprint": "..." }
}
      ]]></sourcecode>
      <t>
        Results <bcp14>SHOULD</bcp14> be authenticity protected (for example detached JWS <xref target="JWS"/>) and include a monotonic timestamp and policy flags.
      </t>
    </section>

    <section anchor="compute" title="Compute Realm (Stateless Execution)" numbered="true">
      <t>
        AIIP supports execution endpoints that do not retain caller data beyond the lifetime of a single invocation unless explicitly stated.
        Endpoints that do not persist data <bcp14>MUST</bcp14> advertise <tt>persistence</tt> equals <tt>none</tt> in their Invocation Descriptor.
      </t>
      <t>
        Implementations <bcp14>SHOULD</bcp14> make determinism explicit. If execution is non deterministic, responses <bcp14>MUST</bcp14> include transcript or seed commitments sufficient for external verification.
      </t>
    </section>

    <section anchor="policy" title="Policy Aware Invocation and Safety Claims" numbered="true">
      <t>AIIP resources <bcp14>MAY</bcp14> advertise policy claims in their IDesc indicating operational constraints that the endpoint enforces.</t>
      <sourcecode type="json"><![CDATA[
{
  "version": "1",
  "endpoint": "mtls://robot-ctl.example:7443/act",
  "iface": "cmd.v1",
  "policy": {
    "max_speed_mps": 0.5,
    "forbidden_zones": ["Z1","Z2"],
    "actuation": "allowed",
    "compliance": ["SOC2","ISO27001"]
  }
}
      ]]></sourcecode>
      <t>
        During network partition or degraded trust, endpoints <bcp14>MUST</bcp14> apply stricter safety defaults unless an explicit offline envelope authorizes otherwise.
      </t>
    </section>

    <section anchor="receipts" title="Execution Receipts" numbered="true">
      <t>
        Each successful invocation response <bcp14>MUST</bcp14> include a signed execution receipt proving that execution occurred under the advertised identity and policy.
        AIIP makes use of TEE based attestation evidence as defined by the RATS architecture <xref target="RFC9334"/>.
        Endpoints <bcp14>MAY</bcp14> additionally include zero knowledge proofs for enhanced trust minimization.
      </t>
      <t>
        A receipt <bcp14>SHOULD</bcp14> contain a result commitment, execution transcript hash or equivalent, timestamp, algorithm identifiers, and the attestation evidence or ZKP object.
        Receipts <bcp14>MUST</bcp14> be JWS protected and verifiable using a JWKS referenced from the Invocation Descriptor.
      </t>
    </section>

    <section anchor="offline" title="Offline and Delay Tolerant Execution" numbered="true">
      <t>
        AIIP supports disruption tolerant operation. When connectivity to external services is unavailable, endpoints <bcp14>MAY</bcp14> continue to operate within pre authorized offline envelopes.
      </t>
      <t>
        Receipts generated offline <bcp14>MUST</bcp14> remain verifiable using local keys and <bcp14>SHOULD</bcp14> be synchronized when connectivity is restored.
      </t>
    </section>

    <section anchor="settlement" title="Optional Settlement Anchors" numbered="true">
      <t>
        Compute receipts <bcp14>MAY</bcp14> be anchored to external settlement systems to provide independent auditability and economic finality. Settlement anchoring is optional and <bcp14>MUST NOT</bcp14> expose plaintext inputs.
      </t>
    </section>

    <section anchor="gateway" title="HTTPS Gateway Profile" numbered="true">
      <t>
        A conforming gateway accepts HTTPS requests, validates embedded <tt>aiip://</tt> URIs, performs Resolution, invokes the resource, and translates results into HTTP status codes and bodies.
      </t>
      <ul>
        <li><t>Transport security <bcp14>MUST</bcp14> be at least TLS 1.3 <xref target="RFC8446"/>.</t></li>
        <li><t>Authorization context from the Web session <bcp14>MUST</bcp14> be enforced. Tokens <bcp14>SHOULD</bcp14> be bound using DPoP <xref target="RFC9449"/> or mTLS.</t></li>
        <li><t>Result provenance <bcp14>MUST</bcp14> be verified. Unverifiable results <bcp14>MUST</bcp14> be rejected.</t></li>
        <li><t>Downgrade prevention: the gateway <bcp14>MUST NOT</bcp14> weaken authentication versus native AIIP.</t></li>
      </ul>
    </section>

    <section anchor="security" title="Security Considerations" numbered="true">
      <t>
        AIIP operations can trigger physical actions or financial effects. Implementations <bcp14>MUST</bcp14> authenticate peers, enforce authorization, and apply safety policy.
      </t>
    </section>

    <section anchor="privacy" title="Privacy Considerations" numbered="true">
      <t>
        Resolvers and gateways may expose metadata. Operators <bcp14>SHOULD</bcp14> minimize logging, apply retention limits, and prefer unlinkable proofs where feasible.
      </t>
    </section>

    <section anchor="iana" title="IANA Considerations" numbered="true">
      <t>
        This document makes no IANA requests beyond referencing the provisional registration of the <tt>aiip</tt> URI scheme in <xref target="AIIP-URI"/>.
      </t>
    </section>

  </middle>

  <back>
    <references title="Normative References">
      <reference anchor="AIIP-URI" target="https://datatracker.ietf.org/doc/draft-sogomonian-aiip-uri-scheme/">
        <front>
          <title>Artificial Intelligence Internet Protocol (AIIP) URI Scheme</title>
          <author initials="A." surname="Sogomonian"/>
          <date year="2025"/>
        </front>
      </reference>

      <reference anchor="RFC3986" target="https://www.rfc-editor.org/info/rfc3986">
        <front>
          <title>Uniform Resource Identifier (URI): Generic Syntax</title>
          <author initials="T." surname="Berners-Lee"/>
          <author initials="R." surname="Fielding"/>
          <author initials="L." surname="Masinter"/>
          <date year="2005" month="January"/>
        </front>
        <seriesInfo name="RFC" value="3986"/>
      </reference>

      <reference anchor="RFC3987" target="https://www.rfc-editor.org/info/rfc3987">
        <front>
          <title>Internationalized Resource Identifiers (IRIs)</title>
          <author initials="M." surname="Duerst"/>
          <author initials="M." surname="Suignard"/>
          <date year="2005" month="January"/>
        </front>
        <seriesInfo name="RFC" value="3987"/>
      </reference>

      <reference anchor="RFC8615" target="https://www.rfc-editor.org/info/rfc8615">
        <front>
          <title>Well-Known Uniform Resource Identifiers (URIs)</title>
          <author initials="M." surname="Nottingham"/>
          <date year="2019" month="May"/>
        </front>
        <seriesInfo name="RFC" value="8615"/>
      </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"/>
          <date year="2018" month="August"/>
        </front>
        <seriesInfo name="RFC" value="8446"/>
      </reference>

      <reference anchor="RFC9110" target="https://www.rfc-editor.org/info/rfc9110">
        <front>
          <title>HTTP Semantics</title>
          <author initials="R." surname="Fielding"/>
          <author initials="J." surname="Reschke"/>
          <date year="2022" month="June"/>
        </front>
        <seriesInfo name="RFC" value="9110"/>
      </reference>

      <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"/>
          <date year="1997" month="March"/>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
      </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"/>
          <date year="2017" month="May"/>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
      </reference>

      <reference anchor="RFC9334" target="https://www.rfc-editor.org/info/rfc9334">
        <front>
          <title>Remote Attestation Procedures (RATS) Architecture</title>
          <author initials="H." surname="Birkholz"/>
          <author initials="M." surname="Thaler"/>
          <author initials="T." surname="Fossati"/>
          <author initials="N." surname="Smith"/>
          <author initials="H." surname="Tschofenig"/>
          <date year="2023" month="January"/>
        </front>
        <seriesInfo name="RFC" value="9334"/>
      </reference>

      <reference anchor="RFC9449" target="https://www.rfc-editor.org/info/rfc9449">
        <front>
          <title>OAuth 2.0 Demonstrating Proof-of-Possession at the Application Layer (DPoP)</title>
          <author initials="D." surname="Fett"/>
          <author initials="B." surname="Campbell"/>
          <author initials="T." surname="Lodderstedt"/>
          <date year="2023" month="June"/>
        </front>
        <seriesInfo name="RFC" value="9449"/>
      </reference>

      <reference anchor="JWS" target="https://www.rfc-editor.org/info/rfc7515">
        <front>
          <title>JSON Web Signature (JWS)</title>
          <author initials="M." surname="Jones"/>
          <date year="2015" month="May"/>
        </front>
        <seriesInfo name="RFC" value="7515"/>
      </reference>
    </references>
  </back>

</rfc>
