They are all correct.
However, the last two have different meanings.
'We finally agreed on these conditions' means that you and somebody else have been formulating conditions for a third party to abide by.
'We finally agreed to these conditions' means that you and somebody else accepted conditions which a third party had required.
- For Teachers