I got a question for you: The Office employs an ensemble cast. Many characters portrayed by The Office cast are based on the original British series. While these characters normally have the same attitude and perceptions as their British counterparts, the roles have been redesigned to better fit the American show. The show is known for its generally large cast size, with many of its actors and actresses known particularly for their improvisational work. Steve Carell stars as Michael Scott, regional manager of the Dunder Mifflin Scranton Branch. Loosely based on David Brent, Gervais's character in the British series, Scott is a well-intentioned man whose attempts at humor, while seemingly innocent to himself, often offend and annoy his peers and employees, and in some situations lead to reprimanding from his superiors. Rainn Wilson portrays Dwight Schrute, who, based upon Gareth Keenan, is a salesman and the assistant to the regional manager, a fictional title created by Michael. John Krasinski portrays Jim Halpert, a salesman and, in later seasons, co-manager who is often known for his wittiness and his hijinks on Schrute (often accompanied by Pam Beesly). Halpert is based upon Tim Canterbury, and is known to have feelings for Pam, the receptionist. Pam, played by Jenna Fischer, is based on Dawn Tinsley. She is shy, but in many cases a cohort with Jim in his pranks on Dwight. B.J. Novak portrays Ryan Howard, who for the first two seasons is a temporary worker but is promoted to sales representative in the third season. He later ascends to the position of vice president, North East Region and director of new media until his treachery was exposed for corporate fraud and he was fired. After this, he gets a job in a bowling alley and then briefly works for the Michael Scott Paper Company. After all this, and a stint in rehab, he eventually ends up again as the temporary worker at the Scranton branch.

Answer this question: who does john krasinski play in the office?
Let's think first:
The relevant information is: John Krasinski portrays Jim Halpert, a salesman and, in later seasons, co-manager who is often known for his wittiness and his hijinks on Schrute (often accompanied by Pam Beesly).
Therefore, the answer is Jim Halpert.