set_reset_system_prompt
set_reset_system_prompt
Set a new system prompt for when this step navigates to another context.
Parameters
system_prompt
New system prompt to use during the context switch.
Returns
Step — Self for method chaining.
set_reset_system_prompt
Set a new system prompt for when this step navigates to another context.
New system prompt to use during the context switch.
Step — Self for method chaining.
1 from signalwire import AgentBase 2 3 agent = AgentBase(name="my-agent", route="/agent") 4 5 contexts = agent.define_contexts() 6 ctx = contexts.add_context("default") 7 ctx.add_step("greet").set_text("Welcome the caller.") 8 transfer = ctx.add_step("transfer") 9 transfer.set_text("Transfer the caller to billing.") 10 transfer.set_valid_contexts(["billing"]) 11 transfer.set_reset_system_prompt( 12 "You are now a billing specialist. Help the customer with their invoice." 13 ) 14 billing = contexts.add_context("billing") 15 billing.add_step("invoice").set_text("Help with billing inquiries.") 16 17 agent.serve()