AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.

다중 에이전트 소매 어드바이저를 위한 메모리 데이터 계층

MongoDB Atlas를 사용하여 제품 검색, 고객 컨텍스트 및 협력 상담원 간의 메모리를 관리하는 소매 상담 시스템을 구축하세요.

사용 사례: 인공 지능, 개인화

산업: 소매

제품 및 도구: MongoDB 검색, 벡터 검색, Voyage AI

파트너: 인류, 구글 클라우드

최신 대규모 언어 모델(LLM)과 오케스트레이션 프레임워크를 사용하면 AI 에이전트 구축은 간단해 보이지만, 실제 운영 환경에서는 복잡한 데이터 관리로 인해 실패하는 경우가 많습니다. 개발팀은 벡터 검색, 세션 기록, 메모리, 감사 로깅 등을 위해 여러 개의 개별 데이터베이스를 통합하여 사용하는 경우가 흔합니다. 이러한 파편화된 데이터베이스 아키텍처는 지연 시간, 운영 비용 및 유지 관리 복잡성을 증가시킵니다.

소매업계에서 고객은 각기 다른 요구사항을 가진 지속적이고 개인화된 상호작용을 요구합니다.

  • Carol searches for road-marathon shoes in a size 8 with maximum cushioning.

  • John searches for trail-running shoes in a size 11 with waterproof material and minimal cushioning.

이러한 시나리오를 지원하려면 시스템은 모든 채널에 걸쳐 단기 세션 기록, 고객 선호도 및 장기 데이터를 유지해야 합니다. 분산된 백엔드 데이터 시스템은 소매업체가 상용 AI 비서를 구동하는 데 필요한 컨텍스트를 저장하고 공유하는 통합 아키텍처를 구축하는 것을 방해합니다.

MongoDB Atlas는 파편화된 데이터 저장소를 에이전트 데이터 플레인 역할을 하는 단일 통합 데이터베이스 플랫폼으로 대체합니다.

에이전트형 AI의 다섯 가지 데이터 요구 사항을 모두 기본적으로 처리하도록 MongoDB Atlas를 배포하세요.

  • 지식: 제품 카탈로그와 벡터 임베디드를 함께 저장합니다.

  • 사용자 컨텍스트: 유연한 고객 프로필을 유지 관리합니다.

  • 대화 기록: 대화 내용의 맥락을 차례대로 유지합니다.

  • 장기 기억: 시간이 지남에 따라 고객 선호도를 학습하고 업데이트합니다.

  • 관찰 가능성: 도구 실행 경로 및 지연 시간을 기록합니다.

MARA(Multi Agent Retail Advisor)는 이러한 통합 데이터 플레인을 보여주는 솔루션입니다. MARA는 고객이 자신의 특정 요구에 가장 적합한 제품을 찾도록 도와줍니다.

이 솔루션은 세 가지 핵심 아키텍처 기둥을 결합합니다.

  • Google 에이전트 개발 키트(ADK) 다중 에이전트 워크플로우를 조율하고 에이전트 간 상호 작용을 관리합니다.

  • Agent-to-Agent (A2A) protocol: Standardizes network-based communication and dynamic discovery across agent boundaries.

  • MongoDB Atlas 에이전트 데이터 플레인: 지식, 사용자 컨텍스트, 세션 기록, 메모리 및 관찰 가능성을 단일 플랫폼으로 통합합니다.

MARA’s agents communicate over the A2A protocol and use MongoDB Atlas as a shared data layer for product discovery, customer memory, and traceability.

MongoDB Atlas holds MARA’s product catalog and powers product discovery. Each product document contains a search_text field with searchable catalog details. Atlas automatically generates vector embeddings for this text using voyage-4-large. When a customer submits a query, the application embeds the request with the lighter voyage-4-lite model. Because Voyage 4 models share an embedding space, queries embedded by the lightweight model can directly search representations generated by the larger index model. This asymmetric retrieval approach combines high-quality indexed data with lower query-embedding cost and latency, balancing accuracy and compute efficiency.

The Product agent searches products with vector search and structured catalog filters. When native reranking is enabled, it reorders candidates before returning matches. Otherwise, the agent returns the vector search results directly.

