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

1from signalwire import AgentBase
2
3agent = AgentBase(name="my-agent", route="/agent")
4
5contexts = agent.define_contexts()
6ctx = contexts.add_context("default")
7step = ctx.add_step("collect_info")
8step.add_section("Task", "Original instructions.")
9step.clear_sections()
10step.add_section("Task", "Updated instructions for this step.")
11
12agent.serve()