iii-sandbox
यह क्या करती है
यह स्किल कोड को छोटे समय के लिए बने, अलग-थलग virtual machines में चलाती है, ताकि अज्ञात स्रोत का कोड आपके मुख्य सिस्टम को न छू सके। यह उन डेवलपरों के लिए है जो ऐसे AI एजेंट या टूल बनाते हैं जो वह कोड चलाते हैं जो उन्होंने खुद नहीं लिखा।
कब इस्तेमाल करें
- ✓जब कोई एजेंट ऐसा कोड चलाना चाहे जिस पर आप पूरा भरोसा नहीं करते।
- ✓जब आप किसी snippet को साफ़ वातावरण में परखना चाहते हों, जो बाद में हटा दिया जाए।
- ✓जब आपको एक अलग-थलग sandbox के भीतर कई कमांड या फ़ाइल बदलाव चाहिए।
Skill का लिंक
https://github.com/iii-hq/iii/blob/main/crates/iii-worker/src/sandbox_daemon/skills/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस अविश्वसनीय Python snippet को एक अलग-थलग sandbox में चलाइए और मुझे आउटपुट दिखाइए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल एक छोटी virtual machine शुरू करती है, उसके भीतर कोड या कमांड चलाती है, और आउटपुट लौटाती है। बहु-चरण काम के लिए sandbox कॉल्स के बीच चालू रहता है, और फिर उसे बंद करके उसकी अस्थायी फ़ाइलें हटा दी जाती हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
iii-sandbox
The iii-sandbox worker boots ephemeral libkrun microVMs and runs code inside them, isolated from the host. Each sandbox boots in a few hundred milliseconds, runs commands or file operations scoped to the engine it lives on, and is reaped when idle; the overlay filesystem is discarded on stop. Its sandbox::* functions are called like any other iii function.
There are two ways in. sandbox::run is the fast path: it boots a VM, runs a code snippet, captures stdout/stderr, and tears the VM down in a single call. For multi-step work — several commands, multiple files, or inspecting a VM between steps — use the sandbox::create → sandbox::exec / sandbox::fs::* → sandbox::stop lifecycle and carry the returned sandbox id across calls.
Prerequisites: enable iii-sandbox under engine.workers (or the five-worker allowlist of a
directly supervised engine), and provide hardware virtualization (Apple Silicon, or /dev/kvm on
Linux). Intel Macs and Windows cannot boot sandboxes.
Get the contract from the engine
This page tells you WHEN and HOW to use the sandbox; the engine is the source of truth for every function's exact arguments and responses. Before you call any sandbox::* function, fetch its contract and build your payload from that — do not guess field names, types, or formats from memory:
engine::functions::info { function_id: "sandbox::<fn>" }
(e.g. { function_id: "sandbox::fs::write" }). The returned schema is authoritative; this skill never restates it.
Running an iii worker inside a sandbox
To author an iii worker (read the iii skill first), you write the worker code into the sandbox, install its deps, and run it as a process there — but the worker must still join the HOST engine bus to be useful.
- Reaching the host engine: enable networking when you create the sandbox (the field is in the
sandbox::createcontract — fetch it), AND set the worker's engine-URL env (III_ENGINE_URL, e.g.ws://localhost:49134) IN THEsandbox::createenv— NOT later at exec/run time. The localhost→host rewrite happens ONLY for the create-timeenv: alocalhost/127.0.0.1engine URL set there is rewritten to the per-sandbox gateway so the worker reaches the host bus. The samelocalhostURL passed atsandbox::exectime is NOT rewritten — it points at the sandbox's own loopback, the worker silently fails to connect, and you will waste turns debugging TCP. So: put the engine URL in the createenv; the worker process inherits it already rewritten. - Run it backgrounded, never as a foreground
exec: starting the worker withsandbox::exec "node index.mjs"blocks and times out (S200 exec timed out), because the process never returns. Launch it detached (… &,nohup, orsandbox::runshell mode) so the exec call returns while the worker keeps running — see the serialized-exec boundary below. - Find the result: once the worker connects, its functions appear in
engine::functions::listand anyhttptrigger it binds is served by the Composehttpworker; verify endpoints withweb::fetch, notcurl. - EPHEMERAL by nature: a worker hosted in a sandbox dies when the sandbox is stopped or reaped (the overlay is discarded). That is fine for a demo, test, or one-off. Declare a long-lived worker as a Compose
containerinstead of hosting it in a sandbox.
When to Use
- Execute untrusted or LLM-generated code without exposing the host.
- One-shot "code in, stdout out" — reach for
sandbox::run. - Spin up an ephemeral build worker, integration-test fixture, or throwaway iii worker.
- Read, write, search, or edit files inside an isolated filesystem.
Boundaries
- A sandbox is for running code and build steps, NOT for hosting a long-lived server. To expose an HTTP API or any always-on endpoint, author an iii worker and register a trigger for it (an
httptrigger is served by the Composehttpworker) — do NOT start a server process (express,http.createServer, a frameworklisten()) inside the sandbox. A server you start here is not routed by iii, is unreachable as an iii endpoint, and as a foreground process hangs the exec slot until it times out. If the task is "build an iii worker," the deliverable is registered functions plus a trigger, not a running server. - Not for long-lived services or durable state — the overlay is wiped on stop. Use a regular worker for daemons and the Compose
stateworker for persistence. - Bootable images are catalog NA
अक्सर पूछे जाने वाले सवाल
कौन-से कंप्यूटर इसे चला सकते हैं?
Apple Silicon Mac, या hardware virtualization वाली Linux मशीनें। Intel Mac और Windows इन sandboxes को शुरू नहीं कर सकते।
क्या बाद में मेरी फ़ाइलें रहेंगी?
नहीं। sandbox बंद होने पर उसकी अस्थायी filesystem हटा दी जाती है।
क्या मुझे function के विवरण पता होने चाहिए?
नहीं। स्किल कॉल करने से पहले engine से हर function के सटीक arguments लाती है।
जानकारी
लेखक का मूल विवरण
Ephemeral microVM sandboxes for running untrusted or agent-generated code in isolation — a one-call run path, a create/exec/stop lifecycle, and a set of filesystem operations.
repo: iii-hq/iii
लोकप्रियता
- GitHub स्टार
- 19k
- रैंकिंग में स्थान
- #10485
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
configuration
19kआपके एजेंट को नामित कॉन्फ़िगरेशन मानों की एक साझा रजिस्ट्री सेट करने देती है, जिसे schema से जाँचा जाता है, ताकि workers बदलावों को पढ़ सकें और उन पर प्रतिक्रिया दे सकें।
iii
19kआपके एजेंट को iii workers कैसे काम करते हैं यह सिखाती है, ताकि वह पहले मौजूदा चीज़ें जाँचकर, फिर worker बनाकर कोई क्षमता जोड़ सके।
iii-observability
19kआपके एजेंट को iii engine में tracing, संरचित logs, metrics और alerts जोड़ने में मदद करती है, OpenTelemetry इस्तेमाल करके ताकि आप देख सकें कि क्या हो रहा है।
iii-stream
19kलाइव डेटा फ़ीड के लिए iii-stream worker समझाती है। यह deprecated है और आने वाले release में हटा दिया जाएगा, इसलिए इससे हटने की योजना बनाएँ।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।