The Planner agent coordinates product recommendations. Through Agent-to-Agent (A2A) connections, it queries the Profile agent for customer context and the Product agent for matching catalog items. The Profile agent reads attributes from users and retrieves saved preferences from user_memory. When the interaction reveals a durable preference, the Profile agent can save it to user_memory. The Planner agent brings the specialists’ results together in its recommendation. ADK supports the agent workflow; MongoDB Atlas supplies the data beneath it.

메모리 레이블은 해당 데이터에 대한 다양한 역할을 설명합니다.

  • sessions대화 내용을 기록합니다.

  • agent_state워크플로 상태 및 상호 작용의 단기 기록을 저장합니다.

  • user_memory한 번의 대화를 넘어 지속되는 학습된 사실을 담고 있다.

  • "공유 메모리": 별도의 데이터베이스 모음이 아니라 에이전트가 역할에 따라 액세스하는 공통 Atlas 컨텍스트 계층을 의미합니다.

A session identifier tracks all agent calls. Specialist tools record their agent names, tool names, inputs, outputs, and execution times to tool_invocations under that identifier. Combined with the session and workflow records, these traces make the observable sequence of an interaction reconstructible and comparable across runs. They support investigations of recommendations or failures, but they do not capture every internal model decision or guarantee identical wording across repeated requests.

벡터 검색, 세션 상태 및 로깅을 위한 별도의 데이터베이스를 통합하면 비용이 증가합니다. MongoDB Atlas는 모든 에이전트 데이터를 6개의 전용 컬렉션으로 통합합니다.

컬렉션
목적

제품

스토어는 자동 벡터 임베딩 기능을 사용하여 카탈로그 항목을 표시합니다.

사용자

고객 선호도, 좋아하는 브랜드 및 사이즈를 고정적으로 유지합니다.

사용자_메모리

대화 전반에 걸쳐 축적된 지속적인 학습된 선호도를 유지합니다.

세션

고객과의 대화 내역을 시간 순서대로 보관합니다.

에이전트 상태

각 에이전트 워크플로의 활성 실행 단계를 추적합니다.

도구 호출

디버깅을 위해 입력, 출력 및 실행 지연 시간을 기록합니다.

최신 AI는 데이터, 메모리, 임베딩, 검색 및 실시간 애플리케이션 상태와 같은 진화하는 컨텍스트의 전체 수명 주기를 하나의 유연한 모델에서 관리해야 합니다.

유연한 문서 모델은 테이블을 재설계하거나 대규모 마이그레이션을 진행할 필요 없이 진화하는 스키마를 처리할 수 있습니다. 고객 프로필, 상호 작용 기록, 선호도 및 권한과 같은 관련 데이터를 포함함으로써 자주 액세스하는 컨텍스트를 하나의 문서에 유지할 수 있습니다. 이를 통해 조인 횟수가 줄어들고 쿼리가 간소화되며 응답 시간이 단축됩니다.

AI 데이터는 본질적으로 문서 형태를 띕니다. 대화 기록, 에이전트 메모리, 도구 호출, 메타데이터 및 검색된 컨텍스트는 중첩된 JSON과 유사한 구조로 표현됩니다. MongoDB 문서는 애플리케이션 객체와 밀접하게 매핑되므로 변환 및 객체 관계형 매핑(ORM) 오버헤드를 줄일 수 있습니다.

The users collection stores static customer attributes, such as shoe sizes and brand preferences. Because customer attributes are stored together in one document, the Profile agent retrieves a complete preference profile with a single, high-speed read query. This avoids the latency overhead of multi-table joins.

{ "name": "Carol Kim", "email": "carol@example.com", "preferences": { "brands": [ "Patagonia", "Darn Tough", "Arc'teryx" ], "price_range": { "min": 50, "max": 350 }, "categories": [ "rain_jackets", "base_layers", "accessories" ], "sizes": { "shoes": "8", "clothing": "S" } }, "profile": { "experience": "advanced", "activities": [ "mountaineering", "backpacking", "trail running" ], "location": "Vermont" }}

The user_memory collection stores dynamic, learned facts that agents extract during conversations.

{ "user_id": "user003", "facts": [ "Prefers polyester base layers because they dry faster than cotton or other materials" ], "updated_at": "2026-08-12T23:08:44.886000"}

The user.preferences.shoe_size field filters product catalog searches directly. The fact text field captures evolving insights, such as material preferences.

