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: notebooks/browser_agents.ipynb
+14-17Lines changed: 14 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@
37
37
"source": [
38
38
"First, we'll install all the necessary dependencies:\n",
39
39
"- Haystack integrations: [MCP](https://docs.haystack.deepset.ai/docs/mcptoolset) and [Google GenAI](https://docs.haystack.deepset.ai/docs/googlegenaichatgenerator)\n",
40
-
"- Playwright dependencies: these are needed to succesfully run it on Colab"
40
+
"- Playwright dependencies: these are needed to successfully run it on Colab"
41
41
]
42
42
},
43
43
{
@@ -459,9 +459,7 @@
459
459
"id": "2wWXv1IWzN6W"
460
460
},
461
461
"source": [
462
-
"Let's now use our agent to find similar news stories appearing on different web sites.\n",
463
-
"\n",
464
-
"TODO: maybe add video"
462
+
"Let's now use our agent to find similar news stories appearing on different web sites."
465
463
]
466
464
},
467
465
{
@@ -654,12 +652,12 @@
654
652
"source": [
655
653
"### 👨🏻💻 Find information about a GitHub contributor\n",
656
654
"\n",
657
-
"This example is not original: I took it from a Hugging Face tutorial, but it's nice."
655
+
"This example is not original: I took it from a [Hugging Face tutorial](https://huggingface.co/docs/smolagents/en/examples/web_browser), but it's nice."
658
656
]
659
657
},
660
658
{
661
659
"cell_type": "code",
662
-
"execution_count": 14,
660
+
"execution_count": null,
663
661
"metadata": {
664
662
"colab": {
665
663
"base_uri": "https://localhost:8080/"
@@ -695,7 +693,8 @@
695
693
"source": [
696
694
"messages = [ChatMessage.from_user(\"\"\"\n",
697
695
"I'm trying to find how hard I have to work to get a repo in github.com/trending.\n",
698
-
"Can you navigate to the profile for the top author of the top trending repo, and give me their total number of commits over the last year?\n",
696
+
"Can you navigate to the profile for the top author of the top trending repo, \n",
697
+
"and give me their total number of contributions over the last year?\n",
699
698
"\"\"\")\n",
700
699
"]\n",
701
700
"\n",
@@ -1063,9 +1062,7 @@
1063
1062
"id": "d2CSB3CR9GaR"
1064
1063
},
1065
1064
"source": [
1066
-
"Using Google Maps, let's ask a harder question, which requires more navigation.\n",
1067
-
"\n",
1068
-
"TODO: maybe video"
1065
+
"Using Google Maps, let's ask a harder question, which requires more navigation."
1069
1066
]
1070
1067
},
1071
1068
{
@@ -1215,7 +1212,7 @@
1215
1212
},
1216
1213
{
1217
1214
"cell_type": "code",
1218
-
"execution_count": 11,
1215
+
"execution_count": null,
1219
1216
"metadata": {
1220
1217
"colab": {
1221
1218
"base_uri": "https://localhost:8080/"
@@ -1279,10 +1276,10 @@
1279
1276
"\n",
1280
1277
"[TOOL CALL]\n",
1281
1278
"Tool: browser_wait_for \n",
1282
-
"Arguments: {\"time\": 25}\n",
1279
+
"Arguments: {\"time\": 5}\n",
1283
1280
"\n",
1284
1281
"[TOOL RESULT]\n",
1285
-
"{\"meta\":null,\"content\":[{\"type\":\"text\",\"text\":\"### Result\\nWaited for 25\\n\\n### New console messages\\n- [WARNING] Unrecognized feature: 'ambient-light-sensor'. @ https://huggingface.co/spaces/black-fo...\n",
1282
+
"{\"meta\":null,\"content\":[{\"type\":\"text\",\"text\":\"### Result\\nWaited for 5\\n\\n### New console messages\\n- [WARNING] Unrecognized feature: 'ambient-light-sensor'. @ https://huggingface.co/spaces/black-fo...\n",
"1. Visit Hugging Face Spaces and locate the Space named flux.1/schnell.\n",
1292
+
"1. Visit Hugging Face Spaces, search the Space named exactly \"FLUX.1 [schnell]\" and enter it.\n",
1296
1293
"2. Craft a detailed, descriptive prompt using your language skills to depict: \"my holiday on Lake Como\".\n",
1297
1294
"3. Use this prompt to generate an image within the Space.\n",
1298
-
"4. Wait 25 seconds to allow the image to fully generate.\n",
1295
+
"4. After prompting, wait 5 seconds to allow the image to fully generate. Repeat until the image is generated.\n",
1299
1296
"5. Your final response must contain only the direct link to the generated image — no additional text.\n",
1300
1297
"\"\"\"\n",
1301
1298
"\n",
@@ -1356,7 +1353,7 @@
1356
1353
"\n",
1357
1354
"When I first started exploring Browser Agents, I expected to hit roadblocks quickly. But with the right framework, a solid LLM, and the Playwright MCP server (even without screenshot capabilities), you can actually get quite far. This notebook shows some fun and sometimes impressive demos that emerged from that process.\n",
1358
1355
"\n",
1359
-
"We've also been exploring how to move these agents from notebooks to production: deploying a browser agent in a Docker environment, exposing it via an API, and integrating it into a simple UI. You can find ready-to-deploy code for that setup in the Haystack demos repository (TODO: add link when ready).\n",
1356
+
"We also want to explore how to move these agents from notebooks to production: deploying in Docker environment, exposing via an API, and integrating into a simple UI. More material on this will come in the future.\n",
1360
1357
"\n",
1361
1358
"Of course, there are use cases where vision capabilities or authentication handling are essential. If you are interested in support for those features, feel free to open a [discussion on GitHub](https://github.com/deepset-ai/haystack/discussions).\n",
0 commit comments