get_step

View as MarkdownOpen in Claude

Get an existing step by name for inspection or modification.

Parameters

name
strRequired

Step name to look up.

Returns

Step if found, None otherwise.

Example

from signalwire import AgentBase
agent = AgentBase(name="my-agent", route="/agent")
contexts = agent.define_contexts()
ctx = contexts.add_context("default")
ctx.add_step("collect_info").set_text("Collect the caller's account information.")
step = ctx.get_step("collect_info")
if step is not None:
step.set_functions(["verify_identity"])
agent.serve()