Gentleman are agents in Empire: Total War and Napoleon: Total War that, when put into schools, can boost the rate of which Technology is researched. They can also be sent into rival nation's schools to steal technology.
Empire: Total War[]
Gentlemen boost research speeds when placed in schools. As they conduct research, gentlemen gain traits that increase their proficiency at research. Traits are usually focused on specific branches of technology: for example, a gentleman that engages in many turns at a school engaging in industrial technology becomes an excellent industrial technology researcher over time, but still only passable at military or enlightenment technologies. Gentlemen that specialize in one particular tech tree can become very proficient over time.
In addition to research, gentlemen can attempt to steal other factions' technology by visiting their schools. The chance of a successful theft depends on how advanced the technology is (the more advanced, the lower the chance), as well as how well-versed in research the gentleman is. Gentlemen can also engage in duels, potentially killing other factions' gentlemen (or rakes) and preventing them from engaging in activities of their own. While duels yield a higher chance of killing other agents than rakes' assassinations, they also place gentlemen at a high risk of injury or death. Dueling rakes give a much higher chance of success (75% by default) than other gentlemen (50% by default), though such opportunities are rare since opposing factions' rakes are normally invisible on the campaign map. Finally, gentlemen can move unrestricted into any territory and act as ad hoc scouts, although they are less adept at gathering information than rakes.
Middle Eastern and Indian factions have Scholars instead of Gentlemen. Scholars cannot initiate duels, but they are the identical to gentlemen in all other respects. The inability to duel can be an advantage--scholars cannot be chased away from schools or killed by other scholars or gentlemen--but it can also be a disadvantage in that they cannot do the same. On a related vein, they have no way to protect themselves from rakes or their equivalents.
In the Grand Campaign, every faction begins the game with a Gentleman or their Indian/Middle Eastern equivalent. Certain factions, such as Prussia and Great Britain start the game with excellent gentlemen.
New gentlemen spawn in schools or major cities, but only if said major cities erected research-oriented culture buildings. The chance of gentlemen spawning are higher the more schools and research buildings are built.
Napoleon: Total War[]
Gentlemen operate in a similar way to their predecessors in Empire: Total War: when placed into schools, they increase research rates. Each star a gentleman has represents one point of research. A first-tier school gives ten research points per turn, so even a default, 3 star gentleman grants a proportionally significant increase in research speed (this is particularly apparent in late game technologies, which may require over a thousand points of research). Gentlemen gain more proficient at conducting research the more technologies they research, and their proficiency is tied with their area of study. For example, a gentleman that exclusively researches military technology can obtain traits that make him more adept at researching military technology over time, but not necessarily industrial or civil technologies. Lucky gentlemen may obtain traits that benefit research from all technologies, making them useful in any field.
Gentlemen may attempt to steal other factions' technologies by visiting their schools. The chance of success depends on how many stars the gentleman attempting the theft has, as well as how advanced the technology is (the further down the tech tree it is, the more difficult it is to steal). If caught, the gentleman is ejected from the school (though he may simply return the next turn), and the faction which ordered him to steal the technology suffers a penalty in diplomatic relations. Unlike spies, gentlemen cannot be executed for failing missions.
Gentlemen may be used to duel other gentlemen and, should they appear on the campaign map due to failing to complete an assassination, spies. When a duel is initiated, the defending party can choose between dueling with swords or pistols. Both have an equal chance of success by default. Unlike in Empire: Total War, there are very few traits a gentleman can obtain to improve their skills with either weapon, so the choice is largely cosmetic. By default, gentlemen have a 50% of success when dueling other gentlemen; they have a 95% of success of defeating spies. Losers of duels can either be injured, chasing them away from their current location, or they may be killed, removing them outright from the game. Using this ability, gentlemen can help guard generals and armies by dueling any spies that fail their missions to sabotage or assassinate their targets. Gentlemen and spies work well together to root out other spies: friendly spies detect enemy spies, and then nearby gentlemen can chase them away or hopefully kill them.
Finally, gentlemen can travel the map and reveal information, though spies are better in this regard thanks to their ability to move unseen, establish spy networks, sabotage armies and buildings, and assassinate targets.