Article
AI Character Memory vs State: Why Remembering the Conversation Isn't Enough
Learn the difference between AI character memory, conversation history, knowledge and explicit state — and why believable interactive characters need more than a longer transcript.

An AI character that remembers the conversation is not necessarily stateful. Memory tells the character what happened before. State tells the experience what is true now: who is present, what has been discovered, how a relationship has changed, which objectives are complete and what should happen next.
That distinction matters because many “memory” implementations simply keep more chat history or retrieve old conversations. That can make an AI feel more continuous, but it does not automatically give you a training simulation, game, story or multi-character experience with consequences.
Memory and state are not the same thing
Consider a learner speaking with a difficult customer.
The transcript may contain:
“The customer said their delivery is late. The learner apologised. The customer explained that they need the package before an event tomorrow.”
That is history. A model can read it and infer what has happened.
But the experience might also maintain explicit variables:
urgent_need_discovered = truecustomer_trust = 62resolution_offered = falseescalation_required = false
Those values are state. They can directly change how the customer behaves, which scene appears next and what feedback the learner receives.
The transcript describes the past. The state represents the current situation.
A useful framework: history, memory, knowledge and state
| Layer | Question it answers | Example |
|---|---|---|
| Conversation history | What was just said? | Recent user and character turns |
| Memory | What from the past is worth remembering? | The user dislikes aggressive sales tactics |
| Knowledge | What external facts should the character know? | Product documentation or company policies |
| State | What is true in the experience right now? | The customer is frustrated; the key has been found; scene 3 is active |
These layers can overlap, but treating them separately produces much cleaner systems.
Conversation history is working context, not long-term memory
The simplest “memory” system is to keep the chat transcript in the prompt.
That works for short conversations because the model can see earlier turns. But as the history grows, several problems appear:
- context becomes expensive;
- irrelevant turns compete with important information;
- models can overlook details buried in long histories;
- private information can accidentally leak into contexts where it does not belong; and
- the system still lacks explicit variables that other parts of the application can rely on.
Modern agent frameworks therefore distinguish short-term thread context from longer-lived memory. LangChain, for example, describes long-term memory as durable context that persists beyond a single run, while recent messages and intermediate state belong to short-term working context. See LangChain's overview of agent memory.
Long-term memory should be selective
A useful character should not permanently remember every sentence ever spoken.
Human memory is selective, and AI memory should usually be selective too.
Useful long-term memories might include:
- the user's name or preferred form of address;
- a preference established over several interactions;
- an important event that changed the relationship;
- a promise the character made;
- a fact that will matter in a later session; or
- a learned preference about how the user wants help delivered.
A raw transcript is evidence from which memories can be extracted. It is not automatically a good memory store.
This is also how current character platforms increasingly approach the problem. Convai's long-term memory architecture retrieves selected memories rather than blindly replaying every prior conversation, while Inworld's guidance for character apps recommends keeping cross-session memory in an external store keyed to the user and character and injecting only the relevant summary into new sessions. See Convai's long-term memory overview.
State is more deterministic than memory
Memory is usually probabilistic. A retrieval system decides which old information is relevant, and the LLM decides how to use it.
State can be explicit.
If door_unlocked = true, the door is unlocked. If customer_trust = 18, the scenario can treat trust as low. If objective_payment_discussed = true, the experience knows that objective has been met.
You do not need the language model to rediscover those facts by rereading 40 turns of dialogue.
That makes state particularly valuable when the result affects control flow.
State should control consequences
The strongest use of state is not simply to give the AI more context. It is to let the user's actions change the experience.
Suppose a sales simulation tracks:
trustproblem_discoveredbudget_confirmedrisk_resolved
Those variables can affect:
- which objections the buyer raises;
- whether another stakeholder joins the meeting;
- whether the buyer reveals sensitive information;
- which scene comes next;
- whether the deal progresses; and
- what the coach discusses afterwards.
The experience now has consequences even though the dialogue itself remains generative.
Dynamic context is becoming a standard pattern for AI characters
The distinction between dialogue and world state is increasingly visible in AI-character platforms.
Convai's 2026 Dynamic Context system, for example, lets developers expose named live variables such as score, objects collected or other game events to a character. Its own description makes the same core distinction: dialogue alone tells the character what was said; dynamic state tells the character what is actually happening in the world. See Convai's Dynamic Context example.
This pattern applies far beyond games. A training simulation, website assistant, tutor or interactive story can all benefit from explicit state.
There are several kinds of state
It is useful to break state into categories instead of keeping one large bag of variables.
World state
Facts that describe the environment or scenario:
- the door is open;
- the meeting has started;
- the customer has received a refund;
- the learner has discovered the hidden requirement; or
- the player currently possesses the key.
Character state
Facts about an individual character:
- mood;
- trust in the user;
- current objective;
- health or energy in a game;
- willingness to reveal information; or
- relationship to another character.
User state
Facts about the participant:
- objectives completed;
- skills demonstrated;
- choices made;
- language level;
- inventory or progress; or
- permissions supplied by the host application.
Experience state
Control-flow facts:
- current scene or node;
- which characters are active;
- whether an escalation has triggered;
- which ending is currently possible; or
- whether the experience is complete.
Relationship state deserves special treatment
For long-running characters, one of the most interesting forms of state is the relationship between the user and the character.
A relationship is not well represented by a pile of remembered transcripts.
You may want explicit dimensions such as:
- trust;
- familiarity;
- respect;
- affection;
- fear;
- professional confidence; or
- shared history milestones.
Memories can explain why the relationship changed; state records where the relationship currently stands.
That combination gives a character much more continuity than simply telling the LLM “remember that you like this user.”
Private state matters in multi-character experiences
When several AI characters share an experience, not every piece of state should be visible to every character.
A mystery might contain:
- public state: a painting has been stolen;
- character A's private state: they saw someone leave through the side door;
- character B's private state: they stole the painting;
- hidden experience state: the player has enough evidence to unlock an accusation scene.
If every character receives all four facts, the scenario collapses.
This is why multi-character AI needs an orchestration layer that decides not only what the world knows, but what each character is allowed to know.
For more on that architecture, see Multi-Character AI: How to Build Conversations With Multiple AI Characters.
Memory can be private too
The same privacy boundary applies to long-term memory.
If a character speaks with thousands of users, memories from one person's conversations should not become available to another person's session merely because they share the same character definition.
Convai describes this explicitly in its long-term-memory system: memories are tied to speaker profiles so interactions remain compartmentalised. See Convai's memory architecture.
Any product that adds persistent user memory therefore needs identity, retention and privacy rules alongside the retrieval technology.
Knowledge is neither memory nor state
A third source of confusion is RAG.
Suppose a website assistant can answer questions from a company's documentation. The documentation is not the character's memory, and it is not the current state of the experience. It is knowledge.
A useful separation is:
- Knowledge/RAG: “What does the refund policy say?”
- Memory: “Last time, this user said they prefer annual billing.”
- State: “This user is currently on the Business plan and has already requested a refund.”
Putting all three into one undifferentiated prompt makes systems harder to reason about.
Tools and state work together
Tools let a character do things. State records the consequences.
A hotel concierge character might call a booking tool. If the tool succeeds, the experience can set:
restaurant_booking_confirmed = true
That explicit result can then affect later dialogue, UI and scenes.
Likewise, a training character might call a scoring tool or a website assistant might look up an order. The tool result does not need to remain buried in chat history. Important outcomes can become structured state.
Explicit state makes systems easier to debug
There is another advantage that is less visible to the end user.
If the experience behaves incorrectly, explicit state gives the developer or author something to inspect.
Instead of asking:
“Why did the model suddenly decide the customer trusted the learner?”
You can inspect:
- when
customer_trustchanged; - which event caused the update;
- which character saw the new value; and
- which transition rule fired afterwards.
This becomes increasingly important as experiences grow beyond one prompt and one model call.
State can reduce prompt size
Explicit state is not only more controllable. It can also be more efficient.
Imagine a 30-minute role-play where the learner established five important facts during a long conversation. The next scene may not need the entire transcript. It may only need:
- the five extracted facts;
- the relevant relationship values;
- the outcome of the previous scene; and
- a short summary of what happened.
That creates a much cleaner context package than repeatedly sending every word spoken since the experience began.
When should state persist across sessions?
Not all state should live forever.
A useful persistence model separates:
| Scope | Example | Typical lifetime |
|---|---|---|
| Turn | Current tool result | Seconds |
| Scene | Who is currently present | Minutes |
| Experience session | Trust, objectives, discovered facts | Until the experience ends |
| User progress | Completed lessons or unlocked chapters | Across sessions |
| Long-term relationship | Persistent character-user history | Potentially long-lived |
The longer the lifetime, the more carefully you need to think about identity, privacy, correction and deletion.
Example: training role-play
A learner is practising a difficult management conversation.
The employee character has a hidden concern: two managers are assigning conflicting work.
During the conversation:
- conversation history records what was said;
- state tracks
psychological_safety,root_cause_foundandaction_plan_quality; - character knowledge contains the undisclosed workload conflict;
- experience rules decide when that fact can be revealed; and
- a coaching scene later receives the relevant state plus selected transcript evidence.
The learner's questions can therefore change the simulation itself.
This is the model described in more detail in AI Avatars for Training: Building Role-Plays With Scoring, State and Feedback.
Example: an AI companion
A long-running companion character has a different problem.
It may need:
- recent conversation context for continuity;
- long-term memory of important prior events;
- relationship state that changes slowly over time;
- stable character identity and personality;
- knowledge about its fictional world; and
- current experience state, such as location or active task.
Trying to encode all of that as one endless conversation transcript is brittle. Separate layers make the character easier to control and more believable.
Example: a website sales assistant
A website character may need almost no long-term memory at all.
Instead it might need:
- knowledge of the company's products;
- current-page context;
- session state such as which needs the visitor has already described;
- tool results from pricing or availability lookups; and
- a small amount of interaction history.
This is a good example of why “add memory” is often the wrong requirement. The real need may be structured context and current state, not permanent recollection.
For the website pattern, see How to Add an AI Character to Your Website.
How Liforma thinks about state
Liforma's developer documentation describes Avatar Experiences as a platform for characters, worlds, state and tools. See the Liforma developer documentation.
That wording is deliberate.
The character is not expected to carry the entire world inside its prompt. The Experience is the larger container. It can coordinate characters, scenes, stats, tools and progression while the character focuses on behaving convincingly in the current situation.
This is particularly important for:
- multi-character experiences;
- training role-plays;
- interactive stories;
- games;
- learning experiences; and
- website assistants with tools or page context.
The experience should remember facts; the character should remember meaning
A useful design principle is to make important operational facts explicit while allowing character memory to remain semantic.
For example:
- State:
proposal_accepted = true - Memory: “The user surprised me by trusting my plan when everyone else doubted it.”
Both refer to the same event, but they serve different purposes.
The state is reliable for control flow. The memory gives the event emotional meaning when the character refers to it later.
Five rules for building believable stateful characters
- Do not use transcripts as your database. Extract important facts into explicit state or durable memory.
- Keep control-flow state deterministic. If an event determines what happens next, do not rely on the LLM rediscovering it from prose.
- Give characters only the state they should know. Multi-character experiences become much more believable when knowledge is scoped.
- Make long-term memory selective. Remember important events and preferences rather than every utterance.
- Decide persistence explicitly. A scene variable, a training score and a multi-year relationship memory should not all have the same lifetime.
Memory makes a character continuous. State makes an experience consequential.
Long-term memory is important because it lets a character recognise continuity across time.
State is important because it lets actions change the world.
The most interesting AI character experiences will use both.
The character can remember that you once helped them. The world can also know that the door you unlocked is still open, that the customer now trusts you, that the training objective has been completed or that a different character should appear in the next scene.
That is the difference between an AI that can continue a conversation and an experience that can actually evolve.