You pretty much answered it on your own, but let me spell it out for completness sake:
The easiest way to put it is probably the difference between "coming to an agreement" and "being in agreement".
合意 is made up of 合う (match, meet) and 意 (opinion) which implies that there was some effort put into making opinions match that were originally different. If I tell my friend that chocolate is the best ice cream flavour and they argue that strawberry tastes better, and after some discussion we agree that both taste great, we have come to an agreement (合意).
同意 on the other hand literally means "same(同) opinion(意)". If I tell my frined that choclate is the best ice cream flavour and they are like "Yes, totally", we are in agreement (同意).
If you make an argument, I might tell you "I agree" either because you have convinced me (合意する) or because I was thinking the same thing (同意する)
Both can be translated to "Agreeing, Agreement" but they give more insight in how that agreement was reached.