generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 208
Feature/mongodb atlas memory tool #281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
JackYPCOnline
merged 12 commits into
strands-agents:main
from
ayanray089:feature/mongodb-atlas-memory-tool
Nov 14, 2025
Merged
Feature/mongodb atlas memory tool #281
JackYPCOnline
merged 12 commits into
strands-agents:main
from
ayanray089:feature/mongodb-atlas-memory-tool
Nov 14, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Implement mongodb_memory.py following elasticsearch_memory.py patterns - Add MongoDB Atlas vector search with Amazon Bedrock Titan v2 embeddings - Support all CRUD operations: record, retrieve, list, get, delete - Include namespace-based data isolation and pagination - Add comprehensive unit tests (27 tests) with full coverage - Update pyproject.toml with pymongo optional dependency - Graceful error handling for vector index creation - Production-ready with proper logging and validation
- Implement mongodb_memory.py following elasticsearch_memory.py design patterns - Add MongoDB Atlas Vector Search with aggregation pipeline - Support Amazon Bedrock Titan v2 embeddings (1024 dimensions, cosine similarity) - Include namespace-based data isolation for multi-tenant scenarios - Add pagination support with next_token (skip/limit pattern) - Comprehensive error handling and logging - Add 27 unit tests covering all CRUD operations and edge cases - Create detailed documentation following elasticsearch_memory_tool.md pattern - Update README.md with MongoDB Atlas Memory usage examples - Add environment variables configuration for MongoDB Atlas - Add mongodb_memory optional dependency to pyproject.toml
- Integration test file contains sensitive credentials and should remain local only
cagataycali
reviewed
Oct 13, 2025
cagataycali
reviewed
Oct 13, 2025
cagataycali
reviewed
Oct 13, 2025
cagataycali
reviewed
Oct 13, 2025
- Implement complete MongoDB Atlas memory tool with vector search capabilities - Add semantic search using Amazon Bedrock Titan embeddings (1024 dimensions) - Support full CRUD operations: record, retrieve, list, get, delete - Add namespace support for multi-user memory isolation - Include environment variable configuration support - Add security features including connection string masking - Implement JSON response format optimization - Add comprehensive test suite with 27 test cases covering all functionality - Follow same design principles as existing Elasticsearch memory tool
Contributor
Author
|
@JackYPCOnline , @cagataycali Addressed all the feedback in the latest commit |
- Fix documentation examples to use consistent class-based approach - Remove unnecessary query parameters from connection string examples - Add comprehensive MongoDB Atlas connection URI guidance - Add explanatory code comments for numCandidates usage - Ensure all examples follow the same pattern throughout documentation - All 27 unit tests continue to pass - Tested with real MongoDB Atlas credentials successfully
Contributor
Author
|
@JackYPCOnline Addressed the latest feedback |
JackYPCOnline
previously approved these changes
Oct 21, 2025
- Resolve conflicts in README.md by merging MongoDB Atlas Memory Tool and Retrieve Tool sections - Resolve conflicts in pyproject.toml by including both elasticsearch_memory and mongodb_memory dependencies
JackYPCOnline
requested changes
Oct 22, 2025
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review all files thoroughly to ensure code quality
…MongoDB connection strings - Remove ?retryWrites=true&w=majority from all MongoDB connection string examples in README.md - Clean up connection string format to follow best practices - Addresses review comment about unnecessary query parameters
Contributor
Author
|
@JackYPCOnline Addressed latest feedback |
cagataycali
reviewed
Oct 23, 2025
cagataycali
reviewed
Oct 23, 2025
cagataycali
reviewed
Oct 23, 2025
- Increased MAX_RESPONSE_SIZE from 1,000 to 70,000 characters - Increased MAX_CONTENT_LENGTH from 8,000 to 12,000 characters - Increased MAX_MEMORIES_IN_RESPONSE from 2 to 5 memories - Fixed unit tests to correctly access JSON from response content - All 27 unit tests now passing
Contributor
Author
|
@JackYPCOnline @cagataycali Addressed the latest comments |
JackYPCOnline
previously approved these changes
Oct 26, 2025
…amples - Fix incorrect tool reference in usage example (line 89) - Simplify module docstring examples to match documentation pattern - Fix linter error: split long error message for line length compliance - All tests passing (1077 passed) - Formatter and linter checks passing
- Remove unused MongoDBMemoryTool import - Fix import block formatting Addresses GitHub Actions linter failure
cagataycali
approved these changes
Nov 14, 2025
JackYPCOnline
approved these changes
Nov 14, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a comprehensive MongoDB Atlas Memory tool that provides semantic memory management capabilities using MongoDB Atlas as the backend with vector embeddings for semantic search.
Key Features:
Implementation Details:
$vectorSearchaggregation pipelineRelated Issues
Documentation PR
Type of Change
New Tool
Testing
How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli
I ran
hatch run prepareAll 27 unit tests pass successfully
Integration tests with real MongoDB Atlas cluster verified functionality
Code formatting and linting checks pass
No breaking changes to existing functionality
Test Coverage:
Checklist
I have read the CONTRIBUTING document
I have added any necessary tests that prove my fix is effective or my feature works
I have updated the documentation accordingly
I have added an appropriate example to the documentation to outline the feature
My changes generate no new warnings
Any dependent changes have been merged and published
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.