Skip to content

Commit bd2ef17

Browse files
authored
Update toolkit samples to reference Bedrock AgentCore (#549)
1 parent 49e7d9b commit bd2ef17

File tree

2 files changed

+14
-29
lines changed

2 files changed

+14
-29
lines changed

samples/tools/browser_toolkit.ipynb renamed to samples/tools/bedrock_agentcore_browser.ipynb

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Browser Toolkit with LangGraph React Agent\n",
7+
"# Bedrock AgentCore Browser toolkit with LangGraph React Agent\n",
88
"\n",
9-
"This notebook demonstrates how to use the AWS Browser Toolkit with a LangGraph React Agent to perform automated web browsing tasks. The Browser Toolkit provides a set of tools for navigating websites, interacting with web elements, and extracting information."
9+
"This notebook demonstrates how to use the [Bedrock AgentCore](https://aws.amazon.com/bedrock/agentcore/) based browser toolkit with a LangGraph React Agent to perform automated web browsing tasks. This toolkit provides a set of tools for navigating websites, interacting with web elements, and extracting information."
1010
]
1111
},
1212
{
@@ -36,11 +36,10 @@
3636
},
3737
{
3838
"cell_type": "code",
39-
"execution_count": 1,
39+
"execution_count": null,
4040
"metadata": {},
4141
"outputs": [],
4242
"source": [
43-
"import asyncio\n",
4443
"import logging\n",
4544
"\n",
4645
"from langchain.chat_models import init_chat_model\n",
@@ -56,14 +55,12 @@
5655
"cell_type": "markdown",
5756
"metadata": {},
5857
"source": [
59-
"## Create Browser Toolkit\n",
60-
"\n",
61-
"The Browser Toolkit provides tools for interacting with websites through a remote browser managed by AWS. It includes tools for navigating to URLs, clicking elements, extracting text, and more."
58+
"## Create Browser Toolkit"
6259
]
6360
},
6461
{
6562
"cell_type": "code",
66-
"execution_count": 2,
63+
"execution_count": null,
6764
"metadata": {},
6865
"outputs": [
6966
{
@@ -75,7 +72,6 @@
7572
}
7673
],
7774
"source": [
78-
"# Create the browser toolkit\n",
7975
"# The toolkit handles browser session management based on thread IDs\n",
8076
"toolkit, browser_tools = create_browser_toolkit(region=\"us-west-2\")\n",
8177
"\n",
@@ -94,7 +90,7 @@
9490
},
9591
{
9692
"cell_type": "code",
97-
"execution_count": 3,
93+
"execution_count": null,
9894
"metadata": {},
9995
"outputs": [],
10096
"source": [
@@ -118,7 +114,7 @@
118114
},
119115
{
120116
"cell_type": "code",
121-
"execution_count": 4,
117+
"execution_count": null,
122118
"metadata": {},
123119
"outputs": [],
124120
"source": [
@@ -153,7 +149,7 @@
153149
},
154150
{
155151
"cell_type": "code",
156-
"execution_count": 11,
152+
"execution_count": null,
157153
"metadata": {},
158154
"outputs": [],
159155
"source": [
@@ -201,7 +197,7 @@
201197
},
202198
{
203199
"cell_type": "code",
204-
"execution_count": 14,
200+
"execution_count": null,
205201
"metadata": {},
206202
"outputs": [
207203
{
@@ -243,7 +239,7 @@
243239
},
244240
{
245241
"cell_type": "code",
246-
"execution_count": 15,
242+
"execution_count": null,
247243
"metadata": {},
248244
"outputs": [
249245
{
@@ -301,13 +297,6 @@
301297
"await toolkit.cleanup()\n",
302298
"print(\"Browser resources cleaned up successfully\")"
303299
]
304-
},
305-
{
306-
"cell_type": "code",
307-
"execution_count": null,
308-
"metadata": {},
309-
"outputs": [],
310-
"source": []
311300
}
312301
],
313302
"metadata": {

samples/tools/code_interpreter_toolkit.ipynb renamed to samples/tools/bedrock_agentcore_code_interpreter.ipynb

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Code Interpreter Toolkit with LangGraph React Agent\n",
7+
"# Bedrock AgentCore Code Interpreter tools with LangGraph React Agent\n",
88
"\n",
9-
"This notebook demonstrates how to use the AWS Code Interpreter Toolkit with a LangGraph React Agent to perform code execution tasks. The Code Interpreter Toolkit provides a set of tools for running code, executing shell commands, and managing files in a secure environment."
9+
"This notebook demonstrates how to use the [Bedrock AgentCore](https://aws.amazon.com/bedrock/agentcore/) based code interpreter toolkit with a LangGraph React Agent to perform code execution tasks. This toolkit provides a set of tools for running code, executing shell commands, and managing files in a secure environment."
1010
]
1111
},
1212
{
@@ -36,13 +36,11 @@
3636
},
3737
{
3838
"cell_type": "code",
39-
"execution_count": 1,
39+
"execution_count": null,
4040
"metadata": {},
4141
"outputs": [],
4242
"source": [
43-
"import asyncio\n",
4443
"import logging\n",
45-
"from typing import Dict, List, Any\n",
4644
"\n",
4745
"from langchain.chat_models import init_chat_model\n",
4846
"from langchain_aws.tools import create_code_interpreter_toolkit\n",
@@ -57,9 +55,7 @@
5755
"cell_type": "markdown",
5856
"metadata": {},
5957
"source": [
60-
"## Create Code Interpreter Toolkit\n",
61-
"\n",
62-
"The Code Interpreter Toolkit provides tools for running code, managing files, and executing shell commands in a secure environment managed by AWS."
58+
"## Create Code Interpreter Toolkit"
6359
]
6460
},
6561
{

0 commit comments

Comments
 (0)