What size knee braces should I install on my Pergola?
That's a beautiful pergola, and to preserve its style I would use the same timbers as you used for your posts. I'd make the vertical and horizontal legs of the triangle 1/3 of the post height, unless that causes serious headroom interference, then reduce a bit to no less than 1/4 of post height. Much less than that and you won't see much benefit.
I'd make all the knee braces the same length, so that they interface with the posts at different heights due to the rafter height.
The connection between the rafters is fairly straight-forward. The connection at the post is less so. Large lag screws, countersunk and level, or carriage bolts all the way through would be good. That connection will have the most tendency to slip, reducing the effectiveness of your effort.
Here's a similar example courtesy of StrongTie. In this case the knee braces connect to the post at the same height, but I pictured yours being vertically offset (to match the height of the rafters). I would also deviate from this photo by running the bolts in horizontally. You'll need shorter bolts and I think you'll end up with a better connection.