Skip to main content

Memory

A character's Long-Term Memory allows them to establish a collection of notable information over time, accumulated across interactions with a player throughout multiple sessions.

After these memories are collected and synthesized, the character can choose to mention a relevant memory if a conversation naturally touches upon the topic.

Long-Term Memory

Memory Components

The Long-Term Memory system consists of two primary components: Flash Memory and Long-Term Memory.

Flash Memory

Flash Memory refers to immediate, fact-based information derived from conversational exchanges, such as:

  • "Adam goes to eat at pasta and pizza every week."
  • "Adam likes to eat sushi."

Long-Term Memory

Long-Term Memory refers to topic-based summaries that are synthesized from Flash Memories. The system compiles and summarizes information over time, leading to conclusions from Flash Memories such as:

  • "Adam likes Italian and Japanese food."
  • "Adam is especially fond of the restaurant pasta and pizza."

Example of Memory Use

For example, if during a conversation Adam mentions several times that he enjoys sushi and eats at pasta and pizza every week, the Flash Memory would record each of these specific instances.

Over time, these individual records contribute to the Long-Term Memory, which synthesizes this information into summaries such as "Adam likes Italian and Japanese food."

This synthesized memory allows the character to recall and reference pertinent information whenever a relevant topical discussion occurs during conversation, in this case, anything related to the topic of Italian or Japanese food.

Enabling Long-Term Memory

To enable Long-Term Memory for a character, go to their Advanced options tab and flip the Enable Long-Term Memory toggle.

Toggle

Long-Term Memory in Chat

When interacting with a character using Chat in Inworld Studio, memory retention persists as long as the Restart Conversation button is not activated.

This means that you can close and re-open the chat without compromising the character's memory persistence.

Refresh

Pressing the Restart Conversation button results in a flush of the character's Long-Term Memory, causing them to forget everything they have learned so far and re-setting them to a blank state.

Memory Between Conversations

To enable a character to remember things between conversations, you must implement the Save/Load functionality of your SDK.

Each conversation is treated by Inworld's system as a "session."

Imagine the player talks to a character, has a conversation, and then leaves. Then they come back later and start another conversation with the character.

  • If, on the client side, a Save/Load is implemented after every conversation to continue the session, then the character WILL have memory of the previous conversation.
  • If a Save/Load is not implemented on the client side after a conversation, the new conversation is treated as a new session and the character WON'T have memory of the previous conversation.

This behavior is due to sessions being discrete, so if a player has engaged with a character previously but that session is not loaded, the character will have no memory of it.

See Platform Integration below for integrating this save/load functionality into your game using your relevant SDK.

Platform Integration

When integrated into Unreal, Unity, Web, or Node.js, ensure State Save and Load are implemented in order for memory to be persistent across multiple sessions.

For additional information, see the relevant section for your platform: