Knees just slightly bent at the base of the pedal stroke. If you are locking out your knee the seat is too high.
Typically you should be able to put a foot down and be on your tip toes, butt on the seat and the other foot on the pedal. But usually you are supposed to come off the bike and straddle the top tube when you stop.