사용 사례: 인공 지능
산업: Manufacturing and Mobility, Mobile and Edge
제품: MongoDB Atlas, MongoDB Atlas Vector Search, MongoDB Atlas Triggers, Voyage AI
파트너: ObjectBox
솔루션 개요
Connected vehicles continuously generate sensor data for drivers who expect immediate, hands-free support. However, when connectivity drops in parking garages, tunnels, or rural roads, any assistant relying on the cloud fails right when it is most critical.
This solution runs an AI copilot on the edge to ensure continuous in-vehicle assistance during network outages. It uses an on-device ObjectBox database to store live vehicle telemetry alongside the owner's manual. It then processes inquiries using a local LLM agent that doesn’t require an active network connection. Upon reconnection, the ObjectBox Sync Server automatically synchronizes this edge data back to MongoDB Atlas.
MongoDB Atlas serves as the centralized cloud system of record. It performs vector search over the manual content, maintains telemetry history within time series collections, and processes every synchronized snapshot into a fully queryable document via an Atlas Trigger.
참조 아키텍처
The architecture to build an in-vehicle assistant that provides accurate responses without internet connectivity is split into two tiers: an in-vehicle edge tier and a MongoDB Atlas cloud tier.
Figure 1. End-to-end user flow from requesting Sync to MongoDB Atlas and the Atlas Trigger output collections
Edge Tier Architecture
The in-vehicle edge tier constitutes a self-contained runtime where the Cockpit, backend, local agent, and ObjectBox services communicate directly on the vehicle. This stack enables the assistant to retrieve knowledge and operate without MongoDB Atlas, while local data synchronizes with MongoDB Atlas when connectivity returns. The edge tier uses the following components:
Cockpit UI: Built with Next.js, this interface displays live gauges, a fault-code ticker, a chat panel, and a map, restricting all browser calls to same-origin API routes.
Python backend: Exposes REST endpoints and server-sent events to handle telemetry proxying, speech-to-text and text-to-speech conversions, and agent orchestration.
LangChain agent: Communicates with a local LLM via Ollama, managing dual pre-compiled graphs for discrete online and offline execution paths.
Embedding pipeline: The vehicle manual is first divided into smaller text chunks. Each chunk is then converted into a 1,024-dimensional embedding using Voyage AI’s voyage-4-nano model, with the resulting embedding stored alongside its corresponding chunk.
ObjectBox services: Powered by C++, three distinct sync clients store user-manual chunks and their embeddings, vehicle telemetry, and dialogue history locally.
ObjectBox HNSW vector search: ObjectBox maintains an HNSW vector index over the locally stored manual embeddings. The resulting index enables approximate nearest-neighbor searches directly on the vehicle, allowing the assistant to retrieve relevant manual content while offline and without depending on MongoDB Atlas connectivity.
Telemetry generator: Captures and saves VSS snapshots directly to the local telemetry store at two-second intervals.
Cloud Tier Architecture
MongoDB Atlas acts as the connected counterpart to the vehicle’s local ObjectBox store. When connectivity is available, it receives synchronized manual chunks and embeddings, vehicle telemetry, and dialogue history, providing cloud-based persistence while the edge tier remains operational offline. The cloud tier uses the following components:
Data replication: The ObjectBox Sync Server connects to the cloud, synchronizing edge data stores directly into MongoDB Atlas via the MongoDB connector. The synchronization includes the manual chunks, their embeddings, telemetry, and dialogue history.
MongoDB Atlas cluster: Maintains the replicated data collections and provides more storage capacity than the local ObjectBox store. The sync to MongoDB Atlas enables the solution to retain larger volumes of manual content, telemetry, dialogue history, and other long-term data without being constrained by the vehicle’s local storage capacity.
Atlas Vector Search: Indexes the synchronized manual embeddings and provides cloud-side vector search over the complete manual content when connectivity is available.
Atlas Triggers: Automatically transforms incoming telemetry snapshots into status documents while extending a dedicated time-series history log.
Execution Flow for Requests
With the edge and cloud tiers established, the execution flow describes how a driver’s request moves through the system, from the Cockpit to the local backend and agent. Cloud synchronization occurs when connectivity is available.
When the driver types or speaks, the backend feeds the request stream directly to the agent. The agent evaluates the query using LangGraph and decides which tool to call.
The car manual is chunked and embedded with MongoDB Voyage AI’s 1,024-dimensional voyage-4-nano model. The same embedding representation is stored locally in ObjectBox and replicated to MongoDB Atlas, where it is indexed for MongoDB Atlas Vector Search. On the edge, ObjectBox’s HNSW index supports local approximate nearest-neighbor retrieval over the car manual embeddings. In the cloud, MongoDB Atlas Vector Search provides the corresponding vector-search capability over the synchronized manual content.
When a request involves vehicle information, the agent determines which telemetry tool is most appropriate for the driver’s question and invokes it. Depending on the request, the selected tool retrieves the current vehicle state, relevant VSS signals, fault codes, or derived status information from the appropriate telemetry store. If the selected tool returns a DTC, the agent can invoke the dedicated translation tool to convert the code and its associated signals into a clear explanation of the affected system, meaning, severity, and next steps.
데이터 모델 접근 방식
The document model stores these shapes in one database:
Structured telemetry
Figure 2. Telemetry data model
클릭하여 확대Free-text manual chunks
Figure 3. Car manual data model
클릭하여 확대Chat history
Figure 4. Chat conversation data model
클릭하여 확대Timeseries telemetry data
Last status of the car
Figure 5. Telemetry status data model
클릭하여 확대
Each telemetry snapshot is one document. A snapshot holds the full VSS Vehicle tree, about 1300 signals across many domains, stored as nested JSON. The model needs no fixed schema across those domains.
ObjectBox stores the telemetry payload as a string. The MongoDB connector expands it into a native nested document in Atlas through the JsonToNative external type, so cloud queries address fields by their exact VSS path.
컬렉션
Together, these data models represent the solution’s core domains: searchable manual knowledge, conversation history, raw vehicle telemetry, current vehicle status, and historical telemetry. Separating these data types enables efficient retrieval, supports real-time vehicle-state queries, preserves conversation context, and keeps long-term telemetry history scalable and queryable in MongoDB Atlas. The collections for this solution include:
manual_chunks: Owner's manual text chunks with a 1024-dimension Voyage AI embedding for vector search.conversations: Chat history, that includes both human and the assistant response together with the tools each assistant uses to answer a question.objectbox_telemetry: A raw snapshot per document, synced from the edge.telemetry-status: The current vehicle state, one document per vehicle, written by the trigger.telemetry-data: A MongoDB time series collection. The Atlas Trigger appends one record per snapshot, so history queries stay efficient as the data grows.
솔루션 빌드
Check the README in the GitHub repository for full implementation details. The following steps explains how to create the application:
Figure 6. The cockpit UI with live gauges, chat, the fault-code ticker, and the online and offline sync panel
주요 학습 사항
Keep the edge authoritative: The on-device ObjectBox store serves reads and accepts writes with no connection, so the assistant works with low connectivity.
Run vector search where the query lives: A MongoDB Voyage AI embedding model (voyage-4-nano, 1024 dimensions) powers ObjectBox vector search on the edge and MongoDB Atlas Vector Search in the cloud, so answers stay consistent across modes.
Store telemetry history as time series: A MongoDB Atlas Trigger writes each snapshot into a MongoDB time series collection.
Model one snapshot as one document: The flexible document model stores VSS signals without a fixed cross-domain schema.
Design services to tolerate lost connectivity: The edge buffers writes while offline and reconciles with MongoDB Atlas on reconnect.
작성자
Timothy Marland, MongoDB
Dorottya Nyárády, MongoDB