To do something sagaciously is to act in a wise and thoughtful way. She sagaciously saved her allowance until she had enough to buy a new bike — I unwisely spent mine on candy, so I'll have to walk.
The adverb sagaciously is a smart way to describe actions that arise from keen logic and deep intelligence. You can also use it for something that only appears to be done this way: "I had no idea what he was talking about, but I nodded sagaciously and changed the subject." It comes from the Latin sagacitatem, "keenness of perception," and a root meaning "to seek."