***

title: set_reset_consolidate
slug: /reference/python/agents/context-builder/step/set-reset-consolidate
description: Set whether to consolidate conversation history on context switch.
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

Set whether to consolidate conversation history when this step switches contexts.

## **Parameters**

<ParamField path="consolidate" type="bool" required={true} toc={true}>
  Whether to summarize previous conversation on context switch.
</ParamField>

## **Returns**

[`Step`][ref-step] -- 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("Welcome the caller.")
transfer = ctx.add_step("transfer")
transfer.set_text("Transfer the caller to support.")
transfer.set_valid_contexts(["support"])
transfer.set_reset_consolidate(True)
support = contexts.add_context("support")
support.add_step("help").set_text("Help the caller with their issue.")

agent.serve()
```