<?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-ai-uri-scheme-01"
     version="3">

  <front>
    <title abbrev="AI URI">AI URI Scheme</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="October" day="2"/>

    <abstract>
      <t>
        This document specifies the experimental <tt>ai</tt> Uniform
        Resource Identifier (URI) scheme. The scheme provides a
        dedicated access point for Artificial Intelligence (AI)
        resources, enabling autonomous systems and robots to connect
        natively while allowing human-facing applications to
        interoperate via HTTPS gateways.
      </t>
    </abstract>
  </front>

  <middle>

    <section anchor="intro" title="Introduction">
      <t>
        The <tt>ai</tt> URI scheme identifies AI-addressable resources
        such as agents, models, tools, and tasks. Deployments
        <strong>MAY</strong> resolve <tt>ai:</tt> identifiers natively
        within AI systems and robots, or via HTTPS gateways for
        compatibility with existing web stacks.
      </t>
      <t>
        For clarity, this document uses the term <tt>AIIP</tt> to denote
        the <em>Artificial Intelligence Internet Protocol</em>, the
        operational protocol by which <tt>ai://</tt> resources are
        addressed, resolved, and invoked. While <tt>ai://</tt> is the
        URI scheme, <tt>AIIP</tt> defines resolution and interaction
        semantics.
      </t>
      <t>
        The key words <strong>MUST</strong>, <strong>MUST NOT</strong>,
        <strong>REQUIRED</strong>, <strong>SHALL</strong>,
        <strong>SHALL NOT</strong>, <strong>SHOULD</strong>,
        <strong>SHOULD NOT</strong>, <strong>RECOMMENDED</strong>,
        <strong>MAY</strong>, and <strong>OPTIONAL</strong> 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>
    </section>

    <section anchor="syntax" title="URI Syntax (Non-Normative)">
      <t>
        The scheme follows <xref target="RFC3986"/>. An informal summary
        is shown:
      </t>
      <sourcecode type="abnf"><![CDATA[
ai-uri = "ai:" hier-part [ "?" query ] [ "#" fragment ]
; hier-part, query, fragment per RFC 3986
      ]]></sourcecode>
      <t>Examples (illustrative only):</t>
      <sourcecode><![CDATA[
ai:/agent/forklift-42?task=load&zone=A3
ai://factory.example/pay?amount=10&currency=USD
      ]]></sourcecode>
    </section>

    <section anchor="web-integration"
             title="Web Integration and HTTPS Gateway Access">
      <t>
        Many user agents will not natively implement the <tt>ai</tt>
        scheme or the Artificial Intelligence Internet Protocol
        (<tt>AIIP</tt>). To enable immediate interoperability,
        deployments <strong>MAY</strong> expose <tt>ai://</tt> resources
        via HTTPS gateways so that end users remain on conventional
        websites while backends or trusted intermediaries invoke
        <tt>AIIP</tt>. In this model, a relying party (for example, an
        online bank) advertises an <tt>ai://</tt> endpoint and resolves
        it server-side or through a gateway; the user continues to
        interact over HTTPS without needing to understand <tt>ai://</tt>.
      </t>

      <section anchor="web-discovery" title="Discovery from HTTPS">
        <t>
          HTTPS origins that rely on <tt>AIIP</tt> <strong>SHOULD</strong>
          advertise their <tt>ai://</tt> endpoints using one or more of:
        </t>
        <ul>
          <li>
            <t><strong>HTTP Link header</strong> on responses:</t>
            <sourcecode type="http"><![CDATA[
Link: <ai://bank/service/payments>; rel="aiip"
]]></sourcecode>
          </li>
          <li>
            <t>
              <strong>HTML link relation</strong> for progressive
              enhancement:
            </t>
            <sourcecode><![CDATA[
<link rel="aiip" href="ai://bank/service/payments">
]]></sourcecode>
          </li>
          <li>
            <t>
              <strong>Well-known resource</strong> at
              <tt>/.well-known/aiip</tt>:
            </t>
            <sourcecode type="json"><![CDATA[
{
  "endpoint": "ai://bank/service/payments",
  "jwks":
    "https://www.bank.example/.well-known/aiip.jwks.json",
  "scopes": [
    "initiate-payment",
    "check-balance"
  ],
  "policy": {
    "auth": "oauth2",
    "mtls": true,
    "requireSignedResults": true
  }
}
]]></sourcecode>
          </li>
          <li>
            <t>
              <strong>DNS bootstrap (optional)</strong>, for example,
              <tt>SRV</tt> or <tt>TXT</tt> records:
            </t>
            <sourcecode><![CDATA[
_aiip._tcp.bank.example.  300 IN SRV 0 0 443
                          aiip.bank.example.
_aiip.bank.example.       300 IN TXT
                          "endpoint=ai://bank/service/payments"
]]></sourcecode>
          </li>
        </ul>
      </section>

      <section anchor="gateway-beavior"
               title="HTTPS to AIIP Gateway Behavior">
        <t>
          A conforming HTTPS to <tt>AIIP</tt> gateway <strong>MUST</strong>
          map an embedded <tt>ai://</tt> URI to an HTTPS URL under its
          control, perform <tt>AIIP</tt> resolution, and translate the
          result back into HTTPS semantics for the client. For example:
        </t>
        <sourcecode><![CDATA[
Original:
  ai://bank/service/payments?amount=10&currency=USD
Gateway :
  https://ai.example/gateway/bank/service/payments
  ?amount=10&currency=USD
]]></sourcecode>
        <t>Gateways <strong>MUST</strong>:</t>
        <ul>
          <li>
            <t>
              Parse and normalize the <tt>ai://</tt> URI; reject
              malformed or ambiguous inputs.
            </t>
          </li>
          <li>
            <t>
              Authenticate to the AI endpoint and verify provenance of
              responses (for example, JWS with a key discoverable via
              the origin's JWKS).
            </t>
          </li>
          <li>
            <t>
              Enforce authorization consistent with the user's web
              session (for example, token exchange, DPoP, or mTLS
              constraints).
            </t>
          </li>
          <li>
            <t>
              Preserve confidentiality and integrity at least equivalent
              to TLS 1.3 <xref target="RFC8446"/> and obey HTTP
              semantics <xref target="RFC9110"/>.
            </t>
          </li>
          <li>
            <t>
              Prevent downgrades; do not weaken authentication or
              authorization versus native <tt>AIIP</tt>.
            </t>
          </li>
        </ul>
      </section>

      <section anchor="no-ua-requirement"
               title="No Native AIIP Requirement for User Agents">
        <t>
          Web user agents <strong>NEED NOT</strong> implement
          <tt>AIIP</tt>. Sites may perform all AI resolution server-side
          or via a trusted gateway. This enables gradual deployment:
          users remain on HTTPS while services invoke <tt>ai://</tt>
          under the hood to complete actions (for example, initiating a
          payment).
        </t>
      </section>

      <section anchor="provenance"
               title="Provenance and Result Integrity">
        <t>
          Responses returned from <tt>AIIP</tt> resolution
          <strong>MUST</strong> include verifiable provenance (for
          example, a detached or embedded signature). Gateways and
          relying parties <strong>MUST</strong> reject unverifiable or
          policy-incompatible results. Implementations
          <strong>SHOULD</strong> publish a JWKS for verification and
          rotate keys per operational policy.
        </t>
      </section>
    </section>

    <section anchor="namespace" title="Namespace Administration">
      <t>
        To support global uniqueness and safe operation of autonomous
        systems, namespace administration for <tt>ai:</tt> identifiers is
        expected to be coordinated by the <em>Artificial Intelligence
        Internet Foundation (AIIF)</em>, which serves as the umbrella
        governance body. The <em>AIIF Registry Authority for Identifiers
        (AIID)</em> operates the AI Root Registry and administers
        identifier allocation and operational policy for
        <tt>ai://</tt> namespaces. This administrative role is separate
        from the technical specification of the scheme and protocol.
      </t>
    </section>

    <section anchor="security" title="Security Considerations">
      <t>
        Implementations that dereference <tt>ai:</tt> identifiers
        <strong>MUST</strong> authenticate endpoints and apply
        authorization and safety policies, especially when actions may
        control physical devices or financial operations. Gateways
        translating <tt>ai:</tt> to HTTPS <strong>MUST</strong> preserve
        provenance and provide transport security per
        <xref target="RFC8446"/> and semantics conforming to
        <xref target="RFC9110"/>.
      </t>
    </section>

    <section anchor="privacy" title="Privacy Considerations">
      <t>
        Accessing <tt>ai://</tt> resources through HTTPS gateways may
        expose metadata such as target identifiers, origin site, and
        timing information to intermediaries. Gateways
        <strong>SHOULD</strong> minimize logging, apply strict data
        retention limits, and avoid retaining identifiers longer than
        operationally necessary. Provenance and result signatures may
        contain linkable identifiers; deployments <strong>SHOULD</strong>
        apply least-privilege scopes and anonymization where appropriate.
      </t>
    </section>

    <section anchor="i18n" title="Internationalization Considerations">
      <t>
        Identifiers in <tt>ai://</tt> URIs follow
        <xref target="RFC3986"/>. Non-ASCII characters appearing in the
        path or query components <strong>MUST</strong> be
        percent-encoded. Any authority components mapped from DNS
        <strong>MUST</strong> follow IDNA processing where applicable. No
        additional internationalization mechanisms are defined by this
        document.
      </t>
    </section>

    <section anchor="iana" title="IANA Considerations">
      <t>
        This document requests Provisional registration of the
        <tt>ai</tt> URI scheme per <xref target="RFC7595"/>.
      </t>

      <section anchor="uri-reg" title="URI Scheme Registration">
        <t>
          This section provides the registration template for the
          <tt>ai</tt> URI scheme in accordance with
          <xref target="RFC7595"/> Section 3.4.
        </t>
        <sourcecode><![CDATA[
Scheme name: ai
Status: Provisional
Applications/protocols that use this scheme:
  AIIP (Artificial Intelligence Internet Protocol)
Contact:
  Aram Sogomonian <waterbottling@icloud.com>
Change controller:
  The author of this document (or a designated successor)
References:
  This document; RFC 3986; RFC 7595; RFC 8446; RFC 9110
Security considerations:
  See "Security Considerations" of this document
        ]]></sourcecode>
      </section>
    </section>

  </middle>

  <back>
    <references title="Normative References">
      <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="RFC7595"
                 target="https://www.rfc-editor.org/info/rfc7595">
        <front>
          <title>
            Guidelines and Registration Procedures for URI Schemes
          </title>
          <author initials="D." surname="Thaler"/>
          <author initials="T." surname="Hansen"/>
          <author initials="T." surname="Hardie"/>
          <date year="2015" month="June"/>
        </front>
        <seriesInfo name="RFC" value="7595"/>
      </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="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>
    </references>
  </back>

</rfc>
