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

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