There is no such thing as a party wall agreement, the correct terminology is a party wall award.
You generally need a party wall award when you are planning building works which fall into one of the three following categories.
Firstly, if you are doing any work to the wall separating a mid-terraced property, this is known as a party wall. An example would be removing a chimney place or putting new structural steels into the party wall etc. This is generally under Section 2 of the Party Wall Act.
Secondly, if you are excavating or creating new foundations within three metres of someone else’s property, generally modern excavations are to a lower level than your neighbour’s existing period property foundations. You will be required to serve notice under Section 6 of the Act.
Thirdly, where you are building a new wall on or at the boundary line (Section 1) where there was previously no wall.
This is not an exhaustive list of instances and examples of when the Party Wall Act will apply, for example there are 15 subclauses under Section 2 where works to a party wall are notifiable.