Yep...made it all myself. The gallows brackets provide stability and prevent the structure moving either sideways or backwards and forwards. They are just pieces of 6"x2" cut on a chopsaw with 45o angles on each end. (You could use 4"x2" if you don't want the curly edge...the wider wood I used allows for the curly edge, but still retains a good width) They need to be long enough to provide stability, but not so long as to be obtrusive...ie you hit your head on them. To give them a bit of a decorative look, I traced a curly bracket design ( }) on the lower edge, cut with a jigsaw then used a router with an ogee cutter to form a smooth edge. You can make a cardboard template to do this, then they all look the same. They are screwed with 4" screws through the angle at each end. As added info, the joists are joined to the rails using halving joints, and I cut a 'oriental' shaped end to each one, again using a cardboard template to get them all the same. The edges of these were also trimmed with the router to neaten them. This end shape is obviously a personal touch, and they can be finished as you desire.
Screwed though this point with a 4" screw/coachscrew.
Joist fitted to rail with halving joint and screwed down from top with 4"screw.
'Oriental' shaped end...just my take. You can finish the ends as you wish.
Just seen your last question. The uprights are 4"x4", the front rail and wall plate are 6"x2" and the joists are 5"x2". The length of the span will determine the width of the rail you need to prevent sagging. My BBQ pergola is only 10 feet across and I could get away with the measurments above. My other triangular pergola is just over 15 feet wide at the front and I used a 7"x2" for extra strength.
Essentially, the wider the span, the deeper the rail needs to be. When cutting the halving joints, make sure they are a tight fit because if they are loose, the rail could still sag. In effect, in a halving joint, the piece you cut out of one rail is replaced by the timber in the crossing piece, so it needs to be tight. You should have to tap them together, not have a sliding fit. I've waffled on a bit, but hope this helps...if you need more, just shout.