How Rivian Built AI Agents to Review Thousands of Vehicle Purchase Documents
Built on Mastra, Rivian’s internal AI platform also helps call center staff identify vehicle issues and summarizes customer information.
40k+
Vehicles produced a year
Thousands
Vehicle purchase documents reviewed
Rivian is an electric vehicle manufacturer that produces more than 40,000 vehicles a year, including pickups, SUVs and delivery vans. It’s also developing self-driving vehicles through a partnership with Uber, which has invested $300 million to help bring Rivian’s robotaxis to the road in 2028.
To support the commercial lifecycle, Rivian’s team built an internal Mastra-powered AI platform. Its flagship agent reviews thousands of car purchase documents, including driver’s licenses and proof of insurance. Other agents summarize customer information for internal use and help call center identify issues during live calls.
Rivian’s online vehicle shopping experience.
Agents across the vehicle purchase lifecycle
When a customer orders a car, Rivian’s commercial tech covers offers and incentives, matches the order to a vehicle, coordinates delivery, and provides support to the owner through service and charging.
Using Mastra, the commercial technology engineering team built an AI platform that supports these processes. They started with automating customer summaries for internal users, then expanded into document review and call-center support.
The document-review agent processes paperwork submitted as part of a vehicle transaction and approves or denies documents, for example driver’s license or proof of insurance. The team says it’s the platform’s flagship use case.
Then, there’s the call-center agent. It works with the transcript of a conversation in real time. When a customer calls about their vehicle, the agents follow the transcription and generate questions to help figure out the issue.
Giving agents operational context
Rivian connects its streaming platform to Mastra memory to supply context about entities such as orders, vehicles, and service requests. When an agent is invoked, that context is already available in memory, so it doesn’t need a separate tool call to retrieve it.
The team uses Mastra’s resource IDs and thread IDs to separate context. As more teams within Rivian join the platform, the engineering team plans to add tenant-level isolation. They also want fine-grained authorization tied to individual memory threads or resource IDs.
Building on an existing TypeScript stack
TypeScript was already one of Rivian’s primary languages, which made Mastra a natural fit for the engineering team. Open source and a model-agnostic framework were also important.
The team wanted to choose the components that fit its platform and keep its options open as the technology evolved. On top of that, Rivian self-hosts its systems and operates a large Amazon EKS cluster.
The team’s approach is to build its own platform using Mastra’s primitives.
“We like the idea of composability, trying components, and choosing what works best.” — Sandosh Vasudevan, Principal Software Engineer at Rivian
Observing and improving the agents
Rivian built its own observability interface. It lets business users inspect topics and trends and view or provide feedback.
The team uses open-source Langfuse alongside its own dashboards built over Mastra trace data in ClickHouse. This gives Rivian a way to analyze agent behavior within its existing stack.
Rivian also connects trace analysis to its internal software factory tooling to improve agents. The team has a version of that feedback loop running already, and is exploring how to make the development tools and shared knowledge available beyond individual engineers’ local environments.
What’s next
The platform has been in production for a year, with document review, customer summaries, and call-center agents already in use. The next step is a customer-facing copilot that helps buyers through the purchase flow in their Rivian account.
The team wants to build a standalone knowledge service with permissions governing contributions and access. Customer-facing teams could maintain the information, and validation agents could reuse it.


