How to maintain the state of a conversation?

Any ideas on how to maintain the state of a conversation. How do a human maintains the state of the conversation.
What is your ideas and opinion on it. And any implementation ideas, resources or any books (theories, paper works) you guys know on this?

Eg:
//This is a conversation between a machine (program) and a human.

user> who programmed you?
bot> I am programmed by XYZ
user> where can I find him?

If the state of the conversation is maintained or (if the bot can have a notion on that) then the bot replies like:

bot>he can be found at ABC place // or some thing like that.

If such a conversation takes place between humans they can get what it means.
But if no state is maintained then the use when asked
user> where is** he ** or where can I find him , the bot can’t answer.
else the user should ask like:
user>where is XYZ or where can I find XYZ.

But in a normal human conversation one doesn’t go on repeating words like that.

So how do humans get a notion. I’m thinking on it. You too think on it.
Basically I’m running out of time thinking these stuff :wink:
Thanks.