addAnswerVerb

View as MarkdownOpen in Claude

Configure the answer verb (phase 2) with optional settings. Use this to customize answer behavior such as setting a maximum call duration.

Parameters

config
Record<string, unknown>

Answer verb configuration (e.g., { max_duration: 3600 }).

Returns

AgentBase — Returns this for method chaining.

Example

1import { AgentBase } from '@signalwire/sdk';
2
3const agent = new AgentBase({ name: 'support', route: '/support' });
4agent.setPromptText('You are a helpful assistant.');
5agent.addAnswerVerb({ max_duration: 3600 }); // 1 hour max call duration
6await agent.serve();