addSystemSection

View as MarkdownOpen in Claude

Add a POM section to the system prompt. Cannot be combined with setSystemPrompt().

Parameters

title
stringRequired

Section heading.

body
stringRequired

Section body text.

Returns

Context — Self for method chaining.

Example

import { ContextBuilder } from '@signalwire/sdk';
const builder = new ContextBuilder();
builder.addContext('default').addStep('menu').setText('Ask what the caller needs.');
const billing = builder.addContext('billing');
billing.addSystemSection('Role', 'You are a billing specialist.');
billing.addSystemSection('Tone', 'Be professional and empathetic.');
billing.addStep('review').setText('Review the caller\'s account and recent charges.');