set_skip_to_next_step

View as MarkdownOpen in Claude

Automatically advance to the next step without evaluating step criteria. Useful for steps that should always flow through sequentially.

Parameters

skip
boolRequired

Whether to skip to the next step automatically.

Returns

Step — Self for method chaining.

Example

1from signalwire import AgentBase
2
3agent = AgentBase(name="my-agent", route="/agent")
4
5contexts = agent.define_contexts()
6ctx = contexts.add_context("default")
7preamble = ctx.add_step("preamble")
8preamble.set_text("Read the disclaimer to the caller.")
9preamble.set_skip_to_next_step(True)
10ctx.add_step("main").set_text("Help the caller with their request.")
11
12agent.serve()