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

import { PomBuilder } from '@signalwire/sdk';
const pom = new PomBuilder();
pom.addSection('Role', { body: 'You are a helpful assistant.' });
pom.addSection('Rules', { bullets: ['Be concise', 'Be accurate'] });
const markdown = pom.renderMarkdown();
console.log(markdown);
// ## Role
// You are a helpful assistant.
// ## Rules
// - Be concise
// - Be accurate