***

title: remove_step
slug: /reference/python/agents/context-builder/context/remove-step
description: Remove a step from this context.
max-toc-depth: 3
---------------------

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

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

Remove a step from this context entirely.

## **Parameters**

<ParamField path="name" type="str" required={true} toc={true}>
  Name of the step to remove.
</ParamField>

## **Returns**

[`Context`][ref-context] -- Self for method chaining.

## **Example**

```python {11}
from signalwire import AgentBase

agent = AgentBase(name="my-agent", route="/agent")

contexts = agent.define_contexts()
ctx = contexts.add_context("default")
ctx.add_step("greet").set_text("Greet the caller.")
ctx.add_step("obsolete_step").set_text("This step is no longer needed.")
ctx.add_step("farewell").set_text("Thank the caller and say goodbye.")

ctx.remove_step("obsolete_step")

agent.serve()
```