|
4 | 4 | "cell_type": "markdown",
|
5 | 5 | "metadata": {},
|
6 | 6 | "source": [
|
7 |
| - "# Browser Toolkit with LangGraph React Agent\n", |
| 7 | + "# Bedrock AgentCore Browser toolkit with LangGraph React Agent\n", |
8 | 8 | "\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." |
10 | 10 | ]
|
11 | 11 | },
|
12 | 12 | {
|
|
36 | 36 | },
|
37 | 37 | {
|
38 | 38 | "cell_type": "code",
|
39 |
| - "execution_count": 1, |
| 39 | + "execution_count": null, |
40 | 40 | "metadata": {},
|
41 | 41 | "outputs": [],
|
42 | 42 | "source": [
|
43 |
| - "import asyncio\n", |
44 | 43 | "import logging\n",
|
45 | 44 | "\n",
|
46 | 45 | "from langchain.chat_models import init_chat_model\n",
|
|
56 | 55 | "cell_type": "markdown",
|
57 | 56 | "metadata": {},
|
58 | 57 | "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" |
62 | 59 | ]
|
63 | 60 | },
|
64 | 61 | {
|
65 | 62 | "cell_type": "code",
|
66 |
| - "execution_count": 2, |
| 63 | + "execution_count": null, |
67 | 64 | "metadata": {},
|
68 | 65 | "outputs": [
|
69 | 66 | {
|
|
75 | 72 | }
|
76 | 73 | ],
|
77 | 74 | "source": [
|
78 |
| - "# Create the browser toolkit\n", |
79 | 75 | "# The toolkit handles browser session management based on thread IDs\n",
|
80 | 76 | "toolkit, browser_tools = create_browser_toolkit(region=\"us-west-2\")\n",
|
81 | 77 | "\n",
|
|
94 | 90 | },
|
95 | 91 | {
|
96 | 92 | "cell_type": "code",
|
97 |
| - "execution_count": 3, |
| 93 | + "execution_count": null, |
98 | 94 | "metadata": {},
|
99 | 95 | "outputs": [],
|
100 | 96 | "source": [
|
|
118 | 114 | },
|
119 | 115 | {
|
120 | 116 | "cell_type": "code",
|
121 |
| - "execution_count": 4, |
| 117 | + "execution_count": null, |
122 | 118 | "metadata": {},
|
123 | 119 | "outputs": [],
|
124 | 120 | "source": [
|
|
153 | 149 | },
|
154 | 150 | {
|
155 | 151 | "cell_type": "code",
|
156 |
| - "execution_count": 11, |
| 152 | + "execution_count": null, |
157 | 153 | "metadata": {},
|
158 | 154 | "outputs": [],
|
159 | 155 | "source": [
|
|
201 | 197 | },
|
202 | 198 | {
|
203 | 199 | "cell_type": "code",
|
204 |
| - "execution_count": 14, |
| 200 | + "execution_count": null, |
205 | 201 | "metadata": {},
|
206 | 202 | "outputs": [
|
207 | 203 | {
|
|
243 | 239 | },
|
244 | 240 | {
|
245 | 241 | "cell_type": "code",
|
246 |
| - "execution_count": 15, |
| 242 | + "execution_count": null, |
247 | 243 | "metadata": {},
|
248 | 244 | "outputs": [
|
249 | 245 | {
|
|
301 | 297 | "await toolkit.cleanup()\n",
|
302 | 298 | "print(\"Browser resources cleaned up successfully\")"
|
303 | 299 | ]
|
304 |
| - }, |
305 |
| - { |
306 |
| - "cell_type": "code", |
307 |
| - "execution_count": null, |
308 |
| - "metadata": {}, |
309 |
| - "outputs": [], |
310 |
| - "source": [] |
311 | 300 | }
|
312 | 301 | ],
|
313 | 302 | "metadata": {
|
|
0 commit comments