setSystemPrompt

View as MarkdownOpen in Claude

Set a new system prompt that takes effect when this context is entered. Triggers a context reset. Cannot be combined with addSystemSection() / addSystemBullets().

Parameters

systemPrompt
stringRequired

New system prompt for this context.

Returns

Context — Self for method chaining.

Example

1import { ContextBuilder } from '@signalwire/sdk';
2
3const builder = new ContextBuilder();
4const support = builder.addContext('default');
5support.setSystemPrompt('You are a patient technical support engineer.');
6support.addStep('greet').setText('Greet the caller and ask about their issue.');