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

import { AgentBase } from '@signalwire/sdk';
const agent = new AgentBase({ name: 'support', route: '/support' });
agent.setPromptText('You are a helpful customer support agent.');
agent.setPostPrompt('Summarize this call as JSON with intent and resolution.');
agent.setPostPromptUrl('https://analytics.example.com/call-summaries');
await agent.serve();