使用MongoDB Atlas、Voyage和LangGraph建立智能活動場地營運系統
重點摘要
簡介 本教學從多數代理示範停止的地方開始:賦予代理持久記憶、營運背景,以及一個記錄所發生事件的位置。活動營運者不僅需要能夠總結天氣報告或生成通用計劃的代理,還需要能夠記住先前活動發生過的事、檢索相關訪客與場地背景、即時回應營運變化,並將結果寫入記憶以供未來類似情境使用。我們使用MongoDB Atlas、Voyage AI嵌入、LangGraph以及可選的Langfuse追蹤建立了此活動場地營運示範。示範場景為MongoDB公開賽,一個虛構的高級網球錦標賽,進行到第六天賽程。雨水即將來臨,有遮蓋的貴賓區容量有限。
Introduction This tutorial starts where most agent demos stop: giving the agent persistent memory, operational context, and a place to write back what happened.An event operator does not just need an agent that can summarize a weather report or generate a generic plan.
The operator needs an agent that can remember what happened at prior events, retrieve relevant visitor and venue context, respond to live operational changes, and write the outcome back as memory for the next similar situation.
We built this event-venue operator demo with MongoDB Atlas, Voyage AI embeddings, LangGraph, and optional Langfuse tracing.The demo scenario is the MongoDB Open, a fictional premium tennis tournament on Day 6 of play.
Rain is approaching, covered hospitality capacity is constrained, and the operator has two different visitor journeys to protect: Mikiko, a first-time attendee trying to make the most of the grounds, and Nina, a premier guest with hospitality expectations and a history the agent can retrieve.
This is not a customer case study or a production deployment.It is a fictional builder scenario inspired by real event operations economics.
Major tennis events show why these decisions matter: the 2025 US Open broke attendance, viewership, and digital reach records and offered $90 million in total player compensation; USTA has also said the three-week US Open drives more than $1.2 billion in annual economic impact for New York City.
Premium fan expectations are high, too: PwC found that 60% of high-income U.S.sports fans would spend more than $250 for a special event, and 20% would spend more than $1,000.Weather adds another layer of risk, which is why the U.S.
Census Bureau now tracks the monetary impact of extreme weather on business sales through its Business Trends and Outlook Survey.The MongoDB Open demo agent is not just producing a plausible plan.
It reads current venue state, retrieves prior event memory, distinguishes between visitor segments, and acts.At the same time, hospitality capacity is still available, and writes the outcome back so the next disruption can be handled with more context.Check out the full repo here.
The demo is split into three layers: A guided, deterministic UI that makes the operator story easy to follow.A hosted Vercel demo that gives readers a public app link.
Live API endpoints and scripts for Atlas Vector Search, vector-plus-lexical retrieval, visual-document RAG, LangGraph execution, and optional Langfuse traces, to demonstrate how the stack all works together.
What You Will Build By the end of the tutorial, you will have a FastAPI app backed by MongoDB Atlas that can run locally and deploy to Vercel.The app includes: A four-tab guided UI for the event-operations story and live backend validation.
Atlas collections for operational state, semantic memory, agent actions, and LangGraph checkpoints.Voyage multimodal embeddings stored in Atlas.Atlas Vector Search for memory retrieval.A hybrid retrieval endpoint that combines vector similarity with lexical scoring.
A Vision RAG endpoint that retrieves visual operational documents and passes them to Claude Vision.Optional Langfuse tracing for retrieval calls and the live LangGraph run.A runnable LangGraph script that follows the same rain-delay story.A Vercel deployment configuration for a hosted demo.
The current repo should be treated as a reference demo, not a production platform.There is no production auth, no CI suite, and the full LangGraph agent remains a script-based validation path rather than a public hosted endpoint.
Architecture Overview The architecture centers on MongoDB Atlas as both the operational and memory layer.Speed matters in the event venue operator scenario because the useful window for action is short.
If rain is 20 minutes away and covered hospitality space is filling up, the operator does not need a post-event dashboard or a batch summary a few minutes later.
The agent needs to read the current venue state, retrieve relevant memory, decide what to do, and write back the result while there is still capacity to protect the guest experience.That is why the type of database and how it is used are critical system design choices.
Operational records, semantic memory, vector embeddings, visual documents, and agent actions all live in the same data layer.
The agent does not need to wait for a separate analytics pipeline, sync data into a second vector database, or reconcile what the memory layer says with what the operational system says.
Atlas acts as both the system of record and the retrieval layer for the agent loop: perceive what changed, retrieve the right context, take action, and persist what happened for the next event.This is also why the demo keeps memory in MongoDB rather than treating it as a sidecar.
The agent is not just retrieving chunks; it is composing operational context.A useful decision may need visitor history, current venue status, hospitality inventory, prior rain-delay patterns, and relevant visual documents at the same time.
With Atlas, those pieces can stay queryable together instead of being scattered across separate systems.Caption: MongoDB Atlas stores the demo’s operational state, semantic memory, visual document embeddings, agent actions, and LangGraph checkpoints in one backend.
The demo uses four main state layers: Operational records: guests, visits, venue status, weather events, reservations, event metrics, and agent actions.Semantic memory: memory_store, with Voyage embeddings and Atlas Vector Search.
Visual documents: operational images embedded into the same memory store as image-derived multimodal embeddings and document metadata.Agent state: LangGraph checkpoints and checkpoint writes.Setup Before you begin, make sure you have: Python 3.
12 or later uv installed A MongoDB Atlas cluster with Vector Search enabled (this can be set up for free) An Anthropic API key (or feel free to use an LLM of your choice and reconfigure API keys) A Voyage API key (this can be set up for free) Clone the repo and install dependencies: GitHub repo Copy CodeCopiedUse a different Browsergit clone https://github.
com/mongodb-developer/event-venue-operator.git cd event-venue-operator uv sync If you only want to inspect the app before setting up credentials, start with the live Vercel demo.
The hosted demo uses the same UI and deployment shape as the repo, while local setup lets you run the full seed, smoke test, Vision RAG, and LangGraph paths yourself.Create your environment file: Copy CodeCopiedUse a different Browsercp .env.example .
env Add the required values: Copy CodeCopiedUse a different BrowserMONGODB_URI=mongodb+srv://<user>:<password>@<cluster>.mongodb.net/?retryWrites=true&w=majority MONGODB_APP_NAME=devrel-tutorial-agentic_retrieval-memory-marktechpost MONGODB_DATABASE=event_venue_operator ANTHROPIC_API_KEY=sk-ant-...
VOYAGE_API_KEY=pa-...Langfuse is optional for observability: Copy CodeCopiedUse a different BrowserLANGFUSE_PUBLIC_KEY= LANGFUSE_SECRET_KEY= LANGFUSE_HOST=https://cloud.langfuse.com Initialize Atlas: Copy CodeCopiedUse a different Browseruv run python scripts/setup_atlas.
py This script creates collections and starts the Atlas Vector Search index, then waits up to 60 seconds for the index to become READY.Then seed text and visual documents: Copy CodeCopiedUse a different Browseruv run python scripts/seed_data.py uv run python scripts/seed_visual_docs.
py Start the app: Copy CodeCopiedUse a different Browseruv run python -m event_venue_operator.server Open http://127.0.0.1:8000/.In a second terminal, run the smoke test: Copy CodeCopiedUse a different Browseruv run python scripts/smoke_test.
py With the server running in another terminal, the smoke test checks MongoDB health, Atlas Vector Search, hybrid search, visual-document indexing, Vision RAG, optional Langfuse wiring, and collection stats.Walk Through the UI The UI has four tabs: The venue-operations dashboard.
It establishes the event
Related
相關文章

