Can you enter a formal alliance with AI player?

Can you enter a formal alliance with an AI player? What level of friendliness would be needed for this? Do you get all the normal things, eg share scanning?

Also: will the AI break alliance with you if your friendliness goes negative?

No option for this AFAIK.