I recently put in code so that the AI will tell you in a conversation window that they declare war on you. What I bet is happening is that the AI see's your city is undefended, walks into your territory (silently declaring war if needed), then taking the city over.
It's in the internal build of the game. You guys will have it next time we update the public build.