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/computer_use_agent_with_skills.ipynb
+22-19Lines changed: 22 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,11 @@
5
5
"id": "c4dec3c0",
6
6
"metadata": {},
7
7
"source": [
8
-
"# 🖥️ Computer-Use Agent with Skills\n",
8
+
"# \ud83d\udda5\ufe0f Computer-Use Agent with Skills\n",
9
9
"\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",
11
11
"\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",
13
13
"\n",
14
14
"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",
15
15
"\n",
@@ -22,6 +22,9 @@
22
22
"\n",
23
23
"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",
"**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."
26
29
]
27
30
},
@@ -291,11 +294,11 @@
291
294
"\n",
292
295
"## Rules\n",
293
296
"\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",
295
298
"\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",
297
300
"\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",
"| **lite** | No filler/hedging. Keep articles + full sentences. Professional but tight |\n",
310
313
"| **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",
312
315
"| **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",
314
317
"| **wenyan-ultra** | Extreme abbreviation while keeping classical Chinese feel. Maximum compression, ultra terse |\n",
"- 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",
338
341
"- User asks to clarify or repeats question\n",
339
342
"\n",
340
343
"Resume caveman after clear part done.\n",
341
344
"\n",
342
-
"Example — destructive op:\n",
345
+
"Example \u2014 destructive op:\n",
343
346
"> **Warning:** This will permanently delete all rows in the `users` table and cannot be undone.\n",
344
347
"> ```sql\n",
345
348
"> DROP TABLE users;\n",
@@ -390,7 +393,7 @@
390
393
"\n",
391
394
"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",
392
395
"\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",
394
397
"> for a local, single-user notebook where you approve every call. Never connect an unattended version of this\n",
0 commit comments