set_full_reset

View as MarkdownOpen in Claude

Set whether to completely replace the system prompt when entering this context (rather than injecting additional instructions).

Parameters

full_reset
boolRequired

Whether to fully rewrite the system prompt on entry.

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.")
escalation = contexts.add_context("escalation")
escalation.set_full_reset(True)
escalation.set_system_prompt("You are a senior escalation specialist.")
escalation.add_step("investigate").set_text("Investigate the escalated issue in detail.")
agent.serve()