menu_bookDefinition

What is YAML Frontmatter?

YAML FrontmatterA block of YAML metadata at the top of a Markdown file, delimited by triple dashes (---), used to store structured data like title, description, and version.

What is YAML frontmatter?

YAML frontmatter is a block of structured metadata placed at the very top of a Markdown file, enclosed between two lines of triple dashes (---). It allows Markdown files to carry machine-readable data alongside human-readable content.

---
title: "My Document"
version: "1.0.0"
tags: ["example", "tutorial"]
---

# Document content starts here

Why is YAML frontmatter used in agent definitions?

Agent definitions on Agent Shelf use YAML frontmatter to store structured metadata — the agent's ID, name, description, version, category, and tags. This metadata is parsed by the registry for search, filtering, and display, while the Markdown body below the frontmatter contains the agent's instructions.

How is YAML frontmatter parsed?

Most Markdown processing tools use the gray-matter library (JavaScript) or similar parsers to separate frontmatter from content. The parser reads everything between the opening --- and closing --- as YAML, and everything after as Markdown content.

arrow_backAll terms