Can an AI be made to maintain a train of thought? This mostly refers to human-like or chatbot AI, but could maybe be used in other applications (math or something?). 

Basically, it occurred to me, that when I'm thinking or speaking, there is a constant feedback loop, in which I am formulating which words to use next, which sentences to form, and which concepts to explore, based on my most recent statements and the flow of the dialogue or monologue. I'm not just responding to outside stimulus but also to myself. In other words, I am usually maintaining a train of thought.

Can AI be made capable of this? If so, has it been demonstrated? And to what extent? While typing this, I discovered the term "thought vectors", and I think it might be related. 

If I read correctly, thought vectors have something to do with allowing AI to store or identify the relationships between different concepts; and if I had to guess, I'd say that if an AI lacks a strong understanding of the relationships between concepts, then it would be impossible for it to maintain a coherent train of thought. Would that be a correct assumption?

(ps. in my limited experience with AI chatbots, they seem to be either completely scripted, or otherwise random and often incoherent, which is what leads me to believe that they do not maintain a train of thought)
First, for almost every question of the form "Can AI be made to X", the most obvious and straightforward answer is something like "We don't know. Probably, but if it hasn't been done yet, we're really not sure."

It's also important to understand that, from a technology standpoint, there isn't one "thing" called "AI".  There are many, many different technologies, which are loosely related (at best) and are generally lumped together under the overall rubric of "Artificial Intelligence".

All of that said, yes, there has been work on adding memory, even long-term memory, to various kinds of "AI".  The most notable recent example is the advent of LSTM in recurrent neural networks.  

Additionally, some of the work done on "cognitive architectures" has focused on the use of memory.  For more info on that, look up ACT-R and/or SOAR and read some of those papers.  

What isn't clear to me offhand, is whether or not anybody has tried applying any of these techniques to chat-bots in particular.  I wouldn't be surprised if somebody had, but I can't cite any such research off the top of my head.