Skip to content

Add Memori + MongoDB Atlas agent memory notebook - #229

Merged
ajosh0504 merged 2 commits into
mongodb-developer:mainfrom
mikikob-mongodb:memori_labs_webinar
Sep 2, 2026
Merged

Add Memori + MongoDB Atlas agent memory notebook#229
ajosh0504 merged 2 commits into
mongodb-developer:mainfrom
mikikob-mongodb:memori_labs_webinar

Conversation

@mikikob-mongodb

Copy link
Copy Markdown
Contributor

Summary

  • Add a new notebook (notebooks/memory/memori-mongodb-agent-memory.ipynb) demonstrating cross-session agent memory using Memori with MongoDB Atlas as the BYODB store
  • Covers: control baseline, Memori registration, async fact promotion, cross-session recall, manual recall inspection, MongoDB document inspection, Voyage AI + Atlas Vector Search as a second retrieval path, TTL indexes, and entity isolation
  • Includes a DEMO_MODE flag for a streamlined 5-7 minute live presentation (skips vector search and retention sections)
  • Supports both standard Anthropic API and corporate proxy/gateway (e.g. Azure APIM) via optional ANTHROPIC_BASE_URL
  • Add .env and .venv to .gitignore

Test plan

  • Run notebook top-to-bottom with DEMO_MODE = True on a clean database — all cells pass, sections 10-11 print "Skipped"
  • Run notebook with DEMO_MODE = False — all sections execute including Voyage embeddings, Atlas Vector Search, TTL, and entity isolation
  • Verify section 7 (fresh client recall) correctly returns facts from MongoDB with no in-process context
  • Verify no credentials are committed in the notebook file

🤖 Generated with Claude Code

mikikob-mongodb and others added 2 commits August 31, 2026 13:44
- Add notebook demonstrating agent memory with Memori, MongoDB Atlas,
  and Voyage AI vector search
- Support custom API gateways (e.g. Grove/Azure APIM) via
  ANTHROPIC_BASE_URL env var, with transparent fallback to default
  Anthropic endpoint for public users
- Work around Memori v3.3.6 Rust core bug that causes auto-recall to
  silently fail on MongoDB by setting use_rust_core=False
- Add python-dotenv for local .env loading
- Add .env, .venv, and .fastembed_cache to .gitignore

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- DEMO_MODE flag skips sections 10-11 (Voyage vector search, TTL, entity isolation)
- Trim session to 2 turns (vegan + walnut allergy) to save an LLM round-trip
- Lower max_tokens to 150 for shorter replies during demo
- Narrow recall question to match 2-turn data (dietary restrictions only)
- Fix misleading WARNING when facts already exist from a prior run

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mikikob-mongodb
mikikob-mongodb requested a review from a team as a code owner August 31, 2026 22:29
@ajosh0504
ajosh0504 merged commit 6c309ae into mongodb-developer:main Sep 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants