Skip to content

Commit 8ef126a

Browse files
authored
docs: update memory examples to use agent.tool.X syntax (#22)
1 parent c4e5cc2 commit 8ef126a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/strands_tools/memory.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,23 @@
4242
agent = Agent(tools=[memory])
4343
4444
# Store content in Knowledge Base
45-
agent.memory(
45+
agent.tool.memory(
4646
action="store",
4747
content="Important information to remember",
4848
title="Meeting Notes",
4949
STRANDS_KNOWLEDGE_BASE_ID="my1234kb"
5050
)
5151
5252
# Retrieve content using semantic search
53-
agent.memory(
53+
agent.tool.memory(
5454
action="retrieve",
5555
query="meeting information",
5656
min_score=0.7,
5757
STRANDS_KNOWLEDGE_BASE_ID="my1234kb"
5858
)
5959
6060
# List all documents
61-
agent.memory(
61+
agent.tool.memory(
6262
action="list",
6363
max_results=50,
6464
STRANDS_KNOWLEDGE_BASE_ID="my1234kb"

0 commit comments

Comments
 (0)