set_post_prompt

View as MarkdownOpen in Claude

Override the post-prompt text while this context is active.

Parameters

post_prompt
strRequired

Post-prompt text for this context.

Returns

Context — Self for method chaining.

Example

from signalwire import AgentBase
agent = AgentBase(name="my-agent", route="/agent")
contexts = agent.define_contexts()
contexts.add_context("default").add_step("menu").set_text("Ask what the caller needs.")
billing = contexts.add_context("billing")
billing.set_post_prompt("Summarize the billing issue and resolution.")
billing.add_step("review").set_text("Review the caller's account and recent charges.")
agent.serve()