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

# Pro: Memory Persistent NPCs

NPCs have configurable persistence behavior. The Auto-Trim policy, e.g. Full reset (keep system), controls how context is trimmed when the window fills, with Percent to Drop (30%), Fixed Tokens to Drop (1000), and Token Reset Padding Window (50). Persistence Mode (Override) sets per-NPC behavior.

<Frame>
  <img src="https://mintcdn.com/gladestudio/KlmEH_MHrxy6yeXz/images/unreal/UE_MemoryPersistenceSettings_Pro.png?fit=max&auto=format&n=KlmEH_MHrxy6yeXz&q=85&s=afb536a17ca0b624459c2506a2147fa7" alt="UE Memory Persistence Settings Pro" width="1245" height="249" data-path="images/unreal/UE_MemoryPersistenceSettings_Pro.png" />
</Frame>

## **Persistence Modes**

* **Always reset**: no memory between sessions
* **Resume same NPC**: wipe only when a different NPC is loaded
* **Full persistence**: saves to disk, never auto-deleted
* **NPC Save Files**

## NPC Save Files

See the default Save file location below.

<Frame>
  <img src="https://mintcdn.com/gladestudio/KlmEH_MHrxy6yeXz/images/unreal/UE_PersistenceNPC_NPCSaveFileLocation.png?fit=max&auto=format&n=KlmEH_MHrxy6yeXz&q=85&s=d829fa59f1c7f0a6e160ac5cb880b408" alt="UE Persistence NPC NPC Save File Location" width="1242" height="278" data-path="images/unreal/UE_PersistenceNPC_NPCSaveFileLocation.png" />
</Frame>

When persistence is enabled, NPC state is serialized to `<ProjectSaved>/GladeCore/Sessions/<PersonalityAsset>.glade-state.json` (e.g. DA\_DemoNPC1.glade-state.json). The file contains chat history, system prompt, and any compressed memory tiers. Writes are atomic (.tmp + rename) to avoid corruption, with a 256 KB warning threshold and 10 MB hard limit.
