get_step
get_step
Get an existing step by name for inspection or modification.
Parameters
name
Step name to look up.
Returns
Step if found, None
otherwise.
get_step
Get an existing step by name for inspection or modification.
Step name to look up.
Step if found, None
otherwise.
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("collect_info").set_text("Collect the caller's account information.") 8 9 step = ctx.get_step("collect_info") 10 if step is not None: 11 step.set_functions(["verify_identity"]) 12 13 agent.serve()