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
Merge origin/main into feature/mongodb-atlas-memory-tool
- 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
| retrieve |`agent.tool.retrieve(text="What is STRANDS?")`| Retrieving information from Amazon Bedrock Knowledge Bases |
117
+
| retrieve |`agent.tool.retrieve(text="What is STRANDS?")`| Retrieving information from Amazon Bedrock Knowledge Bases with optional metadata |
118
118
| nova_reels |`agent.tool.nova_reels(action="create", text="A cinematic shot of mountains", s3_bucket="my-bucket")`| Create high-quality videos using Amazon Bedrock Nova Reel with configurable parameters via environment variables |
119
119
| agent_core_memory |`agent.tool.agent_core_memory(action="record", content="Hello, I like vegetarian food")`| Store and retrieve memories with Amazon Bedrock Agent Core Memory service |
120
120
| mem0_memory |`agent.tool.mem0_memory(action="store", content="Remember I like to play tennis", user_id="alex")`| Store user and agent memories across agent runs to provide personalized experience |
@@ -504,6 +504,33 @@ result = agent.tool.use_aws(
504
504
)
505
505
```
506
506
507
+
### Retrieve Tool
508
+
509
+
```python
510
+
from strands import Agent
511
+
from strands_tools import retrieve
512
+
513
+
agent = Agent(tools=[retrieve])
514
+
515
+
# Basic retrieval without metadata
516
+
result = agent.tool.retrieve(
517
+
text="What is artificial intelligence?"
518
+
)
519
+
520
+
# Retrieval with metadata enabled
521
+
result = agent.tool.retrieve(
522
+
text="What are the latest developments in machine learning?",
523
+
enableMetadata=True
524
+
)
525
+
526
+
# Using environment variable to set default metadata behavior
527
+
# Set RETRIEVE_ENABLE_METADATA_DEFAULT=true in your environment
528
+
result = agent.tool.retrieve(
529
+
text="Tell me about cloud computing"
530
+
# enableMetadata will default to the environment variable value
531
+
)
532
+
```
533
+
507
534
### Batch Tool
508
535
509
536
```python
@@ -1099,6 +1126,7 @@ The Mem0 Memory Tool supports three different backend configurations:
1099
1126
| EDITOR_DIR_TREE_MAX_DEPTH | Maximum depth for directory tree visualization | 2 |
0 commit comments