Diplomacy with AI nations is, unfortunately, very difficult. The AI will only become hostile after they have decided that you are enough of a threat, and when that line is crossed, there's no going back.

In order to delay AI aggression, you can offer friendly and beneficial diplomatic relations with other nations. This will make you seem less aggressive, and buy you time until you're good and ready for war.

In short: The AI is very unlikely to accept a ceasefire, so plan to see that battle through.