Tricks that do not put stress on the dog knees.
Nose touches - to hand, or anything else you nominate.
finding things and barking to indicate (or fetch if appropriate).
Not entirely sure about this - but various forms of foot targeting with the healthy end of the dog. Eg if he's buggered a joint at the back then targeting things with front foot, shake hands, stand on mat.
Barking, singing and talking tricks.
Ear flick and head tilt, nod, shake tricks.
Stuff that involves walking, running and changing directions - not so much, ie avoid.
Susan Garrett has a couple of blog pages listing hundreds of tricks so there's probably some more in there a dog with dodgy legs could do.
Failing that, you'll have to get him a wheel chair.
Sue Runs Zip in Wheelchair for Glory Run at Five Flags Agility Trial 12-3-11 - YouTube