Mary Bennet is an agent with British Intelligence.
Well, perhaps that is not totally true; the woman who would become her boss (or handler in today's parlance), Lady Trafford, more accurately identifies the organization she is in as "a network that seeks to fight against those who, knowingly or unknowingly, would undermine our country". As there does not appear to be an official department for espionage work in the year 1813 when these adventures begin, going with British Intelligence seems as good a description as any.
[Note: Before advancing any further here, it is important to note that the Mary Bennet in these tales is the same one first met in the terrific, classic tale recounted by Jane Austen in her novel Pride and Prejudice, dealing with the need for at least one of the Bennet sisters (there were five altogether) to marry before the death of their father and their loss of home and security. Mary is the middle sister, the one just younger than the protagonist of that story, Elizabeth.]
The death of Bennet's father has put her in a poor financial situation so she is reluctantly amenable, after some time to consider her options, to an offer of a position in household of Lady Trafford, an elegant but stern woman who showed up a bit before the funeral to pay her respects to her distant deceased relative.
That would find her moving to Castle Durrington, near Worthing, in Sussex. It is there she will find herself propositioned to be a spy by more than one group, each leery of the other, culminating in become one of Lady Trafford's operatives. Once she accepts that offer, she will be trained at length by the inimitable and daunting Lady Trafford and her very capable and handsome nephew, Withrow. She will also becomes collegues with fellow operative Fanny Cramer, herself a most interesting individual.
The primary concerns for Lady Trafford's group, and therefore Bennet, is the immediate threat to all of Europe posed by the military might and hunger of Napoleon Bonaparte, as well as those inside the British power struggle who saw financial benefit in French Emperor's ambitions to the detriment of the British people.
-Said by Mary Bennet when she is accused of thinking highly of herself, "There is no virtue in false modesty".