As for alliances, they can be made to last. Just never, ever depend on the AI not attacking you. My understanding is that after looking at defensive needs (which, I'm sure you've noticed, it tends to do poorly with), the AI looks at each stack and searches for a nearby target for it to attack. If your settlements are closer to the AI's unit production centers than the other possible enemies', you're likely to be attacked. There are ways to reduce this risk:
- Keep strong garrisons in all border settlements. In RTR-PE, I like to keep a full stack composed of at least half front line units (rather than inexpensive garrison units I use for my internal settlements).
- Keep fleets (even one ship) in port near the edges of your territory and anywhere else the AI seems to like to blockade.
- Give your ally 100 denarii per turn in tribute. The AI overvalues that long term gift.
- Avoid having land borders with allies when you can.
- Never, ever violate any ally's territory with troops or spies if you don't have military access. That just devastates your internal reputation with other allies. I don't tend to put spies into non-enemy settlements anymore because I think it annoys nations other than the one which you've been spying on.
- Finally, fight a shared war. The allies who've never betrayed me are the ones whom I've fought with repeatedly in shared battles. One that stands out in my mind is Armenia in my Sarmatian campaign. I had military access with them (you have it at the start of an ExRM campaign), so whenever someone besieged an Armenian settlement I broke the siege. I shared a border with them for 100 turns and they never once sent an army towards my settlements.
- If the AI randomly and stupidly blockades your port, you can try reloading and running the AI turn again. More often than not, it will avoid doing it the second time around.
Lastly, be aware that you can only mitigate the chance of the AI doing something stupid. Sometimes (especially on difficulties harder than medium), the AI seems to decide that it has to go after the human no matter the cost.