Skip to content

Commit 9c1031a

Browse files
Embed YT video for computer-use agent notebook (#306)
1 parent 7db3c69 commit 9c1031a

1 file changed

Lines changed: 22 additions & 19 deletions

File tree

notebooks/computer_use_agent_with_skills.ipynb

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"id": "c4dec3c0",
66
"metadata": {},
77
"source": [
8-
"# 🖥️ Computer-Use Agent with Skills\n",
8+
"# \ud83d\udda5\ufe0f Computer-Use Agent with Skills\n",
99
"\n",
10-
"*Notebook by [Kacper Łukawski](https://www.linkedin.com/in/kacperlukawski/)*\n",
10+
"*Notebook by [Kacper \u0141ukawski](https://www.linkedin.com/in/kacperlukawski/)*\n",
1111
"\n",
12-
"> 🚀 **Part of [Haystack 3.0 Launch Week](https://haystack.deepset.ai/launch-week/haystack-3)**: five days of new drops (July 20–24).\n",
12+
"> \ud83d\ude80 **Part of [Haystack 3.0 Launch Week](https://haystack.deepset.ai/launch-week/haystack-3)**: five days of new drops (July 20\u201324).\n",
1313
"\n",
1414
"In this notebook, we build a fully local, fully async agent that uses a **skill** to change how it reports back, and a custom `bash` tool to actually use the machine it runs on.\n",
1515
"\n",
@@ -22,6 +22,9 @@
2222
"\n",
2323
"Every piece runs through `async`/`await` end to end - `Agent.run_async`, the `bash` tool's `async_function`, and the human-in-the-loop confirmation - with no blocking calls in the loop.\n",
2424
"\n",
25+
"\ud83d\udcfa **Watch Along**\n",
26+
"<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/vefpGVFw_e8\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n",
27+
"\n",
2528
"**Stack:** Haystack `Agent` + [`SkillToolset`](https://docs.haystack.deepset.ai/docs/skilltoolset) + a local Ollama model + a custom async `bash` [`Tool`](https://docs.haystack.deepset.ai/docs/tool) + human-in-the-loop confirmation."
2629
]
2730
},
@@ -291,11 +294,11 @@
291294
"\n",
292295
"## Rules\n",
293296
"\n",
294-
"Drop: articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries (sure/certainly/of course/happy to), hedging. Fragments OK. Short synonyms (big not extensive, fix not \"implement a solution for\"). No tool-call narration, no decorative tables/emoji, no dumping long raw error logs unless asked quote shortest decisive line. Standard well-known tech acronyms OK (DB/API/HTTP); never invent new abbreviations (cfg/impl/req/res/fn) tokenizer split them same as full word: zero token saved, reader still decode. Full word cheaper AND clearer. No causal arrows () either own token, save nothing. Technical terms exact. Code blocks unchanged. Errors quoted exact.\n",
297+
"Drop: articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries (sure/certainly/of course/happy to), hedging. Fragments OK. Short synonyms (big not extensive, fix not \"implement a solution for\"). No tool-call narration, no decorative tables/emoji, no dumping long raw error logs unless asked \u2014 quote shortest decisive line. Standard well-known tech acronyms OK (DB/API/HTTP); never invent new abbreviations (cfg/impl/req/res/fn) \u2014 tokenizer split them same as full word: zero token saved, reader still decode. Full word cheaper AND clearer. No causal arrows (\u2192) either \u2014 own token, save nothing. Technical terms exact. Code blocks unchanged. Errors quoted exact.\n",
295298
"\n",
296-
"Preserve user's dominant language. User write Portuguese reply Portuguese caveman. User write Spanish reply Spanish caveman. Compress the style, not the language. No forced English openings or status phrases. ALWAYS keep technical terms, code, API names, CLI commands, commit-type keywords (feat/fix/...), and exact error strings verbatim unless user explicitly ask for translation.\n",
299+
"Preserve user's dominant language. User write Portuguese \u2192 reply Portuguese caveman. User write Spanish \u2192 reply Spanish caveman. Compress the style, not the language. No forced English openings or status phrases. ALWAYS keep technical terms, code, API names, CLI commands, commit-type keywords (feat/fix/...), and exact error strings verbatim \u2014 unless user explicitly ask for translation.\n",
297300
"\n",
298-
"No self-reference. Never name or announce the style. No \"caveman mode on\", \"me caveman think\", no third-person caveman tags. Output caveman-only never normal answer plus \"Caveman:\" recap. Exception: user explicitly ask what the mode is.\n",
301+
"No self-reference. Never name or announce the style. No \"caveman mode on\", \"me caveman think\", no third-person caveman tags. Output caveman-only \u2014 never normal answer plus \"Caveman:\" recap. Exception: user explicitly ask what the mode is.\n",
299302
"\n",
300303
"Pattern: `[thing] [action] [reason]. [next step].`\n",
301304
"\n",
@@ -308,38 +311,38 @@
308311
"|-------|------------|\n",
309312
"| **lite** | No filler/hedging. Keep articles + full sentences. Professional but tight |\n",
310313
"| **full** | Drop articles, fragments OK, short synonyms. Classic caveman. No tool-call narration, no decorative tables/emoji, no long raw error-log dumps unless asked. Standard acronyms OK; no invented abbreviations |\n",
311-
"| **ultra** | Strip conjunctions when cause-then-effect stay unambiguous. One word when one word enough. State each fact once. NO prose abbreviations (cfg/impl/req/res/fn/auth), NO arrows (X Y) measured zero token saving under tokenizer, cost decode clarity. Code symbols, function names, API names, error strings: never touch |\n",
314+
"| **ultra** | Strip conjunctions when cause-then-effect stay unambiguous. One word when one word enough. State each fact once. NO prose abbreviations (cfg/impl/req/res/fn/auth), NO arrows (X \u2192 Y) \u2014 measured zero token saving under tokenizer, cost decode clarity. Code symbols, function names, API names, error strings: never touch |\n",
312315
"| **wenyan-lite** | Semi-classical. Drop filler/hedging but keep grammar structure, classical register |\n",
313-
"| **wenyan-full** | Maximum classical terseness. Fully 文言文. 80-90% character reduction. Classical sentence patterns, verbs precede objects, subjects often omitted, classical particles (之/乃/為/其) |\n",
316+
"| **wenyan-full** | Maximum classical terseness. Fully \u6587\u8a00\u6587. 80-90% character reduction. Classical sentence patterns, verbs precede objects, subjects often omitted, classical particles (\u4e4b/\u4e43/\u70ba/\u5176) |\n",
314317
"| **wenyan-ultra** | Extreme abbreviation while keeping classical Chinese feel. Maximum compression, ultra terse |\n",
315318
"\n",
316-
"Example \"Why React component re-render?\"\n",
319+
"Example \u2014 \"Why React component re-render?\"\n",
317320
"- lite: \"Your component re-renders because you create a new object reference each render. Wrap it in `useMemo`.\"\n",
318321
"- full: \"New object ref each render. Inline object prop = new ref = re-render. Wrap in `useMemo`.\"\n",
319322
"- ultra: \"Inline obj prop, new ref, re-render. `useMemo`.\"\n",
320-
"- wenyan-lite: \"組件頻重繪,以每繪新生對象參照故。以 useMemo 包之。\"\n",
321-
"- wenyan-full: \"每繪新生對象參照,故重繪;以 useMemo 包之則免。\"\n",
322-
"- wenyan-ultra: \"新參照則重繪。useMemo 包之。\"\n",
323+
"- wenyan-lite: \"\u7d44\u4ef6\u983b\u91cd\u7e6a\uff0c\u4ee5\u6bcf\u7e6a\u65b0\u751f\u5c0d\u8c61\u53c3\u7167\u6545\u3002\u4ee5 useMemo \u5305\u4e4b\u3002\"\n",
324+
"- wenyan-full: \"\u6bcf\u7e6a\u65b0\u751f\u5c0d\u8c61\u53c3\u7167\uff0c\u6545\u91cd\u7e6a\uff1b\u4ee5 useMemo \u5305\u4e4b\u5247\u514d\u3002\"\n",
325+
"- wenyan-ultra: \"\u65b0\u53c3\u7167\u5247\u91cd\u7e6a\u3002useMemo \u5305\u4e4b\u3002\"\n",
323326
"\n",
324-
"Example \"Explain database connection pooling.\"\n",
327+
"Example \u2014 \"Explain database connection pooling.\"\n",
325328
"- lite: \"Connection pooling reuses open connections instead of creating new ones per request. Avoids repeated handshake overhead.\"\n",
326329
"- full: \"Pool reuse open DB connections. No new connection per request. Skip handshake overhead.\"\n",
327330
"- ultra: \"Pool reuse open DB connections. No per-request handshake.\"\n",
328-
"- wenyan-full: \"池蓄已開之連,不逐請而新開,省握手之費。\"\n",
329-
"- wenyan-ultra: \"池蓄連,免逐請新開,省握手。\"\n",
331+
"- wenyan-full: \"\u6c60\u84c4\u5df2\u958b\u4e4b\u9023\uff0c\u4e0d\u9010\u8acb\u800c\u65b0\u958b\uff0c\u7701\u63e1\u624b\u4e4b\u8cbb\u3002\"\n",
332+
"- wenyan-ultra: \"\u6c60\u84c4\u9023\uff0c\u514d\u9010\u8acb\u65b0\u958b\uff0c\u7701\u63e1\u624b\u3002\"\n",
330333
"\n",
331334
"## Auto-Clarity\n",
332335
"\n",
333336
"Drop caveman when:\n",
334337
"- Security warnings\n",
335338
"- Irreversible action confirmations\n",
336339
"- Multi-step sequences where fragment order or omitted conjunctions risk misread\n",
337-
"- Compression itself creates technical ambiguity (e.g., `\"migrate table drop column backup first\"` order unclear without articles/conjunctions)\n",
340+
"- Compression itself creates technical ambiguity (e.g., `\"migrate table drop column backup first\"` \u2014 order unclear without articles/conjunctions)\n",
338341
"- User asks to clarify or repeats question\n",
339342
"\n",
340343
"Resume caveman after clear part done.\n",
341344
"\n",
342-
"Example destructive op:\n",
345+
"Example \u2014 destructive op:\n",
343346
"> **Warning:** This will permanently delete all rows in the `users` table and cannot be undone.\n",
344347
"> ```sql\n",
345348
"> DROP TABLE users;\n",
@@ -390,7 +393,7 @@
390393
"\n",
391394
"The tool defines both a sync `function` and an `async_function` - Haystack picks whichever matches how you call it. Since this notebook runs fully async, we drive it through `invoke_async`, which awaits the real `asyncio.create_subprocess_shell` implementation below instead of the blocking `subprocess.run` one.\n",
392395
"\n",
393-
"> ⚠️ **Safety note:** this tool runs whatever command string the model gives it, via `shell=True`. That's fine\n",
396+
"> \u26a0\ufe0f **Safety note:** this tool runs whatever command string the model gives it, via `shell=True`. That's fine\n",
394397
"> for a local, single-user notebook where you approve every call. Never connect an unattended version of this\n",
395398
"> to untrusted input."
396399
]
@@ -753,4 +756,4 @@
753756
},
754757
"nbformat": 4,
755758
"nbformat_minor": 5
756-
}
759+
}

0 commit comments

Comments
 (0)