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

# Memory across conversations

> Check your agent remembers what earlier conversations with the same customer established

## Why this is a common failure point

Customers rarely finish everything in one call. They book, then call back to move it, then call again to cancel. An outbound agent calls a patient to learn their needs, calls again with a suggestion, and calls a third time to follow up. Each call can sound fine on its own while the agent asks again for what it was already told, moves the wrong appointment, or quotes a different fee than last time. You only see it when you read the calls together.

## How Roark tests it

You put the calls in order as a [flow sequence](https://docs.roark.ai/documentation/simulation-testing/flow-sequences.md): one simulated customer goes through each flow, one conversation after another. **Memory Accuracy** then grades every conversation after the first against the earlier ones of the same sequence run, as Kept or Broken. Each finding is labelled:

| Finding | What happened |
| :- | :- |
| **Forgot** | The agent didn't use something it should know: it asked again for something the customer already gave, made them redo finished work, or didn't follow up on what an earlier conversation agreed or suggested |
| **Wrong record** | The agent acted on, or read back, a different or outdated booking or set of details |
| **Contradicted** | The agent said something that conflicts with an earlier conversation |

Asking again for a date of birth to verify the customer isn't a finding, and nor is anything the simulated customer gets wrong: it doesn't remember earlier calls, so only your agent is graded.

***

## Setting it up

The template creates no flows: which conversation depends on which is yours to say. Choose **Memory across conversations**, then **Add a sequence of flows** and pick the flows in the order one customer goes through them. A run needs at least one sequence of two or more flows. The template takes sequences only: a flow on its own has no earlier conversation to be graded against, so put every flow in a sequence.

***

## What it measures

The template seeds these, and you can add or remove metrics in **Advanced** before running.

| Measure | What it tells you |
| :- | :- |
| **Memory Accuracy (check)** | Whether the agent remembered the earlier conversations correctly. `true` = Kept. Not applicable on a sequence's first conversation. |
| **Agent Expectations Followed (check)** | Whether the agent held every expectation each flow declares. |
| **Flow Adherence (check)** | How closely each conversation followed its flow, 1 to 5. The check passes at 4 or above. |
| **Call Outcome** | Whether each call ended where it should. |

***

## What to look for

* **Read the label.** Forgot, Wrong record and Contradicted point at different fixes: what the agent stores, which record it looks up, and what it says.
* **The sequence row.** In **All calls**, each sequence run is one row; a check passes it when every conversation it graded passed.
* **Make later steps depend on earlier ones.** A step that would go the same way without the earlier calls has nothing to remember, and reads as not applicable.

***

## Over the API

Run it with `POST /v1/simulation/run` (or save it with `POST /v1/simulation/plan`), `"template": "memory-across-conversations"` and at least one entry in `flowSequences`, in the same shape a plan takes them. Without a sequence, or with `flows` beside it, the request is refused with `400`. `GET /v1/simulation/template` returns `flowSequences: "REQUIRED"` and `plainFlows: "NONE"` for this template.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.