정적 스키마와 비정형 동적 메모리는 유연한 JSON 형식으로 저장됩니다. 프로파일 에이전트는 두 컬렉션을 모두 쿼리하여 완전한 고객 상태를 구성합니다.

The sessions collection holds conversational history per customer conversation. Each document retains a chronologically ordered array of message objects.

{ "session_id": "6415c1c1-bbf5-4986-818c-f390c489cab5", "user_id": "user003", "messages": [ { "role": "user", "content": "What base layers work best for mountaineering in cold, wet conditions?", "timestamp": "2026-08-12T23:03:22.654000" }, { "role": "assistant", "content": "Hi Carol! Great to hear from you.\n\nBased on your preferences and mountaineering needs, here are my top recommendations:\n\n## **1. Icebreaker Merino 260 Tech Long Sleeve Crewe** — $129\n…", "timestamp": "2026-08-12T23:03:57.044000" }, { "role": "user", "content": "i like base layers to be Polyester because they dry faster than cotton or other materials", "timestamp": "2026-08-12T23:08:33.023000" }, { "role": "assistant", "content": "Hi Carol! I've saved your preference for polyester base layers.\n\nBased on what you're looking for, here are my top recommendations:\n\n**1. Arc'teryx Phase SL Crew Long Sleeve - $89*...", "timestamp": "2026-08-12T23:09:09.013000" } ], "created_at": "2026-08-12T23:03:22.635000", "updated_at": "2026-08-12T23:09:09.013000"}

messages 배열은 턴별 역할과 텍스트 내용을 캡처합니다.

관계형 데이터베이스는 스레드를 재구성하기 위해 보조 메시지 테이블과 느린 정렬 쿼리가 필요합니다. 채팅 기록을 단일 문서 내의 중첩 배열로 저장하면 순서가 보장됩니다. 이를 통해 Planner 에이전트는 단일 읽기 경로로 전체 시간 순서별 세션 기록을 가져올 수 있습니다.

The products collection integrates transactional fields with vector embedding arrays.

{ "name": "Patagonia Torrentshell 3L Jacket", "brand": "Patagonia", "category": "rain_jackets", "description": "The Torrentshell 3L is Patagonia's workhorse waterproof jacket built with H2No Performance Standard 3-layer shell. Fully seam-sealed and Fair Trade Certified, it packs into its own chest pocket. Ideal for unpredictable weather on trail or in town.", "price": 149, "size_options": ["XS",...], "attributes": { "waterproof": true, "eco_friendly": true, "insulated": false, "gender": "unisex" }, "colors": ["black"...], "rating": 4.7, "reviews_count": 2841, "search_text": "Patagonia Torrentshell 3L Jacket. Patagonia. Category: rain_jackets. The Torrentshell 3L is Patagonia's workhorse waterproof jacket built with H2No Performance Standard 3-layer shell. Fully seam-sealed and Fair Trade Certified, it packs into its own chest pocket. Ideal for unpredictable weather on trail or in town."}

The price and productId fields handle standard retail transaction lookups. The search_text field combines the product name, brand, category, and raw description into a single string. The Atlas Vector Search index then targets this concatenated string using an automatic embedding configuration.

You do not need to store or manage vector arrays inside your documents. The Auto-Embedding feature automatically vectorizes the search_text field in the background.

Because Voyage AI models share the same embedding space, you can pre-embed the catalog with voyage-4-large. You can then run user queries with low-latency voyage-4-lite. This asymmetric approach speeds up search and reduces execution costs.

The tool_invocations collection records every tool call and execution detail.

