I think artificial intelligence (AI) could create some of the biggest investment opportunities of the next decade.
While US giants generally take the headlines, several ASX shares are helping build the computing and digital infrastructure needed to support that growth.
Here are three shares I would consider for long-term AI exposure.

Image source: Getty Images
NextDC Ltd (ASX: NXT)
NextDC is one of the most direct ways to invest in the physical infrastructure behind AI.
Training and running increasingly powerful models requires enormous computing capacity. That creates demand for data centres with access to electricity, advanced cooling systems, strong security, and reliable connections to cloud providers and other networks.
NextDC is investing heavily to build this capacity across Australia and Asia. Importantly, the expansion is being supported by customer demand rather than management simply hoping the capacity will eventually be filled.
The company's contracted utilisation reached 667 megawatts in March, while its forward order book stood at 544 megawatts.
I think this gives NextDC considerable visibility over its future growth. The company still needs to fund and deliver a large development pipeline, but its growing customer commitments show that AI infrastructure demand is already becoming commercially meaningful.
Goodman Group (ASX: GMG)
Goodman provides another way to invest in the data centre build-out.
Suitable facilities require far more than a large building. Developers also need to secure land, planning permission, substantial power connections, and access to major customer markets.
Goodman has spent years assembling these ingredients across some of the world's largest cities. Its global data centre power bank now stands at 6.4 gigawatts across 16 international cities, including completed facilities, secured power, and potential future projects.
I believe that access to powered sites is becoming increasingly valuable as AI companies and cloud platforms compete for data centre capacity. Goodman can develop these properties for major customers while continuing to earn income from its wider logistics portfolio.
Data centre developments require significant capital and can take years to complete. However, Goodman's experience, global relationships, and access to scarce locations put it in a strong position to participate in the growth of AI infrastructure.
Megaport Ltd (ASX: MP1)
Megaport has become a more direct AI investment following its acquisition of Latitude.sh.
The company has traditionally helped businesses connect data centres, cloud platforms, and applications through its software-defined network. This connectivity becomes more important as AI workloads are spread across different locations and computing providers.
Latitude.sh adds the computing layer. Its bare-metal cloud platform allows developers to deploy dedicated physical servers, including graphics processing unit capacity for demanding AI workloads.
Megaport can now offer Compute as a Service through Latitude.sh and connect that hardware directly to its global network. Customers can access dedicated computing infrastructure and move their data between clouds, data centres, and applications through the same wider platform.
I think this could open a significant new opportunity for Megaport. The company is moving from connecting digital infrastructure to also providing some of the computing power that runs on it.
The acquisition still needs to be integrated successfully, and competition for AI computing customers will be intense. Even so, the combination gives Megaport more ways to benefit as companies invest in AI.
Foolish takeaway
AI spending is increasingly flowing into data centres, powered sites, computing capacity, and the networks connecting everything together.
NextDC, Goodman, and Megaport each provide exposure to a different part of that expansion. I would be comfortable buying all three ASX shares with the intention of holding them for many years.