I use the AI flip flopping to my advantage.
Carthage and Persia exist for years with no war between them. Carthage and Persia both help me (Hiawatha) rid the world of the Celts and Dutch. Carthage and Persia sign a MPP. Persia declares war on me when I fail to plant a spy.
So what will Carthage do? Will they break their MPP with Persia? Yes they will help me rid the world of the Persians for combustion since I'm the most powerful nation in the world and have the lead in science.
Another example:
I have just met the civilizations on the continent on the other side of the world. I have a minor skirmish with the Egyptians on my continent (I of course declared war first before attacking) to ensure I am the only civilization with cities on my continent. Upon ending the war and meeting all the other civilizations, I sign right of passage agreements to them so that they will be more friendly and so I can make better deals. Then I place a few cities on the edge of the New World with the intent to rush build airports in them and launch a full scale invasion from there.
Suddenly a few turns after the Russians approach my cities in the New World. What are they doing? I check our trade deals and see that ROP still has 7 turns left. I begin to get suspicious of their behavior. Surely they wouldn't be stupid enough to violate the ROP...NOPE! They were stupid enough! They take my cities in the New World and I enlist everyone, including Egypt, to attack them and destroy them.
As long as you declare war before entering a civilization territory and after cancelling any turn based deals, and as long as you keep every agreement you make you can get anything you want out of any civilization. Sometimes it can be for a price, especially if they are larger than you. If they are smaller than you the price will be much lower. There have been times where I've made peace with an AI civ after taking all but 2 or 3 of their cities because they were too far away to capture at the time. The AI civ that has 2 or 3 cities left will ask you for a MPP and ROP as long as your reputation is solid EVEN if they are furious with you.
So in summary, it's all about rep. Get the AI's to dogpile the traitors and those who "sneak attack" while being careful to preserve your reputation until it is no longer relevant (like when there are only 2 or 3 civs left in the game and you can conquer them in just a few more turns.)