> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truemath.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Scenarios

> A scenario is a distinct calculation state within a conversation. Scenarios let you explore what-if outcomes without losing prior work.

Calculations in TrueMath happen inside a **conversation** — an ongoing session that
holds one or more **scenarios**. A scenario is a distinct calculation state: a set of
[variable](/concepts/variables) values and the results derived from them.

This mirrors how professionals actually work — iteratively, exploring alternatives,
building toward a decision — rather than running isolated one-off calculations.

## Conversations and scenarios

A conversation begins with a first calculation, which establishes the first scenario.
As you continue, each request either refines the current scenario or branches into a
new one. The conversation tracks a **current scenario** and the **most recent
scenario** created, so you always know which state you are looking at.

## What-if exploration

When you change an input to explore an alternative — "what if the down payment were
15% instead of 20%" — TrueMath creates a **new scenario**. The original is preserved,
so you can compare outcomes rather than overwrite them.

Each calculation reports the action it took:

* **`new`** — a new scenario was created. Returned when you start a new conversation,
  explicitly ask for a new scenario, or change an input you already provided to explore
  an alternative — the original scenario is preserved so you can compare. Converting a
  value to a different unit does *not* create a new scenario; it changes what is shown,
  not the underlying calculation.
* **`extend`** — the current scenario was extended in place: additional values were
  supplied without changing any it already had. Converting a known value in the
  scenario to a different unit also returns `extend`.
* **`discard`** — the requested calculation exactly matches one already in the scenario.
  Nothing was modified.
* **`fetch`** — an existing scenario was retrieved. A `fetch` does *not* return the
  scenario itself — read it with
  [`GET /v1/conversations/:id/context/:scenario_id`](/api/scenario-context).

## Working with scenarios

* In the Playground, follow-up questions and what-if changes create and move between
  scenarios for you. See [What-if scenarios](/playground/what-if-scenarios).
* Over the API, you can retrieve the resolved state of every scenario in a conversation
  with [`GET /v1/conversations/:id/context`](/api/scenario-context), or a single scenario
  by its index with
  [`GET /v1/conversations/:id/context/:scenario_id`](/api/scenario-context).
