In The Spy Who Dumped Me, Audrey (Mila Kunis) gets ditched by text message. Egged on by her bestie, Morgan (Kate McKinnon), she is setting fire to her ex’s belongings when he shows up – only for him to be assassinated right in front of them. Yes, he was a spy. Saddled with the film’s MacGuffin, a flash drive, the two women flit between European capitals, dodging bullets, flirting with agents of both sexes and racking up an unexpectedly brutal body count for a comedy thriller.

Until recently, the role of the archetypal female in spy action thrillers was confined to providing the protagonist with a sexy one-night stand: wham, bam, thank you, ma’am, if she’s lucky. Or, if she isn’t, wham, bam and, oops, she has been drowned or shot or asphyxiated by gold paint or crude oil. If the women were wives or girlfriends, they got kidnapped or murdered, as if the heroes weren’t altruistic enough to save the world without a more personal motive to do the right thing.

Now, though, not only have we been treated to a number of movies in which the agents or hitpeople are themselves female (Atomic Blonde, Unlocked, Proud Mary, Terminal), but also a subgenre that mashes together the romantic-comedy and the action thriller. The Spy Who Dumped Me is the latest of these throm-coms, if you like, in which the female point of view is adopted, and the heroine is invariably unaware at the outset that her boyfriend or husband is leading a double life. She still has an unfortunate tendency to get kidnapped, but at least she is allowed a semblance of an existence beyond that of a mere bargaining chip.

Marital drama … Brad Pitt and Angelina Jolie as husband-and-wife assassins in Mr & Mrs Smith. Photograph: Allstar/20th Century Fox

We saw this plot before in True Lies (1994): for 15 years, Helen Tasker (Jamie Lee Curtis) has somehow failed to twig that her husband (Arnold Schwarzenegger) isn’t a boring computer salesman but has been jetsetting around the globe fighting international terrorism. And in Killers (2010), jilted Jen (Katherine Heigl) takes a shine to good-looking Spencer (Ashton Kutcher), not noticing when he nips out between dates to blow up a helicopter. In The Spy Next Door (2010), little does Gillian (Amber Valletta) suspect that her boyfriend (Jackie Chan) is an ex-CIA agent with top-secret formulae on his PC. In This Means War (2012), Lauren (Reese Witherspoon) is dating two guys (Chris Pine and Tom Hardy) without realising these love rivals are both CIA agents. In Knight and Day (2010), on the other hand, June (Cameron Diaz) can’t help but cotton on to the truth fairly quickly, when the bloke she fancies (Tom Cruise) dispatches an entire flight crew before crashlanding the plane they’re on.

The formula is played straight in Mission: Impossible III 2006), in which Ethan Hunt’s fiancee knows nothing of his double life until, inevitably, she gets kidnapped by the villain. And it gets a couples variation in Mr and Mrs Smith (2005), in which a husband and wife (Brad Pitt and Angelina Jolie) discover they are also the world’s two most deadly (but clearly not most observant) assassins. And also in Keeping Up with the Joneses (2016), in which Jeff (Zach Galifianakis) and Karen (Isla Fisher)’s dull suburban marriage gets some much-needed zing when their new neighbours turn out to be spies.

However, none of these throm-coms strikes the balance between romance, comedy and thrills as perfectly as the chic prototype for the subgenre, Charade (1963), in which the newly widowed heroine (Audrey Hepburn) learns that no man, not even her late husband, is to be trusted.

Perfectly chic … Cary Grant and Audrey Hepburn in Charade (1963). Photograph: Allstar/Cinetext/Universal

In real life, when women unwittingly form long-term relationships with men who are later outed as undercover cops, they are understandably left traumatised by the revelation that they have been living a lie. But serious trust issues rarely intrude on the frothy film versions, in which the final reel often shows the heroines joining their menfolk in the glamorous spy game. The Spy Who Dumped Me doesn’t exactly rewrite the rule book, but it does sideline romance in favour of the plot’s true fulcrum: female friendship.

One day, perhaps, someone will make a more faithful adaptation of The Spy Who Loved Me than the 1977 Roger Moore movie, which used the title but not the plot of Ian Fleming’s attempt to write a James Bond story from the point of view of the Bond girl. In the novel, 007 is almost a secondary character, who pops up in the nick of time to rescue the narrator from being raped and murdered. Though compromised by Fleming’s inability to create convincing female characters (and later disowned by by the author himself), it is a neat subversion of his other novels, concluding rather wistfully that dashing secret agents, even when they are good guys, are still sociopaths incapable of forming meaningful relationships, and definitely not good boyfriend material.

•The Spy Who Dumped Me is released on 22 August.