Server SDKs
Build AI agents, control calls, send messages, and more
Set which steps the agent can navigate to from this step.
List of step names within the same context. Use "next" to allow sequential advancement to the next step in order.
"next"
Step — Self for method chaining.
Step
1import { ContextBuilder } from '@signalwire/sdk';23const builder = new ContextBuilder();4const ctx = builder.addContext('default');5ctx.addStep('greet').setText('Welcome the caller.');6const step = ctx.addStep('collect_info');7step.setText('Collect the caller\'s information.');8step.setValidSteps(['process_request', 'escalate']);9ctx.addStep('process_request').setText('Process the caller\'s request.');10ctx.addStep('escalate').setText('Escalate to a human agent.');