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

1from signalwire import AgentBase
2
3agent = AgentBase(name="my-agent", route="/agent")
4
5contexts = agent.define_contexts()
6contexts.add_context("default").add_step("menu").set_text("Ask what the caller needs.")
7
8billing = contexts.add_context("billing")
9billing.set_post_prompt("Summarize the billing issue and resolution.")
10billing.add_step("review").set_text("Review the caller's account and recent charges.")
11
12agent.serve()