“So do we have an agreement?”
Your teenage son has been misbehaving at school. You want him to start behaving better, so you tell him that if he behaves well at school, you'll let him get a new cell phone. But if he doesn't behave, he'll be punished. He seems to agree with that plan. You hold out your hand to shake hands with him, and ask this.
So do we have an agreement?
This phrase is used at the end of a negotiation, to finalize the negotiation. Once you ask this, and the other person agrees, the negotiation is finished and you have both agreed to the terms that were discussed.
Other similar phrases used in this kind of situation are:
Do we have a deal?
Do we have an understanding?
For "an understanding", the two people don't have to agree on something; they just have to know what the other person is thinking. It's sometimes used between people who are enemies or who disagree with each other.
If you want to ask for someone's decision, you can start with "So":
So, what do you think? Should we do it?
So are you coming or staying here?
It only makes sense to use "so" if the listener has already heard about this decision before.