clear_sections

View as MarkdownOpen in Claude

Remove all POM sections and direct text from this step, allowing it to be repopulated with new content.

Returns

Step — Self for method chaining.

Example

from signalwire import AgentBase
agent = AgentBase(name="my-agent", route="/agent")
contexts = agent.define_contexts()
ctx = contexts.add_context("default")
step = ctx.add_step("collect_info")
step.add_section("Task", "Original instructions.")
step.clear_sections()
step.add_section("Task", "Updated instructions for this step.")
agent.serve()