<Block />
<Block /> is a transparent authoring component for deliberate prompt separation. With children it contributes exactly two newline characters before and after them; without children, or with a direct AML-empty boolean, null, or undefined child, it contributes one "\n\n" separator. Add tag when the content should also become an explicit XML-style section for the model.
import { Agent, Block } from "@aml-jsx/sdk"
export default ( <Agent> Review the implementation. <Block tag="Review Priority">Report correctness findings before maintainability suggestions.</Block> Cite concrete evidence for every finding. </Agent>)The Block above contributes actual newline characters and normalizes its section name to lowercase kebab-case:
Review the implementation.
<review-priority>Report correctness findings before maintainability suggestions.</review-priority>
Cite concrete evidence for every finding.Multiline Markdown
Section titled “Multiline Markdown”TypeScript’s JSX transform collapses whitespace in natural multiline text children before AML receives them. Add multiline to a Block with one direct template-literal string when headings, paragraphs, blank lines, or list boundaries are part of the prompt:
import { Block } from "@aml-jsx/sdk"
function Instructions() { return ( <Block multiline> {` Review the change:
- Check behavior - Check tests - Check documentation `} </Block> )}This renders the authored structure without its surrounding TSX indentation:
Review the change:
- Check behavior- Check tests- Check documentationThe Block removes an opening and closing blank source line plus the indentation shared by every non-blank line. It preserves additional indentation and intentional blank lines. The braces and template literal are required: TypeScript normalizes natural JSX text before AML receives it, so <Block multiline> cannot recover line breaks from an ordinary JSX text child. The convenience applies only to a direct template-literal string child; non-string children retain normal Block behavior.
Use the multiline template tag when the text needs nested AML expressions. Unlike an ordinary template literal, the tag keeps interpolated values as renderables instead of stringifying them:
import { Block, Include, multiline } from "@aml-jsx/sdk"
const scope = "implementation"const checks = <Include src="./checks.md" />
export default ( <Block> {multiline` Review ${scope}:
${checks} `} </Block>)Both forms use the same indentation rules. Use them only where source line structure is semantic; ordinary JSX text and sibling concatenation remain unchanged.
| Prop | Type | Default | Meaning |
|---|---|---|---|
children | AmlRenderable | empty | Content placed between the leading and trailing blank lines. |
multiline | boolean | false | Dedent one direct string child while preserving its semantic line structure. |
tag | string | untagged | Optional section name normalized to lowercase ASCII kebab-case and wrapped around content. |
tag="Personal Data", tag="personal_data", and tag="personal-data" all render <personal-data>. Camel-case boundaries and runs of punctuation or whitespace become one hyphen, including < and /, so authored text cannot inject another XML-style tag. If no letters or digits remain, the Block stays untagged. AML does not trim or escape the children.
Composition
Section titled “Composition”<Block /> creates no evaluator primitive, lifecycle, capability scope, or control-flow boundary. Descriptors inside it retain their normal nearest owner, so a <Tool /> or <Skill /> inside a Block still belongs to the containing <Agent />.
Named Blocks are visible prompt delimiters, not message roles or security boundaries. A tag can help a model distinguish instructions, context, evidence, or output contracts, but it does not give that content higher priority or protect untrusted children.
Use a Fragment when grouping alone is enough. Use <Block /> when the exact blank-line serialization or named section is part of the authored prompt. Keep conditions, branching, ordinary iteration, and sequencing policy in TypeScript rather than adding control-flow meaning to this component.