***

title: clear_sections
slug: /reference/python/agents/context-builder/step/clear-sections
description: Remove all POM sections and direct text from this step.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[ref-step]: /docs/server-sdks/reference/python/agents/context-builder/step

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

## **Returns**

[`Step`][ref-step] -- Self for method chaining.

## **Example**

```python {9}
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()
```