These are kinda popular today in the form of AI Dungeon, NovelAI, FictionLab etc.
Basically you create characters with bios, traits. Then a setting/context. Now, as you write your story, you can have multiple characters involved and they'll act from their perspective and traits.
Then these also have lorebooks with triggers, so if you mention The Barking Dog Inn, the AI and the characters will know what you mean and your characters with an outgoing personality type will be more eager to go there than others etc.
Finally, these systems usually have a long term memory where key events are saved and the AI remembers.
So a lot of this already exists!