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

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