How AI Characters Work: Memory, Persona & LLMs Explained