當 human in the loop 變成“閉著眼睛點確認”,企業Agent 安全還能靠誰?
專家指出,AI Agent 從內容安全轉向行為安全,提示詞注入、工具濫用與過度授權成為主要風險。企業應建立可視、可管、可追溯的安全基線,並對工具權限進行最小化與臨時化管理,避免 human in the loop 淪為形式。安全防護需從靜態入口轉向動態行為約束,以因應 Agent 自主執行帶來的全新挑戰。

開源Agent框架刷爆ARC-AGI-3,「自我改進」的RLM harness引爭議
一套開源Agent框架在ARC-AGI-3基準測試中創下超過85%的正確率,大幅領先其他解決方案,其核心是名為「RLM harness」的自我改進機制。然而,該方法引發學術爭議,部分研究者批評它透過反覆試錯「鑽漏洞」,不符合ARC-AGI評測一次性推理的精神。這場討論促使AI社群重新審視評測標準,並可能影響未來ARC-AGI版本的設計方向。

騰訊是在“賽馬”,還是在打造 “Agent工廠”?
騰訊內部正在探討其發展策略究竟是「賽馬」機制還是打造「Agent工廠」。相關討論聚焦於公司如何平衡內部競爭與統一平台建設。目前站內已移除相關混雜文字,保留原始主題供讀者參考。
ChinaJoy 2026 AI遊戲規模化落地,邊緣雲與API安全重構產業底層邏輯
2026年ChinaJoy展館,“與AI同遊”的主題隨處可見。行業調查顯示,僅有21%的企業擁有完整的API資產清單,大量後臺AI接口仍在無人監控的狀態下裸奔。合規與安全也同步下沉。算力下沉還不夠,API安全必須同步前移邊緣雲解決了體驗問題,但AI交互入口的安全,同樣需要前置到邊緣。算力與安全,缺一不可Akamai的判斷很明確:遊戲AI轉型不能割裂算力與安全。這也是遊戲廠商規模化落地AI智能體、構建AI原生遊戲的標準化底層方案。

openJiuwen發佈業界首個企業級分佈式蜂群架構,聯合郵儲成功落地金融生產環境
< img id="wx_img" src="https://www.qbitai.com/wp-content/uploads/imgs/qbitai-logo-1.

螞蟻集團開源Avernet,讓人與智能體像組織一樣高效協作
**螞蟻集團開源Avernet:打造人與智能體高效協作的“組織級”基礎設施** **來源:量子位** **2026-08-07 11:08:51** 近日,螞蟻集團正式宣佈開源多智能體協作基礎設施Avernet,其社區版本已同步上線。作為業界首個聚焦於“組織級協作”的智能體基礎設施,Avernet的首個版本重點開放了智能體協作網絡能力,旨在支持不同智能體之間的發現、共識達成、跨團隊協作與治理,為人工智能從“單點智能”走向“系統智能”提供關鍵支撐。