• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WebMEM™

The Protocol for Structuring, Delivering, and Conditioning Trust-Scored AI Memory on the Open Web

  • Primer
  • Memory-First
  • Protocols
    • SDT Specification
    • WebMEM SemanticMap
    • WebMEM MapPointer
    • Digest Endpoint Specification
    • ProvenanceMeta Specification
    • AI Retrieval Feedback Loop Specification
    • Semantic Feedback Interface (SFI) Specification
    • Glossary Term Protocol (GTP) Specification
    • Examples
  • RFC
  • Glossary
  • About
    • WebMEM License
    • Mission
    • Charter

YAML-in-HTML Embedding

Part of the WebMEM Protocol
Location: /specification/sdt/yaml-in-html/
Last Updated: 2025-07-28


What is YAML-in-HTML?

YAML-in-HTML is the primary format for publishing trust-scored memory fragments using the WebMEM Protocol. It allows structured YAML to be embedded within a <template> tag so that it:

  • ✅ Does not render in the browser (inert)
  • ✅ Can be parsed by LLMs, agents, and validators
  • ✅ Defines a complete, retrievable memory fragment

This transforms HTML into a dual-purpose document: human-readable surface, machine-retrievable memory layer.


Core Structure

<template data-visibility-fragment data-sdt-class="DataFragment">
---
data_id: plan-H1234-456-0
entity_type: Plan
value: 174.70
unit: USD
defined_term: Part B Premium
glossary_id: term-b-premium
source: https://data.cms.gov/...
prov: true
export:
  - ttl
  - jsonld
  - md
...
</template>

Tag Requirements

Attribute Purpose
data-visibility-fragment Declares a memory-visible fragment
data-sdt-class Declares the fragment type (e.g. DataFragment, FAQFragment)

Optional attributes:

  • data-digest – Digest URI or canonical reference
  • data-entity-id – Links the fragment to a known entity ID
  • data-type="text/yaml" – Optional MIME hint for extractors

YAML Rules

  • Must begin with --- and end with ...
  • Must be valid YAML 1.2
  • Must conform to the schema for its class: /schema/sdt/[class].schema.json

Use Cases

  • Medicare plan benefit fragments
  • Glossary-aligned definitions
  • Derived statistics or explanations
  • FAQs, Q&A, procedural steps
  • Speakable content for assistive agents

Each fragment is self-contained, citeable, and independently retrievable via endpoint or inline extraction.


Rendering Behavior

  • No visual output in the browser
  • <template> is inert and excluded from rendered DOM
  • AI agents, semantic crawlers, and validators can extract and parse structured memory

Compatibility

Agent / Tool Behavior
LLMs Parse YAML, infer entity, value, source, and term linkage
Validators Validate fragment against SDT schema for its class
Semantic Crawlers Index fragment-level citations and glossary linkage
CMS + Plugins Export SDTs to structured digest endpoints (TTL, JSON-LD, etc.)

Related Pages

  • SDT Specification
  • Fragment Classes
  • Data-in-HTML Format
  • Export + Endpoint Rules

Primary Sidebar

YAML-in-HTML SDT

  1. Semantic Data Templates (SDT) Specification
  2. YAML-in-HTML Embedding
  3. Anatomy of a Semantic DataFragment
  4. SDT Fragment Header Mapping
  5. Field Inheritance Across Fragments (inherits_from)
  6. Cross-Fragment Indexing (related_fragments)
  7. ProvenanceMeta Best Practices
  8. SDT YAML-in-HTML: HTML Container Attributes
  9. Semantic Data Atoms: Fields Block Specification
  10. Fragment Relationships and Referencing
  11. Semantic Data Template (SDT) Fragment Classes Overview
    1. DataFragment
    2. DerivedStatsFragment
    3. IndexFragment
    4. DefinedTermFragment
    5. FAQFragment
    6. MetaFragment
    7. ExplainerFragment
    8. DirectoryFragment
    9. EligibilityFragment
    10. ProcedureFragment
    11. GlossaryFragment
    12. PersonaFragment
    13. PolicyFragment
    14. RecommendationFragment

Copyright © 2026 · David Bynon · Log in