> This page is for Server SDKs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# history_mode

> Return the history mode of the simulated call's current step.

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

The current step's [history mode][set-history]: the step's own, its context's, or
`"default"` when neither sets one.

## Returns

`str` -- One of `"keep"`, `"default"`, `"hide"`, `"isolate"`, or `"spoken"`.

## Example

```python {15,18}
from signalwire import AgentBase, FunctionResult
from signalwire.testing import CallSimulator

agent = AgentBase(name="orders", route="/orders")
agent.prompt_add_section("Role", "You take orders.")
agent.define_tool("review_order", "Read the order back", {"type": "object", "properties": {}},
                  lambda args, raw_data: FunctionResult("Read the order back.").swml_change_step("confirm"))
agent.define_tool("place_order", "Place the order", {"type": "object", "properties": {}},
                  lambda args, raw_data: FunctionResult("Order placed."))
ctx = agent.define_contexts().add_context("default")
ctx.add_step("take").set_text("Take the order.").set_functions(["review_order"])
ctx.add_step("confirm").set_text("Confirm the order.").set_functions(["place_order"]).set_history("isolate")

sim = CallSimulator(agent)
print(sim.history_mode())
# default
sim.call("review_order")
print(sim.history_mode())
# isolate
```