Artificial intelligence (AI) has been the talk of the investment community in 2023, as a number of companies have showcased the potential of their game-changing projects -- from OpenAI's ChatGPT to Alphabet's new large language model, Bard, designed for its Google Search platform.

The potential of this new technology is becoming increasingly clear, and the estimates for its impact on the broader economy are mind-boggling. Research firm McKinsey & Company thinks it could add $13 trillion to global economic activity by 2030, whereas Ark Investment Management predicts that number could be $200 trillion. 

Interest in artificial intelligence is now surging

It's no surprise more companies want to be involved. According to FactSet, the management teams of 110 different companies in the S&P 500 stock market index discussed AI during their earnings calls with investors for the recent quarter ended March 31. 

Not only was that an all-time high, but it was an 80% increase from 61 companies just one year ago. 

McKinsey & Company predicts the companies adopting AI the earliest will reap far greater financial rewards than those waiting until later this decade. The companies that don't use AI at all by 2030 could actually experience a decline in their free cash flow.

With that in mind, here are two companies at the forefront of AI, and investors can buy them right now.

1. Tesla

Electric vehicle powerhouse Tesla (TSLA 2.87%) has been working on AI for a decade. It's applying the technology to its autonomous self-driving software, which will form the foundation of its much anticipated robotaxi. The software is already in beta mode with an estimated 2.7 million customer vehicles currently on the road gathering data, and Elon Musk thinks it will be ready for public release later this year. 

It could change the face of the passenger vehicle industry. In an interview with CNBC's David Faber, Musk said the average person uses their car for between 10 and 12 hours per week, so it spends most of its time parked at work or at home. By installing autonomous driving software, that same car could spend 50 hours per week serving in a ride-hailing network, earning money for both its owner and for Tesla. 

An estimate by Ark Investment Management suggests this emerging industry could generate $4 trillion in revenue per year as soon as 2027. Tesla will earn revenue from the sale of its software, and from taking a split of the ride-hailing fees generated by each customer vehicle. Musk says this will transform the economics of manufacturing each Tesla vehicle, sending its gross profit margin from 25% to as high as 70%. 

No other car company is anywhere near as far along in the self-driving space, and since Tesla is already the only truly profitable pure-play manufacturer of electric vehicles, the widespread adoption of autonomous technology could add trillions of dollars in value to the company in the long run. 

But that's not the only area in which Tesla plans to use AI. Earlier this year, it revealed the latest prototype for its Optimus humanoid robot, which has the potential to replace human workers in low-skilled jobs like manufacturing. It's still several years from mainstream release, but Tesla intends to sell millions of units at a price of roughly $20,000 each starting in 2027. 

Tesla is inching closer to monetizing AI at scale, and the potential value of its opportunities is enough to warrant buying its stock today. 

Two autonomous robots carrying boxes through a fulfilment center.

Image source: Getty Images.

2. Amazon

Amazon (AMZN -0.46%) is best known as the world's largest e-commerce company with over $220 billion in online sales last year alone. There's an army of 520,000 AI-enabled robots behind that success, helping to run its fulfillment centers, which makes Amazon the single largest player in the robotics industry. 

Robots can operate around the clock, they don't need benefits, and they never take days off, so they're a game-changer when it comes to productivity. Amazon focuses on selling goods in high volumes by charging consumers low prices, so its e-commerce segment runs on a razor-thin profit margin and often generates operating losses. Saving money on its fulfillment operations can be the difference between making and losing money over the long term, and more robots will equal greater efficiency.

According to Ark Investment Management, the average robot could pick and pack 30 items per hour in 2015. Thanks to rapid advancements in the industry, fulfillment robots can now pick and pack 1,000 items per hour, making them 2.5 times more efficient than humans, who can typically process 400 items per hour. 

Amazon is also the largest provider of cloud computing services in the world through its Amazon Web Services (AWS) platform, and it's quickly becoming a key distributor of AI technology. AWS was the first cloud provider to run Nvidia GPUs in its data centers, and in March, it announced another significant collaboration with the chipmaker to enable its customers to train larger language models than ever before on the new Amazon EC2 P5 instances. 

It will allow enterprises both large and small to scale from 10,000 GPUs of computing power to 20,000 GPUs, for on-demand access to supercomputer-like performance to train the most advanced AI applications. AI start-up Anthropic -- which was founded by ex-OpenAI executives -- plans to use EC2 P5 instances to further its deep learning research as well as the development of its AI models.

This is a key advancement in the battle against AWS' closest competitor, Microsoft Azure, which is investing heavily in AI services for its cloud customers. Overall, I think Amazon has a path to a $5 trillion market valuation in the long term, and its presence in industries like robotics and AI will be major contributors.