You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+89-1Lines changed: 89 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ Strands Agents Tools is a community-driven project that provides a powerful set
38
38
39
39
- 📁 **File Operations** - Read, write, and edit files with syntax highlighting and intelligent modifications
40
40
- 🖥️ **Shell Integration** - Execute and interact with shell commands securely
41
-
- 🧠 **Memory** - Store user and agent memories across agent runs to provide personalized experiences with both Mem0 and Amazon Bedrock Knowledge Bases
41
+
- 🧠 **Memory** - Store user and agent memories across agent runs to provide personalized experiences with both Mem0, Amazon Bedrock Knowledge Bases, Elasticsearch, and MongoDB Atlas
42
42
- 🕸️ **Web Infrastructure** - Perform web searches, extract page content, and crawl websites with Tavily and Exa-powered tools
43
43
- 🌐 **HTTP Client** - Make API requests with comprehensive authentication support
44
44
- 💬 **Slack Client** - Real-time Slack events, message processing, and Slack API access
@@ -146,6 +146,7 @@ Below is a comprehensive table of all available tools, how to use them with an a
| search_video |`agent.tool.search_video(query="people discussing AI")`| Semantic video search using TwelveLabs' Marengo model |
148
148
| chat_video |`agent.tool.chat_video(prompt="What are the main topics?", video_id="video_123")`| Interactive video analysis using TwelveLabs' Pegasus model |
149
+
| mongodb_memory |`agent.tool.mongodb_memory(action="record", content="User prefers vegetarian pizza", connection_string="mongodb+srv://...", database_name="memories")`| Store and retrieve memories using MongoDB Atlas with semantic search via AWS Bedrock Titan embeddings |
149
150
150
151
\**These tools do not work on windows*
151
152
@@ -886,6 +887,79 @@ result = agent.tool.elasticsearch_memory(
886
887
)
887
888
```
888
889
890
+
### MongoDB Atlas Memory
891
+
892
+
**Note**: This tool requires AWS account credentials to generate embeddings using Amazon Bedrock Titan models.
893
+
894
+
```python
895
+
from strands import Agent
896
+
from strands_tools.mongodb_memory import mongodb_memory
897
+
898
+
# Create agent with direct tool usage
899
+
agent = Agent(tools=[mongodb_memory])
900
+
901
+
# Store a memory with semantic embeddings
902
+
result = agent.tool.mongodb_memory(
903
+
action="record",
904
+
content="User prefers vegetarian pizza with extra cheese",
# Set MONGODB_ATLAS_CLUSTER_URI in your environment
954
+
result = agent.tool.mongodb_memory(
955
+
action="record",
956
+
content="User prefers vegetarian pizza",
957
+
database_name="memories",
958
+
collection_name="user_memories",
959
+
namespace="user_123"
960
+
)
961
+
```
962
+
889
963
## 🌍 Environment Variables Configuration
890
964
891
965
Agents Tools provides extensive customization through environment variables. This allows you to configure tool behavior without modifying code, making it ideal for different environments (development, testing, production).
@@ -1024,6 +1098,7 @@ The Mem0 Memory Tool supports three different backend configurations:
1024
1098
| PYTHON_REPL_BINARY_MAX_LEN | Maximum length for binary content before truncation | 100 |
0 commit comments