> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # setPostPrompt > Set the post-prompt used for generating call summaries after a conversation ends. [on-summary]: /docs/server-sdks/reference/typescript/agents/agent-base/on-summary [set-post-prompt-url]: /docs/server-sdks/reference/typescript/agents/agent-base/set-post-prompt-url [ref-agentbase]: /docs/server-sdks/reference/typescript/agents/agent-base Set the post-prompt text for summary generation. After a conversation ends, the AI uses this prompt to analyze the conversation and generate a structured summary. The summary is delivered to your [`onSummary()`][on-summary] callback or the [`setPostPromptUrl()`][set-post-prompt-url] endpoint. ## **Parameters** **`text`** `string` — required Instructions for summary generation. Tell the AI what to extract from the conversation -- for example, caller intent, resolution status, or action items. --- ## **Returns** [`AgentBase`][ref-agentbase] -- Returns `this` for method chaining. ## **Example** ```typescript {5} import { AgentBase } from '@signalwire/sdk'; const agent = new AgentBase({ name: 'support', route: '/support' }); agent.setPromptText('You are a customer support agent for Acme Corp.'); agent.setPostPrompt(` Summarize this conversation as JSON with the following fields: - caller_intent: What the caller wanted - resolution: Whether their issue was resolved (yes/no/partial) - action_items: List of follow-up actions needed - sentiment: Overall caller sentiment (positive/neutral/negative) `); await agent.serve(); ``` > Set the post-prompt used for generating call summaries after a conversation ends.