Skip to content

Commit 41dffc5

Browse files
committed
improvements
1 parent 50f7dd1 commit 41dffc5

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

notebooks/browser_agents.ipynb

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"source": [
3838
"First, we'll install all the necessary dependencies:\n",
3939
"- 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"
4141
]
4242
},
4343
{
@@ -459,9 +459,7 @@
459459
"id": "2wWXv1IWzN6W"
460460
},
461461
"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."
465463
]
466464
},
467465
{
@@ -654,12 +652,12 @@
654652
"source": [
655653
"### 👨🏻‍💻 Find information about a GitHub contributor\n",
656654
"\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."
658656
]
659657
},
660658
{
661659
"cell_type": "code",
662-
"execution_count": 14,
660+
"execution_count": null,
663661
"metadata": {
664662
"colab": {
665663
"base_uri": "https://localhost:8080/"
@@ -695,7 +693,8 @@
695693
"source": [
696694
"messages = [ChatMessage.from_user(\"\"\"\n",
697695
"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",
699698
"\"\"\")\n",
700699
"]\n",
701700
"\n",
@@ -1063,9 +1062,7 @@
10631062
"id": "d2CSB3CR9GaR"
10641063
},
10651064
"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."
10691066
]
10701067
},
10711068
{
@@ -1215,7 +1212,7 @@
12151212
},
12161213
{
12171214
"cell_type": "code",
1218-
"execution_count": 11,
1215+
"execution_count": null,
12191216
"metadata": {
12201217
"colab": {
12211218
"base_uri": "https://localhost:8080/"
@@ -1279,10 +1276,10 @@
12791276
"\n",
12801277
"[TOOL CALL]\n",
12811278
"Tool: browser_wait_for \n",
1282-
"Arguments: {\"time\": 25}\n",
1279+
"Arguments: {\"time\": 5}\n",
12831280
"\n",
12841281
"[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",
12861283
"\n",
12871284
"[ASSISTANT]\n",
12881285
"https://black-forest-labs-flux-1-schnell.hf.space/file=/tmp/gradio/3a1d55dec7f02816a136f855fafe9c754364d14f/image.webp\n",
@@ -1292,10 +1289,10 @@
12921289
],
12931290
"source": [
12941291
"prompt=\"\"\"\n",
1295-
"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",
12961293
"2. Craft a detailed, descriptive prompt using your language skills to depict: \"my holiday on Lake Como\".\n",
12971294
"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",
12991296
"5. Your final response must contain only the direct link to the generated image — no additional text.\n",
13001297
"\"\"\"\n",
13011298
"\n",
@@ -1356,7 +1353,7 @@
13561353
"\n",
13571354
"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",
13581355
"\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",
13601357
"\n",
13611358
"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",
13621359
"\n",
@@ -1379,4 +1376,4 @@
13791376
},
13801377
"nbformat": 4,
13811378
"nbformat_minor": 0
1382-
}
1379+
}

0 commit comments

Comments
 (0)