Image caption WATCH: Dave Lee's report from Seattle's red light district

Its creators say the bot is most effective when it poses as a 15-year-old girl.

You can find "her" number within fake messages placed alongside real ads on websites popular with those looking to buy sex.

Naive and innocent, the bot will tell you she is nervous and check that her age is "cool with you".

If you say yes, that's when it's revealed: you've been talking to a chatbot, and buying sex is a crime that harms women the world over.

It's a message designed to shock the recipient into reconsidering their actions, says Robert Beiser from Seattle Against Slavery.

"For someone who thinks they're anonymous, who thinks they can go on the internet and buy another human being, it's a big wake-up call."

'Forgotten'

The tool is part of groundbreaking efforts in Seattle to fight sex trafficking, an industry that like many others has moved online, and in doing so has become acutely difficult to prevent.

Men no longer need to go to the dangerous and unpredictable red light district. Instead, these digital kerb crawlers can buy women using a smartphone.

It's a safer system, but only for the men.

"It was very violent," remembers Stephanie Harris, a former sex worker turned advocate for ending the trade.

Image caption Stephanie Harris says she was left in hotel rooms for months on end

"I had a quota that I had to meet every day. I stayed in hotels for months at a time, the same room.

"Those four walls... I remember having the TV playing just so there was noise. I remember sitting in there and thinking the whole world had forgotten about me."

Using chatbots, and machine learning, specialists here believe they can simultaneously achieve two huge goals: deter men, and help women.

'Mass exploitation'

The internet has removed some of the psychological barriers and dangers of engaging with prostitutes.

"The growth of the internet has expanded the marketplace dramatically," says Val Richey, senior deputy prosecuting attorney for King County, a region that covers the city of Seattle.

"We found over 130 websites where you can buy sex in the Seattle area alone. One of those websites was averaging 34,000 ads a month last year.

"Our experience has been that there are hundreds and hundreds of people in our area being exploited, and we think there are up to 300-500 children being exploited at any one time."

One effective way of tackling the crisis has been to re-insert those psychological barriers, forcing morality into the minds of men with a reminder that what they're trying to do is wrong.

But this approach is extremely resource-intensive, often requiring specialists to engage one-on-one with the "John".

"We know that there are thousands of buyers online at any time of the day or night," Mr Richey says.

"When we post a fake ad, we'll get 250 responses in the first two hours. There's no way that law enforcement has the capacity to respond to that.

"The chat bot allows us to connect with and deter all of those buyers online at any time. We've never been able to do that."

Lifelike responses

The challenge for developers was to make sure this chatbot was authentic. Any unusual behaviour, or nonsensical response, would tip off the target.

Image caption Real Escape from the Sex Trade (Rest) offers support to women who want to leave prostitution behind

"We work with survivors of trafficking to ask them how a conversation like this would go," explains Mr Beiser.

It's the small touches that help here. Replies aren't instant. There is sloppy, bad English. It's by no means perfect, but during the bot's test phase earlier this year, 1,500 people interacted with the bot long enough to receive the deterrence message - a remarkable completion rate given the bot will ask for a selfie of the buyer as part of that conversation.

As more people use the bot, the smarter it could potentially become. The project has the backing of Microsoft, one of the tech firms leading the way on natural language research.

The bot isn't being used to arrest buyers, but that could be one application in future, Mr Beiser says.

On Aurora

The second part of efforts here is about helping women get out of the life. To learn more about that, I visited Aurora Avenue. To an unknowing eye, it's not immediately obvious what happens here.

But as Amanda Hightower begins pointing things out, the telltale signs are everywhere, such as the fast food restaurant that has pimps watching out onto the street keeping tabs on "their" women.

Ms Hightower is executive director of Real Escape from the Sex Trade (Rest). The organisation's aim is to provide a safe and secure path for women looking to leave prostitution. Her work includes everything from giving women shoes and clothes, to driving to a location in the dead of night to pick up a woman who has sneaked out while their pimp was not around.

Seattle's red light district looks precisely how you imagine - liquor stores, cheap motels and run-down car dealerships.

As we wander up a couple of blocks, we see two women walking together. Ms Hightower asks us to point our cameras away so she can talk to them discreetly. The women listen, but only for a polite moment - they know speaking to Ms Hightower, an instantly recognisable figure with fire-red hair, could be dangerous.

Image copyright Getty Images Image caption A new anti-sex trafficking bill seeks to prosecute websites that encourage ads selling sex

These interactions, which used to be the main way of reaching trafficked women, are becoming more rare as fewer women use Aurora Avenue as a way to attract business.

But online, the volume of ads is too overwhelming for an organisation like Rest to handle. And so, another piece of software has been developed, one that is able to spot known codewords and jargon used to evade pitifully dumb filters.

"We can use this software to scrape the phone numbers of the ads and send one mass text out to 200 women at one time," Ms Hightower tells me.

"If they're in a safe place, they can respond right away.

"Otherwise they can save the message and respond at a later time when it's safe to do so. It's actually made it easier for us to reach more victims of trafficking than it was before."

In some cases women have contacted Rest months after the text message was sent out. In the past year, 40 women in Seattle have gone to Rest after being reached by the tool.

A real solution

Ms Hightower thinks the success of this technology could and should be replicated around the world, though she cautions that it's not enough to just contact women - there needs to be more investment in supporting them once they have left the life. The number-scraping tool has been rolled out to 12 cities and so far identified 90,000 unique phone numbers for specialists to contact.

Advocates also back new legislation to clamp down on websites that facilitate the hosting of messages advertising the sale of sex.

After a period of disagreement, and worries new laws might be too broad, the major technology companies have finally backed the Stop Enabling Sex Traffickers Act - known as Sesta.

It could mean the owners of Backpage.com, a site described by prosecutors as a "massive online brothel", could be held liable for the advertising that appears on their site. The site declined the BBC's request for comment.

In the meantime, the work of Ms Hightower and others continues around the clock.

She says: "Just yesterday I had a young woman, who's living in our residential programme, come up to me and she's like 'Amanda! I have a car, I have a licence, I have insurance! Like... insurance! Legit!'.

"Those are the moments that make it all worthwhile and seem less overwhelming, because we know we're making a difference."

_____

Follow Dave Lee on Twitter @DaveLeeBBC

You can reach Dave securely through encrypted messaging app Signal on: +1 (628) 400-7370