set_reset_full_reset

View as MarkdownOpen in Claude

Set whether to completely replace the system prompt when this step switches contexts.

Parameters

full_reset
boolRequired

Whether to fully rewrite the system prompt on context switch.

Returns

Step — Self for method chaining.

Example

from signalwire import AgentBase
agent = AgentBase(name="my-agent", route="/agent")
contexts = agent.define_contexts()
ctx = contexts.add_context("default")
ctx.add_step("greet").set_text("Welcome the caller.")
transfer = ctx.add_step("transfer")
transfer.set_text("Transfer the caller to billing.")
transfer.set_valid_contexts(["billing"])
transfer.set_reset_full_reset(True)
transfer.set_reset_system_prompt(
"You are a billing specialist. Forget all previous context."
)
billing = contexts.add_context("billing")
billing.add_step("invoice").set_text("Help with billing inquiries.")
agent.serve()