> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/plugins-and-integrations/convai-unreal-engine-plugin/features/long-term-memory/long-term-memory-quick-start.md).

# Long-term memory quick start

Set up long-term memory for an Unreal character, assign a stable player identity, and confirm recall across Play In Editor sessions.

Set up long-term memory for a working Convai character, then confirm that the character recalls the same player in a later Play In Editor session.

### Prerequisites

* The Convai Unreal Engine plugin version <code class="expression">space.vars.unreal\_plugin\_version</code> is installed and the API key is configured. See [Install the Convai Unreal Engine plugin](/api-docs/plugins-and-integrations/convai-unreal-engine-plugin/getting-started/install-the-convai-plugin.md).
* A level contains a `UConvaiChatbotComponent` on the AI character and a `UConvaiPlayerComponent` on the player Actor.
* The chatbot component has a valid `CharacterID` from the Convai dashboard.

{% hint style="info" %}
This tutorial uses the Speaker ID workflow. For account ID or device fallback strategies, see [End-user identity](/api-docs/plugins-and-integrations/convai-unreal-engine-plugin/features/long-term-memory/end-user-identity.md). Memory is disabled by default for new characters in the Convai dashboard — enable it before testing recall.
{% endhint %}

### Enable memory and connect with identity

{% stepper %}
{% step %}

#### Enable LTM for the character

In a development Blueprint, add **Convai Set LTM Status** from the `Convai|LTM` category.

Set **Character ID** to the character ID from the Convai dashboard. Set **B Enable** to `true`. Connect **On Success** to a **Print String** node so you can confirm the request completed.

For ongoing verification, use **Convai Get LTM Status** with the same **Character ID**.
{% endstep %}

{% step %}

#### Get a stable EndUserID

Call **Convai Create Speaker ID** the first time a player uses your project. On **On Success**, save the returned `SpeakerID` from `FConvaiSpeakerInfo` in a `SaveGame` or account profile.

On later launches, load the saved `SpeakerID` instead of creating a new record. For the full create, list, and delete workflow, see [Speaker ID management](/api-docs/plugins-and-integrations/convai-unreal-engine-plugin/features/long-term-memory/speaker-id-management.md).
{% endstep %}

{% step %}

#### Assign identity and start the session

Before calling `StartSession`, assign the saved `SpeakerID` as `EndUserID` on both components:

* Set `EndUserID` on the **Convai Chatbot** component in the Details panel or from Blueprint.
* Set `EndUserID` on the **Convai Player** component in the Details panel or from Blueprint.

The chatbot `EndUserID` is the value sent to Convai at connect time. Call `StartSession` on the chatbot component after both values are set.
{% endstep %}
{% endstepper %}

{% hint style="success" %}
The setup is ready when **Convai Get LTM Status** returns `true` and the chatbot `EndUserID` is set to a non-empty value before each `StartSession`.
{% endhint %}

### Verify cross-session recall

1. Press **Play**.
2. Tell the character a persistent fact, such as `My name is Alex, and I inspect safety valves.`
3. Let the conversation continue long enough for the character to respond.
4. Stop Play In Editor.
5. Press **Play** again.
6. Restore the same `EndUserID` on the chatbot and player components before `StartSession`.
7. Ask `Do you remember what I inspect?`

The character should respond using the earlier fact. If it starts fresh, see [Troubleshoot long-term memory](/api-docs/plugins-and-integrations/convai-unreal-engine-plugin/features/long-term-memory/troubleshoot-long-term-memory.md).

### Next steps

{% content-ref url="/pages/Bc8OjnguS3F6H3oW7CJi" %}
[How long-term memory works](/api-docs/plugins-and-integrations/convai-unreal-engine-plugin/features/long-term-memory/how-long-term-memory-works.md)
{% endcontent-ref %}

{% content-ref url="/pages/qcfr1PrPOizoztRNloCY" %}
[End-user identity](/api-docs/plugins-and-integrations/convai-unreal-engine-plugin/features/long-term-memory/end-user-identity.md)
{% endcontent-ref %}

{% content-ref url="/pages/F5FsqjGFVKgO3SLqnTYj" %}
[Configure memory for a character](/api-docs/plugins-and-integrations/convai-unreal-engine-plugin/features/long-term-memory/configure-memory-for-a-character.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.convai.com/api-docs/plugins-and-integrations/convai-unreal-engine-plugin/features/long-term-memory/long-term-memory-quick-start.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
