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

1from signalwire import AgentBase
2
3agent = AgentBase(name="my-agent", route="/agent")
4
5contexts = agent.define_contexts()
6ctx = contexts.add_context("default")
7ctx.add_step("collect_info").set_text("Collect the caller's account information.")
8
9step = ctx.get_step("collect_info")
10if step is not None:
11 step.set_functions(["verify_identity"])
12
13agent.serve()