<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp "&#160;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     docName="draft-cowles-aee-00"
     ipr="trust200902"
     submissionType="independent"
     category="exp"
    
     xml:lang="en"
     version="3">

  <front>
    <title abbrev="AEE">Agent Envelope Exchange (AEE): A Minimal JSON Envelope Format for Inter-Agent Communication</title>

    <seriesInfo name="Internet-Draft" value="draft-cowles-aee-00"/>

    <author fullname="Adam Cowles" initials="A." surname="Cowles">
      <organization>Quox Ltd</organization>
      <address>
        <postal>
          <city>London</city>
          <country>United Kingdom</country>
        </postal>
        <email>adam@quox.ai</email>
        <uri>https://quox.ai</uri>
      </address>
    </author>

    <date/>

    <area>Applications and Real-Time</area>
    <workgroup>Independent Submission</workgroup>

    <keyword>AI agents</keyword>
    <keyword>messaging</keyword>
    <keyword>envelope</keyword>
    <keyword>protocol</keyword>
    <keyword>interoperability</keyword>

    <abstract>
      <t>
        Agent Envelope Exchange (AEE) defines a minimal, transport-independent
        JSON envelope format for communication between autonomous AI agents,
        traditional services, and human participants. The envelope comprises
        14 well-defined fields that provide message identity, typing,
        correlation, tracing, priority, and extensibility without prescribing
        payload semantics or transport mechanisms. AEE separates the concerns
        of message routing and lifecycle management (the envelope) from
        domain-specific meaning (intent schemas), enabling portable,
        composable, and auditable workflows across heterogeneous agent
        frameworks. This document specifies the envelope structure, validity
        rules, conformance levels, entity identifier conventions, a reserved
        intent namespace for protocol negotiation, and a referencing strategy
        that avoids envelope nesting.
      </t>
    </abstract>
  </front>

  <middle>

    <!-- ===== Section 1: Introduction ===== -->
    <section>
      <name>Introduction</name>
      <t>
        The rapid proliferation of autonomous AI agent frameworks -- including
        LangGraph, AutoGen, CrewAI, and numerous proprietary systems -- has
        created a fragmented landscape for inter-agent communication. Each
        framework defines its own message structures, correlation mechanisms,
        and error conventions, making it difficult to compose workflows that
        span multiple agent runtimes or organizational boundaries.
      </t>
      <t>
        Existing approaches suffer from several deficiencies:
      </t>
      <ul>
        <li>
          <strong>No standard envelope format:</strong> Messages lack a
          consistent structure for identity, typing, and metadata, forcing
          each integration to define bespoke serialization.
        </li>
        <li>
          <strong>Lost causality:</strong> Without standardized correlation
          and reply-to semantics, tracing a request through a chain of
          agents requires framework-specific tooling.
        </li>
        <li>
          <strong>Coupled semantics:</strong> Many systems conflate the
          message container with the message content, making it impossible
          to validate routing independently of payload.
        </li>
        <li>
          <strong>Human exclusion:</strong> Most agent protocols treat
          human participants as external to the messaging model rather
          than as first-class senders and recipients.
        </li>
      </ul>
      <t>
        AEE addresses these problems by defining a minimal 14-field JSON
        envelope that standardizes message identity, type classification,
        sender/recipient addressing, intent declaration, correlation,
        distributed tracing hooks, priority signaling, execution constraints,
        payload carriage, and optional cryptographic signatures. The envelope
        is deliberately small and stable: it provides just enough structure
        for messages to be routed, correlated, traced, and validated, while
        delegating all domain-specific semantics to intent schemas that
        evolve independently.
      </t>
      <t>
        AEE does not prescribe a transport mechanism. Envelopes <bcp14>MAY</bcp14>
        be carried over HTTP, WebSocket, NATS, Kafka, Redis Streams, or any
        other reliable or unreliable channel. The protocol is intentionally
        transport-agnostic to maximize adoption across diverse deployment
        topologies.
      </t>
    </section>

    <!-- ===== Section 2: Conventions and Definitions ===== -->
    <section>
      <name>Conventions and Definitions</name>
      <t>
        The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
        "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>",
        "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>",
        "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>",
        "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and
        "<bcp14>OPTIONAL</bcp14>" 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>
      <t>
        The following terms are used throughout this document:
      </t>
      <dl>
        <dt>Envelope</dt>
        <dd>
          The top-level JSON object defined by this specification,
          containing metadata fields and a payload.
        </dd>
        <dt>Intent</dt>
        <dd>
          A namespaced identifier declaring the semantic purpose of
          a message. The intent determines which payload schema applies.
        </dd>
        <dt>Entity</dt>
        <dd>
          Any participant in AEE communication: an autonomous agent,
          a traditional service, a human operator, or a broadcast channel.
        </dd>
        <dt>Correlation</dt>
        <dd>
          The mechanism by which related messages (e.g., a task and its
          result) are linked via shared identifiers.
        </dd>
        <dt>MVE</dt>
        <dd>
          Minimal Viable Envelope. A subset of envelope fields sufficient
          for a particular conformance tier.
        </dd>
      </dl>
    </section>

    <!-- ===== Section 3: Envelope Format ===== -->
    <section anchor="envelope-format">
      <name>Envelope Format</name>
      <t>
        An AEE message is a JSON object <xref target="RFC8259"/> with
        exactly 14 top-level fields. The envelope is designed to be small,
        stable, and forward-compatible. The meaning of a message is
        determined by the combination of its "type" and "intent" fields;
        the "payload" carries intent-specific data whose schema is defined
        externally.
      </t>

      <table anchor="envelope-fields">
        <name>AEE Envelope Fields</name>
        <thead>
          <tr>
            <th>#</th>
            <th>Field</th>
            <th>Type</th>
            <th>Required</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>1</td>
            <td>v</td>
            <td>string</td>
            <td>Yes</td>
            <td>Envelope schema version. For this specification, the value MUST be "1".</td>
          </tr>
          <tr>
            <td>2</td>
            <td>id</td>
            <td>string</td>
            <td>Yes</td>
            <td>Unique message identifier. ULID or UUID <xref target="RFC4122"/> is RECOMMENDED. Minimum length: 8 characters.</td>
          </tr>
          <tr>
            <td>3</td>
            <td>ts</td>
            <td>string</td>
            <td>Yes</td>
            <td>Timestamp of message creation. ISO 8601 UTC format is RECOMMENDED (e.g., "2025-12-14T03:45:12Z"). Minimum length: 10 characters.</td>
          </tr>
          <tr>
            <td>4</td>
            <td>type</td>
            <td>string</td>
            <td>Yes</td>
            <td>Message type. MUST be one of: "task", "result", "event", "error", "stream".</td>
          </tr>
          <tr>
            <td>5</td>
            <td>from</td>
            <td>string</td>
            <td>Yes</td>
            <td>Sender entity identifier (see <xref target="entity-identifiers"/>). Minimum length: 1 character.</td>
          </tr>
          <tr>
            <td>6</td>
            <td>to</td>
            <td>string</td>
            <td>Yes</td>
            <td>Recipient entity identifier or channel (see <xref target="entity-identifiers"/>). Minimum length: 1 character.</td>
          </tr>
          <tr>
            <td>7</td>
            <td>intent</td>
            <td>string</td>
            <td>Yes</td>
            <td>Namespaced intent identifier declaring the semantic purpose of the message (see <xref target="intent-namespace"/>). Minimum length: 3 characters.</td>
          </tr>
          <tr>
            <td>8</td>
            <td>corr</td>
            <td>string</td>
            <td>Yes</td>
            <td>Correlation identifier linking all messages in a workflow or conversation thread. Minimum length: 8 characters.</td>
          </tr>
          <tr>
            <td>9</td>
            <td>reply_to</td>
            <td>string or null</td>
            <td>Conditional</td>
            <td>The "id" of the message being replied to. MUST be non-null (minimum 8 characters) when "type" is "result" or "error". SHOULD be null for other types.</td>
          </tr>
          <tr>
            <td>10</td>
            <td>trace</td>
            <td>object or null</td>
            <td>No</td>
            <td>Distributed tracing context with "trace_id" and "span_id" string properties. RECOMMENDED when an observability system is in use.</td>
          </tr>
          <tr>
            <td>11</td>
            <td>priority</td>
            <td>string</td>
            <td>Yes</td>
            <td>Message priority. MUST be one of: "low", "normal", "high", "urgent".</td>
          </tr>
          <tr>
            <td>12</td>
            <td>requires</td>
            <td>object or null</td>
            <td>No</td>
            <td>Execution constraints and expectations. Common keys include "timeout_ms" (number), "human_approval" (boolean), "evidence" (boolean), "format" (string), and "min_confidence" (number, 0 to 1). Unknown keys MUST be ignored by consumers.</td>
          </tr>
          <tr>
            <td>13</td>
            <td>payload</td>
            <td>object</td>
            <td>Yes</td>
            <td>Intent-specific data. The shape is defined by the intent schema, not by this specification. MUST be a JSON object.</td>
          </tr>
          <tr>
            <td>14</td>
            <td>sig</td>
            <td>object, string, or null</td>
            <td>No</td>
            <td>Optional cryptographic signature or authentication proof (see <xref target="signatures"/>).</td>
          </tr>
        </tbody>
      </table>

      <t>
        The following example shows a complete AEE envelope of type "task":
      </t>

      <artwork type="json"><![CDATA[
{
  "v": "1",
  "id": "01JFB2R1JZKQ9V3K8W8Y9W1F2A",
  "ts": "2025-12-14T03:45:12Z",
  "type": "task",
  "from": "agent.manager",
  "to": "agent.backup_auditor",
  "intent": "ops.backup.status.check",
  "corr": "01JFB2QX0K8X5K6ZJ9G2C0C1MW",
  "reply_to": null,
  "trace": {"trace_id": "9f3c", "span_id": "a12b"},
  "priority": "high",
  "requires": {
    "timeout_ms": 30000,
    "evidence": true,
    "human_approval": false
  },
  "payload": {"cluster": "node.lan", "window": "24h"},
  "sig": null
}
]]></artwork>

      <section anchor="json-schema-reference">
        <name>JSON Schema</name>
        <t>
          A normative JSON Schema (draft 2020-12) for the AEE v1 envelope
          is published alongside this specification. The schema validates
          envelope structure only; intent-specific payload validation is
          performed by separate schemas associated with each intent.
        </t>
        <t>
          The schema enforces all required fields, type constraints,
          enumeration values, and the conditional requirement that
          "reply_to" <bcp14>MUST</bcp14> be a non-null string of at least
          8 characters when "type" is "result" or "error". The schema
          sets "additionalProperties" to true at the top level to support
          forward compatibility.
        </t>
      </section>
    </section>

    <!-- ===== Section 4: Message Types ===== -->
    <section anchor="message-types">
      <name>Message Types</name>
      <t>
        The "type" field classifies the purpose and expected behavior of
        each envelope. Exactly five message types are defined:
      </t>
      <dl>
        <dt>task</dt>
        <dd>
          <t>
            A request to perform work. A "task" message sets an expectation
            that the recipient will eventually respond with either a "result"
            or an "error" envelope sharing the same "corr" value and a
            "reply_to" referencing this task's "id". The sender
            <bcp14>MAY</bcp14> specify execution constraints in the
            "requires" field (e.g., timeout, required evidence,
            human approval).
          </t>
        </dd>
        <dt>result</dt>
        <dd>
          <t>
            Successful completion of a task. The "reply_to" field
            <bcp14>MUST</bcp14> contain the "id" of the originating "task"
            envelope. The "payload" carries the intent-specific output
            of the completed work.
          </t>
        </dd>
        <dt>event</dt>
        <dd>
          <t>
            An informational signal that does not require a reply. Events
            are used for notifications, status broadcasts, and telemetry.
            The "reply_to" field <bcp14>SHOULD</bcp14> be null.
          </t>
        </dd>
        <dt>error</dt>
        <dd>
          <t>
            Unsuccessful completion of a task. The "reply_to" field
            <bcp14>MUST</bcp14> contain the "id" of the originating "task"
            envelope. The "payload" <bcp14>SHOULD</bcp14> include a "code"
            string, a human-readable "message" string, and a "retryable"
            boolean. Additional fields such as "backoff_ms" and
            "evidence_refs" <bcp14>MAY</bcp14> be included.
          </t>
        </dd>
        <dt>stream</dt>
        <dd>
          <t>
            A partial or progress update related to a task or long-running
            process. Stream messages allow the recipient to observe
            intermediate state without waiting for the final result.
            Multiple "stream" envelopes <bcp14>MAY</bcp14> share the
            same "corr" and precede the terminal "result" or "error".
          </t>
        </dd>
      </dl>

      <t>
        The following example shows a "result" envelope responding to the
        task shown in <xref target="envelope-format"/>:
      </t>
      <artwork type="json"><![CDATA[
{
  "v": "1",
  "id": "01JFB2S7T8N4J8B7QH1GJ8Z1Y2",
  "ts": "2025-12-14T03:45:20Z",
  "type": "result",
  "from": "agent.backup_auditor",
  "to": "agent.manager",
  "intent": "ops.backup.status.check",
  "corr": "01JFB2QX0K8X5K6ZJ9G2C0C1MW",
  "reply_to": "01JFB2R1JZKQ9V3K8W8Y9W1F2A",
  "trace": {"trace_id": "9f3c", "span_id": "b77c"},
  "priority": "high",
  "requires": {"evidence": true},
  "payload": {
    "status": "PARTIAL_FAILURE",
    "failed": [
      {"node": "pve02", "reason": "connection_refused:8007"}
    ],
    "confidence": 0.96,
    "evidence_refs": ["log:pbs01:job/2025-12-14T02:00Z"]
  },
  "sig": null
}
]]></artwork>

      <t>
        The following example shows an "error" envelope:
      </t>
      <artwork type="json"><![CDATA[
{
  "v": "1",
  "id": "01JFB2T3W9H0J1FQWQ7B2M3D5E",
  "ts": "2025-12-14T03:45:21Z",
  "type": "error",
  "from": "agent.backup_auditor",
  "to": "agent.manager",
  "intent": "ops.backup.status.check",
  "corr": "01JFB2QX0K8X5K6ZJ9G2C0C1MW",
  "reply_to": "01JFB2R1JZKQ9V3K8W8Y9W1F2A",
  "trace": {"trace_id": "9f3c", "span_id": "c01d"},
  "priority": "high",
  "requires": {"evidence": true},
  "payload": {
    "code": "E_TIMEOUT",
    "message": "PBS API did not respond within 30s",
    "retryable": true,
    "backoff_ms": 60000,
    "evidence_refs": ["tcp:pve02->pbs01:8007"]
  },
  "sig": null
}
]]></artwork>
    </section>

    <!-- ===== Section 5: Entity Identifiers ===== -->
    <section anchor="entity-identifiers">
      <name>Entity Identifiers</name>
      <t>
        The "from" and "to" fields accept any entity identifier string.
        AEE treats all participants -- autonomous agents, traditional
        services, human operators, and broadcast channels -- as first-class
        senders and recipients. There is no distinction at the envelope
        level between a message sent by a human and one sent by an agent.
      </t>

      <section>
        <name>Identifier Format</name>
        <t>
          The <bcp14>RECOMMENDED</bcp14> identifier format is:
        </t>
        <artwork><![CDATA[
<type>.<name>
]]></artwork>
        <t>
          where "type" indicates the entity category and "name" is a
          locally unique identifier within that category. Implementations
          <bcp14>MAY</bcp14> use any unique string, but the typed format
          improves debuggability and log readability.
        </t>
      </section>

      <section>
        <name>Common Type Prefixes</name>
        <t>
          The following type prefixes are defined as conventions. This
          list is not exhaustive; implementations <bcp14>MAY</bcp14>
          define additional prefixes.
        </t>
        <dl>
          <dt>agent.*</dt>
          <dd>
            Autonomous agents (e.g., "agent.backup_auditor",
            "agent.code_reviewer").
          </dd>
          <dt>service.*</dt>
          <dd>
            Traditional (non-agent) services (e.g., "service.billing",
            "service.auth").
          </dd>
          <dt>human.*</dt>
          <dd>
            Human participants (e.g., "human.adam", "human.ops_lead").
          </dd>
          <dt>bus.*</dt>
          <dd>
            Broadcast channels or topic-based routing targets
            (e.g., "bus.ops", "bus.alerts").
          </dd>
        </dl>
      </section>

      <section>
        <name>Causality Tracing Across Entity Types</name>
        <t>
          When a human initiates a task that cascades through multiple
          agents, the full causality chain is traceable through the
          combination of "from", "to", "corr", and "reply_to" fields.
          For example, a chain such as "human.adam" to "agent.router" to
          "agent.reviewer" to "service.linter" maintains complete
          provenance regardless of entity type at each hop.
        </t>
      </section>
    </section>

    <!-- ===== Section 6: Validity Rules ===== -->
    <section anchor="validity-rules">
      <name>Validity Rules</name>
      <t>
        The following rules are normative. An AEE envelope that violates
        any <bcp14>MUST</bcp14>-level rule is invalid and
        <bcp14>SHOULD</bcp14> be rejected by conforming implementations.
      </t>
      <ol>
        <li>
          The fields "v", "id", "ts", "type", "from", "to", "intent",
          "corr", "priority", and "payload" <bcp14>MUST</bcp14> be
          present in every envelope.
        </li>
        <li>
          The "type" field <bcp14>MUST</bcp14> contain one of the
          following values: "task", "result", "event", "error", "stream".
        </li>
        <li>
          If "type" is "result" or "error", the "reply_to" field
          <bcp14>MUST</bcp14> be present and <bcp14>MUST</bcp14> be a
          non-null string with a minimum length of 8 characters,
          corresponding to the "id" of the originating "task" envelope.
        </li>
        <li>
          The "payload" field <bcp14>MUST</bcp14> be a JSON object. The
          structure of the payload is defined by the intent schema
          associated with the "intent" value.
        </li>
        <li>
          The "v" field <bcp14>MUST</bcp14> contain the string "1" for
          envelopes conforming to this version of the specification.
        </li>
        <li>
          The "priority" field <bcp14>MUST</bcp14> contain one of the
          following values: "low", "normal", "high", "urgent".
        </li>
        <li>
          Unknown top-level fields <bcp14>MUST</bcp14> be ignored by
          consumers. This ensures forward compatibility: future versions
          or extensions may add fields without breaking existing
          implementations.
        </li>
        <li>
          Consumers <bcp14>SHOULD</bcp14> log at minimum the following
          fields for observability: "id", "corr", "intent", "from",
          "to", "type", and "priority".
        </li>
        <li>
          Producers <bcp14>SHOULD</bcp14> include the "trace" field with
          "trace_id" and "span_id" values when an observability or
          distributed tracing system is in use.
        </li>
        <li>
          Within the "requires" object, unknown keys <bcp14>MUST</bcp14>
          be ignored by consumers. Producers <bcp14>SHOULD</bcp14>
          keep the "requires" object compact.
        </li>
      </ol>
    </section>

    <!-- ===== Section 7: Conformance Levels ===== -->
    <section anchor="conformance-levels">
      <name>Conformance Levels</name>
      <t>
        AEE supports incremental adoption through two defined conformance
        tiers. Not every system needs full specification compliance on
        initial deployment.
      </t>

      <section>
        <name>MVE-Required (Schema-Valid)</name>
        <t>
          The Minimal Viable Envelope (MVE-Required) tier includes all
          fields required by the JSON Schema:
        </t>
        <ul>
          <li>"v"</li>
          <li>"id"</li>
          <li>"ts"</li>
          <li>"type"</li>
          <li>"from"</li>
          <li>"to"</li>
          <li>"intent"</li>
          <li>"corr"</li>
          <li>"priority"</li>
          <li>"payload"</li>
        </ul>
        <t>
          A system emitting envelopes with all 10 MVE-Required fields is
          fully schema-valid and interoperable with any AEE-compliant
          consumer. A system <bcp14>MAY</bcp14> claim MVE-Required
          compliance if:
        </t>
        <ol>
          <li>
            It emits envelopes with all 10 required fields.
          </li>
          <li>
            Those envelopes validate against the AEE v1 JSON Schema.
          </li>
          <li>
            The "reply_to" field is non-null for "result" and "error" types.
          </li>
        </ol>
        <t>
          MVE-Required certification attests to structural compliance
          only. It does not certify payload schema conformance, semantic
          correctness of intents, or support for the "aee.*" protocol
          intents defined in <xref target="intent-namespace"/>.
        </t>
      </section>

      <section>
        <name>MVE-5 (Log-Friendly)</name>
        <t>
          For logging, telemetry, and observability-only contexts, a
          5-field subset is recognized:
        </t>
        <ul>
          <li>"v"</li>
          <li>"id"</li>
          <li>"type"</li>
          <li>"from"</li>
          <li>"intent"</li>
        </ul>
        <t>
          MVE-5 is <strong>NOT</strong> schema-valid AEE. It is a
          convenience envelope for systems that only emit logs or
          telemetry and do not participate in request/response flows.
          MVE-5 envelopes:
        </t>
        <ul>
          <li>
            Can be parsed by AEE-aware log aggregators.
          </li>
          <li>
            Cannot be used for task/result correlation (missing "corr"
            and "reply_to").
          </li>
          <li>
            <bcp14>SHOULD NOT</bcp14> be sent to agents expecting
            full envelopes.
          </li>
        </ul>
      </section>
    </section>

    <!-- ===== Section 8: Signatures ===== -->
    <section anchor="signatures">
      <name>Signatures</name>
      <t>
        The "sig" field provides an <bcp14>OPTIONAL</bcp14> mechanism
        for cryptographic authentication and integrity verification of
        AEE envelopes. When signatures are used, the signing process
        <bcp14>SHOULD</bcp14> bind at minimum the following fields:
      </t>
      <ul>
        <li>"v"</li>
        <li>"id"</li>
        <li>"ts"</li>
        <li>"type"</li>
        <li>"from"</li>
        <li>"to"</li>
        <li>"intent"</li>
        <li>"corr"</li>
        <li>"reply_to"</li>
        <li>"payload"</li>
      </ul>
      <t>
        The "sig" field <bcp14>MAY</bcp14> be a JSON object or a string.
        When it is an object, the following structure is
        <bcp14>RECOMMENDED</bcp14>:
      </t>
      <artwork type="json"><![CDATA[
{
  "alg": "ed25519",
  "kid": "key-2",
  "value": "<base64-encoded-signature>"
}
]]></artwork>
      <dl>
        <dt>alg</dt>
        <dd>
          The signature algorithm. Ed25519 is <bcp14>RECOMMENDED</bcp14>
          for new implementations. HMAC-SHA256 ("HS256")
          <bcp14>MAY</bcp14> also be used in symmetric-key environments.
        </dd>
        <dt>kid</dt>
        <dd>
          Key identifier, enabling key rotation and multi-key
          environments.
        </dd>
        <dt>value</dt>
        <dd>
          The signature or HMAC value, typically Base64-encoded.
        </dd>
      </dl>
      <t>
        This specification does not define a key distribution mechanism.
        Deployments <bcp14>SHOULD</bcp14> establish key management
        procedures appropriate to their trust model. Future companion
        documents may define a security profile with detailed signing
        procedures, key exchange, and replay protection.
      </t>
    </section>

    <!-- ===== Section 9: Intent Namespace ===== -->
    <section anchor="intent-namespace">
      <name>Intent Namespace</name>
      <t>
        The "intent" field carries a namespaced identifier that declares
        the semantic purpose of a message. The intent determines which
        payload schema applies: each intent publishes separate schemas
        for "task", "result", and (optionally) "error" payloads. This
        separation means the envelope can be validated independently
        of payload content.
      </t>

      <section>
        <name>Naming Conventions</name>
        <t>
          The <bcp14>RECOMMENDED</bcp14> naming format uses flexible
          dotted notation:
        </t>
        <artwork><![CDATA[
<domain>.<subdomain>.<noun>.<verb>
]]></artwork>
        <t>
          Examples:
        </t>
        <ul>
          <li>"ops.network.port.probe"</li>
          <li>"ops.backup.status.check"</li>
          <li>"infra.proxmox.vm.create"</li>
          <li>"docs.summarize.with_citations"</li>
        </ul>
        <t>
          Verbs <bcp14>SHOULD</bcp14> be explicit (e.g., "check",
          "probe", "create", "summarize"). Implementations
          <bcp14>SHOULD</bcp14> avoid overloading a single intent with
          multiple optional behaviors. Intent schemas
          <bcp14>MAY</bcp14> be versioned independently of the AEE
          envelope specification.
        </t>
        <t>
          If two agents cannot agree on an intent identifier, they do
          not share semantics. The absence of a recognized intent is
          not an error; it simply indicates that the agents lack a
          shared vocabulary for that operation.
        </t>
      </section>

      <section>
        <name>Reserved Namespace: aee.*</name>
        <t>
          The "aee.*" namespace is reserved for protocol negotiation
          and context retrieval. These intents enable agents to discover
          capabilities, fetch context, and validate payloads without
          custom integration. They are protocol primitives, not
          orchestration mechanisms.
        </t>
        <t>
          The following core intents are defined:
        </t>

        <table anchor="aee-intents">
          <name>Reserved aee.* Protocol Intents</name>
          <thead>
            <tr>
              <th>Intent</th>
              <th>Purpose</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>aee.status.ping</td>
              <td>Liveness check. The recipient MUST respond with a result containing {"pong": true}.</td>
            </tr>
            <tr>
              <td>aee.status.health</td>
              <td>Health and readiness status. The result payload MUST include a "status" field with one of: "healthy", "degraded", "unhealthy".</td>
            </tr>
            <tr>
              <td>aee.spec.query</td>
              <td>Return supported AEE version and capabilities. The result MUST include "aee_version" and MAY include an "extensions" array.</td>
            </tr>
            <tr>
              <td>aee.capability.list</td>
              <td>List supported intents. The task MAY include a "namespace_filter" string. The result MUST include an "intents" array of strings.</td>
            </tr>
            <tr>
              <td>aee.context.fetch</td>
              <td>Retrieve an envelope or payload by reference. The task MUST include "id" and MAY include "corr", "locator", and "hash" for verification.</td>
            </tr>
            <tr>
              <td>aee.context.refute</td>
              <td>Reject a referenced context with a reason. The task MUST include "id" and "reason". The result MUST include "acknowledged" (boolean).</td>
            </tr>
            <tr>
              <td>aee.validate.payload</td>
              <td>Validate a payload against an intent schema. The task MUST include "intent" and "payload_to_validate". The result MUST include "valid" (boolean) and MAY include an "errors" array.</td>
            </tr>
          </tbody>
        </table>

        <t>
          Implementations claiming AEE compliance are not required to
          implement all "aee.*" intents. However, "aee.status.ping"
          <bcp14>SHOULD</bcp14> be supported by all agents to enable
          basic liveness detection.
        </t>
        <t>
          Application-specific intents <bcp14>MUST NOT</bcp14> use the
          "aee.*" namespace. If a use case requires scheduling, workflow,
          or orchestration semantics, those intents belong in an
          application namespace (or in a companion protocol such as AOCL
          <xref target="AOCL"/>).
        </t>
      </section>

      <section>
        <name>Intent Schema Publishing</name>
        <t>
          AEE does not standardize the "payload" field's internal
          structure. Instead, each intent publishes separate JSON Schema
          documents for its "task", "result", and "error" payload
          variants. The <bcp14>RECOMMENDED</bcp14> file layout is:
        </t>
        <artwork><![CDATA[
envelope/aee-v1.schema.json
intents/<intent>.task.schema.json
intents/<intent>.result.schema.json
intents/<intent>.error.schema.json
]]></artwork>
        <t>
          AEE does not require a centralized intent registry.
          Communities <bcp14>MAY</bcp14> publish intent schemas in
          version-controlled repositories, package registries, or any
          other distribution mechanism appropriate to their ecosystem.
        </t>
      </section>
    </section>

    <!-- ===== Section 10: Referencing Strategy ===== -->
    <section anchor="referencing-strategy">
      <name>Referencing Strategy</name>
      <t>
        When an envelope needs to reference prior context (e.g., the
        original task that spawned a result, or related evidence from
        another workflow), AEE prescribes a reference-based approach
        rather than embedding full envelopes within payloads.
      </t>

      <section>
        <name>Rationale: Avoiding Nested Envelopes</name>
        <t>
          Embedding full envelopes inside payloads creates several
          problems:
        </t>
        <ul>
          <li>
            <strong>Matryoshka bloat:</strong> Deeply nested structures
            grow with each hop in a multi-agent workflow, consuming
            storage and bandwidth.
          </li>
          <li>
            <strong>Token collapse:</strong> Large language models (LLMs)
            processing nested envelopes waste context window tokens on
            redundant structural metadata.
          </li>
          <li>
            <strong>Signature ambiguity:</strong> When envelopes are
            nested, it becomes unclear which envelope's signature is
            authoritative -- the outer or the inner.
          </li>
        </ul>
      </section>

      <section>
        <name>The payload.references Array</name>
        <t>
          When referencing prior envelopes, implementations
          <bcp14>SHOULD</bcp14> use a "references" array within the
          payload:
        </t>
        <artwork type="json"><![CDATA[
{
  "payload": {
    "references": [
      {
        "id": "01JFB2R1JZKQ9V3K8W8Y9W1F2A",
        "corr": "01JFB2QX0K8X5K6ZJ9G2C0C1MW",
        "type": "aee.envelope",
        "locator": "store://envelopes/01JFB2R1JZKQ9V3K8W8Y9W1F2A",
        "hash": "sha256:a1b2c3..."
      }
    ]
  }
}
]]></artwork>
        <t>
          Each reference object contains the following fields:
        </t>
        <dl>
          <dt>id (REQUIRED)</dt>
          <dd>The referenced envelope's "id" value.</dd>
          <dt>corr (OPTIONAL)</dt>
          <dd>The correlation ID for additional context.</dd>
          <dt>type (REQUIRED)</dt>
          <dd>
            The reference type. For envelope references, the value
            <bcp14>MUST</bcp14> be "aee.envelope".
          </dd>
          <dt>locator (OPTIONAL)</dt>
          <dd>
            A URI or path that can be used to retrieve the full
            referenced envelope, for example via the "aee.context.fetch"
            intent.
          </dd>
          <dt>hash (OPTIONAL)</dt>
          <dd>
            A content hash (e.g., "sha256:...") for integrity
            verification of the referenced envelope.
          </dd>
        </dl>
        <t>
          To retrieve the full envelope behind a reference, consumers
          <bcp14>SHOULD</bcp14> use the "aee.context.fetch" protocol
          intent (see <xref target="intent-namespace"/>).
        </t>
      </section>

      <section>
        <name>Exception: Archival and Forensic Snapshots</name>
        <t>
          When creating immutable audit logs or forensic snapshots,
          embedding full envelopes as inert blobs within a "result"
          payload is acceptable. These embedded envelopes are historical
          records, not active routing participants. Implementations
          <bcp14>MUST NOT</bcp14> attempt to route or process embedded
          archival envelopes as live messages.
        </t>
      </section>
    </section>

    <!-- ===== Section 11: Security Considerations ===== -->
    <section anchor="security-considerations">
      <name>Security Considerations</name>

      <section>
        <name>Replay Attacks and Correlation ID Uniqueness</name>
        <t>
          Each AEE envelope carries a unique "id" field and a "corr"
          field linking related messages. If message identifiers are
          predictable or reused, an attacker could replay previously
          captured envelopes to trigger duplicate work or corrupt
          workflow state. Implementations <bcp14>MUST</bcp14> generate
          "id" values using cryptographically random or
          lexicographically-sortable unique identifiers (e.g., ULIDs
          or UUIDs <xref target="RFC4122"/>). Consumers
          <bcp14>SHOULD</bcp14> maintain a deduplication window and
          reject envelopes with previously seen "id" values within that
          window. The "ts" field <bcp14>SHOULD</bcp14> be checked
          against a reasonable clock-skew tolerance to detect stale
          replays.
        </t>
      </section>

      <section>
        <name>Signature Verification and Trust Model</name>
        <t>
          The "sig" field is <bcp14>OPTIONAL</bcp14>, meaning that
          unsigned envelopes are valid per this specification.
          Deployments operating in environments where message
          authenticity is critical <bcp14>MUST</bcp14> require
          signatures and establish a trust model for key distribution.
          Ed25519 is <bcp14>RECOMMENDED</bcp14> for asymmetric
          signatures due to its performance characteristics and
          resistance to implementation pitfalls. When signatures are
          present, consumers <bcp14>MUST</bcp14> verify them before
          processing the envelope. A failed signature verification
          <bcp14>MUST</bcp14> result in rejection of the envelope.
        </t>
        <t>
          This specification does not define a public key infrastructure
          (PKI) or key exchange mechanism. Deployments <bcp14>SHOULD</bcp14>
          document their key management procedures, including key
          rotation schedules, revocation mechanisms, and the scope of
          trust for each key identifier ("kid").
        </t>
      </section>

      <section>
        <name>Envelope Integrity Without Signatures</name>
        <t>
          In deployments where the "sig" field is not used, envelope
          integrity depends entirely on the security properties of the
          transport layer. If envelopes are carried over an unencrypted
          or unauthenticated channel, any intermediary can modify
          envelope fields -- including "from", "to", "intent", and
          "payload" -- without detection. Deployments that do not use
          envelope-level signatures <bcp14>MUST</bcp14> ensure that the
          transport layer provides adequate integrity and authentication
          guarantees (e.g., TLS with mutual authentication).
          For tamper-evident recording of envelope exchanges, the
          companion VOLT protocol <xref target="VOLT"/> defines
          cryptographic hash chains that can provide post-hoc
          verification of envelope integrity.
        </t>
      </section>

      <section>
        <name>Privacy of Payload Contents</name>
        <t>
          AEE envelopes carry arbitrary payload data that may include
          personally identifiable information (PII), credentials,
          internal system details, or other sensitive content. The
          envelope format does not provide payload encryption.
          Implementations handling sensitive data <bcp14>SHOULD</bcp14>
          encrypt payloads at the application layer or ensure that the
          transport provides confidentiality (e.g., TLS). The "requires"
          field <bcp14>MUST NOT</bcp14> be used to carry secrets;
          credentials should be transmitted through secure side-channels
          rather than embedded in envelope metadata.
        </t>
        <t>
          The logging guidance in <xref target="validity-rules"/>
          (rule 8) recommends logging several envelope fields for
          observability. Implementations <bcp14>MUST</bcp14> ensure
          that logged fields do not inadvertently expose sensitive
          payload contents. The "intent" field, while not typically
          sensitive, may reveal operational patterns; deployments
          <bcp14>SHOULD</bcp14> consider the information leakage
          implications of intent names in log aggregation systems.
        </t>
      </section>

      <section>
        <name>Trust Boundaries Between Agents</name>
        <t>
          AEE entity identifiers (see <xref target="entity-identifiers"/>)
          are self-asserted: the "from" field is populated by the sender,
          and there is no built-in mechanism to verify that the claimed
          sender identity is authentic. In multi-tenant or
          cross-organizational deployments, a malicious agent could
          impersonate another agent by setting an arbitrary "from" value.
          Deployments <bcp14>MUST</bcp14> implement identity verification
          at trust boundaries, either through envelope signatures (see
          <xref target="signatures"/>), transport-layer authentication,
          or a gateway that validates sender identity before forwarding
          envelopes.
        </t>
        <t>
          When envelopes cross trust boundaries (e.g., from an internal
          agent network to an external partner's agents), implementations
          <bcp14>SHOULD</bcp14> validate all envelope fields at the
          boundary, strip or redact sensitive payload content, and apply
          allowlist-based intent filtering to prevent unauthorized
          operations.
        </t>
      </section>

      <section>
        <name>Denial of Service via Priority Field Abuse</name>
        <t>
          The "priority" field allows senders to signal message urgency.
          A malicious or misconfigured agent could set all messages to
          "urgent" priority, starving normal-priority messages of
          processing resources. Implementations <bcp14>SHOULD</bcp14>
          enforce per-sender priority quotas or rate limits.
          Infrastructure components <bcp14>SHOULD NOT</bcp14> blindly
          trust the "priority" field from untrusted sources; instead,
          they <bcp14>SHOULD</bcp14> apply policy-based priority
          assignment or capping at trust boundaries.
        </t>
        <t>
          Similarly, the "requires" field's "timeout_ms" value could
          be abused to hold resources for extended periods. Consumers
          <bcp14>SHOULD</bcp14> enforce maximum timeout values
          regardless of the requested timeout, and <bcp14>SHOULD</bcp14>
          release resources promptly when timeouts expire.
        </t>
      </section>
    </section>

    <!-- ===== Section 12: IANA Considerations ===== -->
    <section>
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>

  </middle>

  <back>

    <references>
      <name>References</name>

      <references>
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8259.xml"/>
      </references>

      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4122.xml"/>

        <reference anchor="AOCL" target="https://github.com/AdaminX/AOCL-Agent-Orchestration-Control-Layers-Protocol">
          <front>
            <title>Agent Orchestration Control Layers (AOCL)</title>
            <author initials="A." surname="Cowles" fullname="Adam Cowles"/>
            <date year="2026"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-cowles-aocl-00"/>
        </reference>

        <reference anchor="VOLT" target="https://github.com/AdaminX/VOLT-Protocol">
          <front>
            <title>Verifiable Operations Ledger and Trace (VOLT)</title>
            <author initials="A." surname="Cowles" fullname="Adam Cowles"/>
            <date year="2026"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-cowles-volt-00"/>
        </reference>
      </references>

    </references>

    <section numbered="false">
      <name>Acknowledgements</name>
      <t>
        The author wishes to thank the early adopters and reviewers of
        the AEE specification within the Quox ecosystem, whose feedback
        on real-world agent interoperability challenges shaped the
        design of this envelope format.
      </t>
    </section>

  </back>

</rfc>
