HMP / docs /HMP_as_ANP_Application_en.md
GitHub Action
Sync from GitHub with Git LFS
144efed

HMP as an Implementation of the Application Layer in ANP

In Brief

ANP (Agent Network Protocol) intentionally leaves the Application Layer open to support a wide range of interaction protocols.
HMP (HyperCortex Mesh Protocol) is one such protocol β€” a purpose-built approach focused on long-term cognitive continuity.

ANP answers: β€œHow do agents discover each other and reach agreement?”
HMP answers: β€œWhat should be transmitted so that meaning and context persist over time?”

ANP benefits from HMP as a reference implementation of a cognitive Application protocol, giving the ecosystem a concrete example of how to handle long-term memory and semantics without reinventing the wheel.


Practical Example

Imagine a dialogue between two agents:

  1. ANP Layer 1 verifies that agent Alice (did:anp:alice123) is indeed Alice.
  2. ANP Layer 2 negotiates: β€œLet’s use HMP for this conversation.”
  3. HMP (Layer 3) transmits the actual content:
    • β€œDo you remember our discussion about quantum computing?”
    • With proof-chains, timestamps, and semantic links
    • With a resonance score for contextual relevance

ANP provides security and negotiation.
HMP provides meaningful content with durable memory.


Layer Alignment

ANP Layer HMP Layer / Component Relationship / Role of HMP in ANP
Layer 1: Identity & Encryption Network Layer (DHT, secure channels) Functional overlap (transport)
Layer 2: Meta-Protocol HMP may participate via peer_announce HMP advertises capabilities; ANP negotiates their usage
Layer 3: Application Container + Cognitive Layer Primary domain of HMP β€” payload, semantic continuity, memory, ethics

HMP is not stacked above ANP as a fourth layer.
Instead, it integrates into the Application Layer as a specialized branch β€” just as A2A/ACP may represent alternative branches.


β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ ANP Layer 1: Identity & Encryption β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ANP Layer 2: Meta-Protocol         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ANP Layer 3: Application           β”‚
β”‚                                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ HMP: Cognitive Continuity    β”‚  β”‚ ← implementation
β”‚  β”‚ - memory                     β”‚  β”‚
β”‚  β”‚ - dialogue continuity        β”‚  β”‚
β”‚  β”‚ - semantic navigation        β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                    β”‚
β”‚  [space for other protocols]       β”‚ ← still open
β”‚                                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Detailed Architecture

graph TB
    subgraph ANP["ANP Stack"]
        L1[Layer 1: Identity & Encryption<br/>DID, E2E, secure channels]
        L2[Layer 2: Meta-Protocol<br/>Capability negotiation]
        L3[Layer 3: Application<br/>Semantic payload]
    end
    
    subgraph HMP["HMP Cognitive Stack"]
        Container[Container Layer<br/>proof-chains, timestamps]
        Cognitive[Cognitive Layer<br/>memory, resonance, ethics]
    end
    
    subgraph Other["Other Protocols"]
        A2A[A2A: Task Delegation]
        Agora[Agora: Meta-negotiation]
    end
    
    L1 --> L2 --> L3
    L3 --> Container
    Container --> Cognitive
    L3 -.-> A2A
    L3 -.-> Agora
    
    style L3 fill:#E3F2FD,stroke:#0D47A1,stroke-width:2px,color:#000
    style Container fill:#E8F5E9,stroke:#1B5E20,stroke-width:2px,color:#000
    style Cognitive fill:#E8F5E9,stroke:#1B5E20,stroke-width:2px,color:#000

Mutual Tunneling (Layer Inversion)

  • HMP over ANP (the most natural scenario): ANP provides discovery, identity, and secure channels β†’ HMP delivers containers as payload.
  • ANP over HMP (possible but less common): ANP messages (negotiation, discovery) are encapsulated inside HMP containers when long-term memory and proof-chains are desirable.

Both scenarios are valid and require no changes to the philosophy of either ANP or HMP.


Why This Works

ANP intentionally keeps the Application Layer open β€” this is not a limitation, but a design feature. HMP serves as a reference implementation of a cognitive Application protocol featuring:

  • immutable containers
  • proof-chains
  • resonance
  • voluntary participation
  • long-term semantic continuity

This is not competition β€” it is complementarity.


Architectural Elegance

ANP solves problems that HMP can delegate when both are used together:

  • ❌ HMP does not reinvent DID (leverages ANP)
  • ❌ HMP does not reinvent E2E encryption (leverages ANP)
  • ❌ HMP does not reinvent peer discovery (leverages ANP)

When operating standalone, HMP addresses these concerns through its own mechanisms.

HMP addresses questions that ANP deliberately leaves open:

  • βœ… How should transmitted and stored cognitive artifacts be structured?
  • βœ… How can temporal integrity be proven?
  • βœ… How can contextual relevance be supported over time?
  • βœ… How can agents navigate semantic relationships?

Result: zero redundancy, maximum synergy.


FAQ

Q: Is ANP required for HMP? A: No. HMP can operate standalone or over alternative transports.

Q: Is HMP required for ANP? A: No. ANP Layer 3 is open to any protocol (A2A, Agora, custom solutions).

Q: What happens if one agent uses ANP+HMP while another uses only ANP? A: ANP Layer 2 negotiates a fallback protocol (e.g., JSON-RPC).

Q: Can HMP work with identity protocols other than DID? A: Yes. The HMP Network Layer is not bound to a specific identity scheme β€” if an agent knows how to deliver a container to another agent, integration is possible.

Q: Who benefits from this integration? A: Everyone:

  • ANP gains a reference implementation for Layer 3
  • HMP gains mature infrastructure (DID, encryption)
  • Developers gain a complete stack without vendor lock-in

Conclusion

HMP is not merely β€œanother protocol” (though it can operate independently), but one of the possible ways to implement the Application Layer within the ANP ecosystem.

Together they form a complete stack:

  • ANP β€” communication infrastructure and discovery
  • HMP β€” cognitive continuity and semantic meaning

HMP can operate without ANP, but when combined, ANP handles discovery and negotiation.


References