[ { "session_id": "6415c1c1-bbf5-4986-818c-f390c489cab5", "agent_name": "ProfileAgent", "tool_name": "get_user_profile", "input": { "user_id": "user003" }, "output": { "name": "Carol Kim", "email": "carol@example.com", "preferences": { "brands": [ "Patagonia", "Darn Tough", "Arc'teryx" ], "price_range": { "min": 50, "max": 350 }, "categories": [ "rain_jackets", "base_layers", "accessories" ], "sizes": { "shoes": "8", "clothing": "S" } }, "profile": { "experience": "advanced", "activities": [ "mountaineering", "backpacking", "trail running" ], "location": "Vermont" } }, "latency_ms": 15, "timestamp": "2026-08-12T23:08:36.663000" }, { "session_id": "6415c1c1-bbf5-4986-818c-f390c489cab5", "agent_name": "ProfileAgent", "tool_name": "get_user_memory", "input": { "user_id": "user003" }, "output": { "user_id": "user003", "facts": ["prefers polyester material over cotton"], "note": "No memory stored for this user yet" }, "latency_ms": 15, "timestamp": "2026-08-12T23:08:36.698000" }, { "session_id": "6415c1c1-bbf5-4986-818c-f390c489cab5", "agent_name": "ProfileAgent", "tool_name": "update_user_memory", "input": { "user_id": "user003", "new_facts": [ "Prefers polyester base layers because they dry faster than cotton or other materials" ] }, "output": { "status": "ok", "user_id": "user003", "facts_added": 1 }, "latency_ms": 21, "timestamp": "2026-08-12T23:08:44.907000" }, { "session_id": "6415c1c1-bbf5-4986-818c-f390c489cab5", "agent_name": "ProductAgent", "tool_name": "search_products", "input": { "query": "Base layers Patagonia Arc'teryx mountaineering backpacking trail running advanced performance", "max_price": 350, "size": "S", "waterproof": null, "eco_friendly": null, "category": "base_layers" }, "output": [ { "name": "Patagonia Capilene Cool Daily Long Sleeve Shirt", "brand": "Patagonia", "category": "base_layers", "description": "The Capilene Cool Daily is made from recycled polyester …", "price": 65.0, "size_options": [ "XS", "S"], "attributes": { "waterproof": false, "eco_friendly": true, "insulated": false, "gender": "unisex" }, "colors": [ "black", "light bog green"], "rating": 4.5, "reviews_count": 2543, "vectorScore": 0.7558120489120483 }, … ], "latency_ms": 193, "timestamp": "2026-08-12T23:08:45.707000" }]

MARA 저장소를 사용하세요 해결책을 찾아보려면. 설정 가이드 다음 단계에 대한 자세한 구성 및 명령을 제공합니다.

1

Use an Atlas M10-or-higher cluster for automated embeddings. Configure the Atlas connection and LLM endpoint in backend/.env by following the setup guide. Native reranking is optional and requires the MongoDB version and preview setting specified in the guide.

2

Run the repository’s seed procedure to load sample users and 135 outdoor products, and to create the vector and text search indexes. Atlas embeds the product search_text field in the background. Wait for indexing to complete before evaluating semantic product retrieval.

3

Start the Docker Compose stack to run the frontend, REST orchestrator, and separate Planner, Profile, and Product agent services. Each agent service publishes an A2A AgentCard for discovery and communication.

4

Request a product recommendation in the chat interface, then inspect the Agents, Trace, and MongoDB views. State a durable preference and start another conversation as the same sample user to check that the Profile agent retrieves the saved fact from user_memory. Inspect the session-linked tool records to see which specialists ran. This verifies learned-preference persistence, not automatic replay of the complete chat history to the Planner.

  • 상담원 데이터 통합: 제품 카탈로그, 고객 프로필, 학습된 선호도, 세션 기록 및 도구 추적 정보를 MongoDB Atlas에 보관합니다.

  • Balance retrieval quality and query cost: Configure Atlas to embed catalog text with voyage-4-large and use the compatible voyage-4-lite model for live customer queries. Evaluate retrieval quality for the application rather than assuming identical results.

  • Separate agent responsibilities: Use the Planner agent to coordinate the Profile and Product agents over A2A, while each specialist accesses the Atlas data relevant to its role.

  • Persist learned preferences: Save durable customer facts in user_memory so the Profile agent can retrieve them in later conversations. Stored session messages are not automatically replayed to the Planner agent.

  • 관찰 가능한 에이전트 활동 추적: 세션 ID를 통해 워크플로 상태와 도구 기록을 연결하여 모든 내부 모델 결정을 포착한다고 주장하지 않고도 권장 사항 및 실패 원인을 조사할 수 있습니다.

  • Alberto Camarena, MongoDB

  • Angie Guemes, MongoDB

  • 로드리고 릴, MongoDB

  • 로넌 콘런, MongoDB

  • 다니엘 자미르, MongoDB

문서