Server SDKs
Build AI agents, control calls, send messages, and more
Set whether to consolidate (summarize) conversation history when entering this context. Reduces token usage while preserving key information.
Whether to consolidate previous conversation on entry.
Context — Self for method chaining.
Context
1import { ContextBuilder } from '@signalwire/sdk';23const builder = new ContextBuilder();4builder.addContext('default').addStep('menu').setText('Ask what the caller needs.');56const support = builder.addContext('support');7support.setConsolidate(true);8support.setSystemPrompt('You are a patient technical support engineer.');9support.addStep('diagnose').setText('Understand the customer\'s issue.');