setPostPromptUrl

View as MarkdownOpen in Claude

Override the default URL where post-prompt summaries are delivered. By default, summaries are sent to the agent’s own /post_prompt endpoint. Use this method to redirect summaries to an external service.

Parameters

url
stringRequired

The URL where post-prompt summaries should be POSTed.

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 customer support agent.');
5agent.setPostPrompt('Summarize this call as JSON with intent and resolution.');
6agent.setPostPromptUrl('https://analytics.example.com/call-summaries');
7await agent.serve();