Dig a flat-bottomed trench surrounding the existing patio. This is where you will install your brick edge. Square off the edges and sides of the trench and tamp the soil down firmly.
Insert stakes at each corner of the four sides of your patio. Drop a brick on its long, narrow edge into the trench, with the wide side of the brick facing the patio, and run a mason's line along each side, using the brick's top edge as a guide for height.
Place the bricks in a line in the trench in the same way as you placed the first brick, using your mason's line as a guide to ensure the bricks are straight. Remove or add soil to the trench to keep the brick height consistent with the guides. Secure the bricks by firmly tapping them in with a rubber mallet.
Take caution when installing the last brick on each side of your perimeter. Ideally, choose a brick that fits your space without cutting. If necessary, first score the brick along the cut line with a brick chisel and a hammer, then place the brick flat on the ground and strike the chisel firmly with your hammer along the cut line.
Install all four sides of the patio edging as described, using mason's lines as guides. Check the corners using a framer's square.