Skip to main content

Module parser

Module parser 

Source
Expand description

UAR-AGENT-MD Markdown parser.

Parses a UAR-AGENT-MD document into an AgentDescriptorIR (for complete documents) or populates a PartialAgentDescriptorIR (for incomplete documents in conversational mode).

The parser:

  1. Extracts the agent name from the # Agent: <name> H1 heading.
  2. Splits the document into sections on ## <SectionName> H2 headings.
  3. For each section, extracts the YAML code block and deserializes it into the corresponding IR section struct.

Functionsยง

parse
Parse a complete UAR-AGENT-MD document into a full AgentDescriptorIR.
parse_partial
Parse a UAR-AGENT-MD document into a PartialAgentDescriptorIR, tolerating missing sections. Used by conversational mode and for lenient parsing.