Robots are becoming smarter and more agile all the time. They already work in hospitals and restaurants, help us around the home, and cater to our needs. But some of these robot personal assistants are going to be more personal than others. Sex doll manufacturers and independent roboticists are now designing and building humanlike robots that people can have sex with.

It will be awhile before these robots really look or act like people. But the sex toy industry — worth billions of dollars globally — is primed for penetration by robots. One of the early entries into this market is an animatronic head named Harmony that's infused with artificial intelligence to give it a personality and the ability to “learn” about its human partner. Harmony will connect to the silicone body of a RealDoll, a life-sized sex doll that’s been around for 20 years.

Related: 'Homo Deus' Could Replace Humans as Tech Evolves

The first sex robots won’t be able to caress, grab, or thrust against their human lovers. But more intelligent, more mobile, and more realistic robots will soon become available, which may challenge our view of sexual interactions with machines. Some believe that sex robots will enrich people’s lives as emotionally and sexually available companions. Others will find sex robots perverse or worry that they will erode the relationships between people.

“There’s a knee-jerk reaction to either laugh at it or ridicule it or just go, ‘Oh that’s gross,’” says Matt McMullen, CEO of Abyss Creations in San Marcos, Calif., the company behind RealDoll. “It’s not about replacing people. It’s more about creating an alternative for those that desire it.”

Meet Harmony

Realistic sex dolls have been used in private for years. Some even staff a bordello that recently opened in Spain, but they can’t really interact with users.

“Right now they’re still more dolls than robots,” says Julie Carpenter, a research fellow in the Ethics + Emerging Sciences Group at California Polytechnic State University in San Luis Obispo. “None of the available models are very intelligent or even mobile,” she added in an email.

Related: Let Robots Teach our Kids? That's Not Such a Bad Idea

The dolls are not lively company, and can’t banter with or remember details about the people who have sex with them. “They’re non-participants," McMullen says. "They don’t have any kind of personality or substance other than [what] the user might be imagining." He’s planning to change that with Harmony.

Harmony can move its lips and eyes, turn its neck, and mimic various human expressions. More importantly, it’s connected to a mobile app through which users can program its personality and choose how much to dial up 18 different traits, including being “kind,” “intellectual,” “shy,” “jealous,” and “adventurous.” Harmony’s AI also lets it converse with users and learn about their quirks and interests. Its mood even shifts depending on whether or not it's treated well.

A worker inspects a RealDoll Abyss Creations LLC

The AI is “essentially creating the illusion of the more you interact, the more you get to know each other,” McMullen says. “As human beings, we crave that connection…so I think that companionship is going to be a bigger draw, frankly, than the sex part.”

RealDoll is taking pre-orders for Harmony and hopes to start building the first round late this year. The highest-end models of Harmony will have a vision system that allows them to recognize faces and objects, read expressions, and follow people with their eyes. This advanced version will cost around $10,000 (versions without this technology may be closer to $5,000). Buyers will be able to tailor Harmony to their tastes by selecting among different faces.

Most sex dolls are made with straight men in mind, but Abyss Creations and TrueCompanion are also working on male counterparts. “Right now the market is showing a pretty limited view of what a sexual image is, and I think that that’s going to broaden over time,” Carpenter says.

It hasn’t been easy to make Harmony convincing. One challenge has been getting the robot’s lips to move in time with her voice. Also tricky are the subtle shifts that keep her facial expression in tune with the conversation she is engaged in. But Harmony’s creators don’t want to make her too lifelike yet because people often get creeped out by robots that look almost — but not quite — human, a phenomenon called the uncanny valley.

“There’s something a little off-putting sometimes when it’s too realistic,” McMullen says. With time, people should become used to seeing humanoid robots out in the world. And when that happens, sex robots can become more realistic in appearance, he says.

Harmony can mimic human expressions while engaged in conversation. Abyss Creations LLC

And future sex robots won’t be confined to talking heads. McMullen plans to add sensors to various body parts of dolls so future generations of Harmony will be able to sense touch and motion and react.

RealDoll isn’t the only company working on sex robots. In Las Vegas, Roberto Cardenas of Eden Robotics is developing a prototype named Eva that he says can perform more than 20 sexual acts. Then there’s Roxxxy, the talking mannequin that True Companion has been supposedly revamping since her disappointing debut in 2010. Details about what she can do are sparse, but the company claims that she will be able to sense touch and mimic orgasm.

Eventually, sex robots may come with lifelike skin, bodily secretions, and the ability to mimic breathing. “Soon there will be sex robots that can sweat, emit body heat, hold a conversation, and of course, move and walk,” Carpenter said in an email.

Robots among us

When mobile, humanoid sex robots do arrive they won’t be cheap.

“We might actually see a boom in robot brothels early on because it will be a less expensive way for people to experiment,” Carpenter said. But once the price comes down, it will become easier (and likely more common) for people to bring a sex robot into their home.

Such a robot may be dedicated to pleasure — or sex might be just one feature a robot personal assistant offers. Sex robots could be sent to deployed troops, and perhaps be operated remotely by human partners back home. Some experts think sex robots could even reduce human trafficking, although the robots may be too expensive to buy and maintain to dissuade traffickers.

So who is going to buy these things? Some people are likely to be intrigued by the idea of sex with a robot, or just a nonjudgmental, tireless partner. Others may be lonely because they have trouble connecting with people or because they live in remote areas that offer few human companions.

“As human beings, we crave that connection… so I think that companionship is going to be a bigger draw, frankly, than the sex part.”

Meanwhile, activists against sex robots fear that users might neglect their human connections in favor of their robotic paramour, or treat people the same way they treat an owned sexual machine.

Alternatively, sex robots might bring people closer together. Couples might call in a sex robot for threesomes, or people who have struggled socially could use sex robots to practice bonding with others.

“We subconsciously treat robots like living things, so our interactions with them have the potential to influence our behaviors in both helpful and harmful ways,” Kate Darling, a researcher at MIT who specializes in robot ethics and human-robot interactions, said in an email. We don’t yet know what these effects might be because no one has had a chance to study them.

People may even fall in love with their robots, and as they become more humanlike and intelligent, some may want to bring their companion out in public or tell their friends that they have a crush on a certain sex robot. Over time, Carpenter says, etiquette will evolve to guide these situations.

And whether companies that make sex robots might collect information without users’ permission is still a concern. “A lot of people wouldn’t even want their Google searches to be made public, let alone a company gathering data on what they enjoy doing with their sex robot,” Carpenter says. “Or if that data’s hacked and held for ransom…that would be pretty traumatic.”

As with drones and self-driving cars, the technology will likely arrive before there are laws in place to govern it.

Dawn of the sexbots

Voice recognition technology has made it easier to design AI that can help Harmony and other robots interpret what people are saying and fire back a response. However, AI continues to struggle with natural speech and is probably more than 25 years away from actually simulating a person, as are self-aware sex robots so realistic we can’t tell them apart from people.

Related: These Freaky-Looking Robots Can Do Amazing Things

But the first wave of sex robots is not far off. In the next five years, we’ll have a better grasp of sex robots’ capabilities, McMullen says. And as humanoid robots become common in all areas of society, sexual companion robots will likely become more normal as well.

“If you have a movie like "Her" come out, it’s extremely popular, everybody gets it…they have empathy for the protagonist who falls in love with a completely disembodied AI,” Carpenter says. “But then if you bring up the idea of a sex robot people will comment that it’s appalling, that they would never be with a sex robot, they can’t imagine doing it…I think that that attitude is going to change as the robots become available.”

FOLLOW NBC MACH ON TWITTER, FACEBOOK, AND INSTAGRAM.