renderMarkdown

View as MarkdownOpen in Claude

Render all sections as a combined Markdown string. Each section becomes a ## heading with its body text, bullet points, and nested subsections rendered below it. This is the output used by AgentBase when assembling the AI prompt.

Parameters

None.

Returns

string — The complete rendered Markdown prompt text.

Example

1import { PomBuilder } from '@signalwire/sdk';
2
3const pom = new PomBuilder();
4pom.addSection('Role', { body: 'You are a helpful assistant.' });
5pom.addSection('Rules', { bullets: ['Be concise', 'Be accurate'] });
6const markdown = pom.renderMarkdown();
7console.log(markdown);
8// ## Role
9// You are a helpful assistant.
10// ## Rules
11// - Be concise
12// - Be accurate