A deal with OpenAI could put Amazon first to market with a new type of AI service for developers — but the two companies will have to tread carefully to avoid running afoul of OpenAI's deal with Microsoft . Why it matters: If successful, Amazon Web Services could land in the more enviable position at the leading edge of generative AI rather than being forced to compete mainly by delivering models more cheaply than rival clouds. Driving the news: Amazon and OpenAI on Friday announced a multi-pronged deal that calls for Amazon to invest up to $50 billion in OpenAI, with Amazon getting access to a variety of OpenAI services. The most notable piece: Amazon would be first to offer a new kind of computing they are calling "stateful runtime environment." Basically that means that Amazon would deliver OpenAI's algorithms to businesses along with context, such as which user made the request and what they've asked before — similar to how ChatGPT remembers past queries. That distinction matters because Microsoft has the exclusive right to deliver traditional API calls, which is where developers pay to query OpenAI services without sharing who is asking or for what purpose. The big picture: OpenAI and Amazon argue so-called "stateful" systems better reflect how AI agents will operate in production. "A lot of agent prototypes based on stateless APIs tackle simple use cases: one prompt, one answer, maybe one tool call," OpenAI said in a blog post . "Production work is different. Real workflows unfold across many steps, require context from previous actions, depend on multiple tool outputs, approvals, and system state, and need trusted guardrails in secure environments." Yes, but: These systems must be structured so they're usable for customers — without violating the terms of Microsoft's OpenAI agreement. The big picture: Amazon's web services unit, while still growing, has trailed Microsoft and Google, which have leaned into their own AI services. AWS has largely delivered others' models, competing mainly on cost and infrastructure. What's inside: Amazon also gains the ability to resell some OpenAI services and to tailor models for its own use. Amazon can now resell OpenAI Frontier, a service designed to deploy full AI agents to businesses. Microsoft remains involved in delivering Frontier regardless of whether customers buy it through Amazon or OpenAI. Under the terms of the deal, Amazon has the right to offer custom versions of OpenAI models directly — a potential boost for both its enterprise efforts and its ongoing Alexa revamp. OpenAI will use more Amazon chips and cloud infrastructure to power the offerings. The bottom line: The agreement positions Amazon as a central player in the generative AI race rather than a cloud provider competing mainly on price.