MongoDB Atlas, Voyage AI, and LangGraph now support building an event venue operator that retains memory of past disruptions and adjusts plans in real time.
In this article
Scenario: The MongoDB Open
The tutorial builds a fictional agent for the MongoDB Open, a premium tennis tournament on Day 6 of play. Rain is approaching, covered hospitality capacity is constrained, and the operator must protect two distinct visitor journeys. One guest, Mikiko, is a first-time attendee trying to maximise the grounds. The other, Nina, is a premier guest with hospitality expectations and a history the agent can retrieve.
This 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 reads current venue state, retrieves prior event memory, distinguishes between visitor segments, and acts. At the same time, hospitality capacity is still available, and the agent writes the outcome back so the next disruption can be handled with more context. Check out the full repo here.
The architecture
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 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.
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:
git clone https://github.com/mongodb-developer/event-venue-operator.git
cd event-venue-operator
uv syncIf 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:
cp .env.example .envAdd the required values:
MONGODB_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:




