I don't think this is too hard to code. Though, it will be a major pain to do so. There are too many possibilities for proposals and counter-proposals (Why do you think the activision dudes gave up on the diplomacy AI

. They would rather have us unpaid players do the job for them!).
One caution is that it is not clear how the AI selects the best competing proposal. The way the AI is structured, you can only SUGGEST a "ConsiderProposal", not FORCE it. In the mods I tried to make, NOTHING, not even a super high priority, could make the AI accept anything more than map/gold kind of exchanges, unless it totally loved you.