iii-sandbox
하는 일
이 스킬은 짧게 살아 있다가 사라지는 격리 가상 머신에서 코드를 실행하므로, 출처를 알 수 없는 코드가 주 시스템을 건드릴 수 없습니다. 자신이 쓰지 않은 코드를 실행하는 AI 에이전트나 도구를 만드는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓에이전트가 완전히 신뢰하지 않는 코드를 실행해야 할 때.
- ✓버려질 깨끗한 환경에서 코드 조각을 테스트하고 싶을 때.
- ✓하나의 격리 샌드박스 안에서 여러 명령이나 파일 편집을 해야 하는 경우.
스킬 링크
https://github.com/iii-hq/iii/blob/main/crates/iii-worker/src/sandbox_daemon/skills/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 신뢰할 수 없는 Python 코드 조각을 격리된 샌드박스에서 실행하고 출력을 보여 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 작은 가상 머신을 부팅하고, 그 안에서 코드나 명령을 실행해 출력을 돌려줍니다. 여러 단계 작업에서는 샌드박스가 여러 호출에 걸쳐 실행 중으로 유지되며, 끝나면 중지되고 임시 파일은 버려집니다.
기술 내용 (원본 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이나 하드웨어 가상화를 지원하는 Linux 컴퓨터입니다. Intel Mac과 Windows에서는 이 샌드박스를 부팅할 수 없습니다.
나중에 제 파일이 남나요?
아니요. 샌드박스가 중지되면 임시 파일 시스템이 버려집니다.
함수의 세부 사항을 알아야 하나요?
아니요. 스킬은 호출하기 전에 엔진에서 각 함수의 정확한 인자를 가져옵니다.
상세 정보
작성자의 원본 설명
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
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
configuration
19k에이전트가 스키마로 검사하는 이름 있는 설정 값의 공유 레지스트리를 만들도록 돕습니다. 워커가 변경을 읽고 반응할 수 있습니다.
iii
19k에이전트가 iii 워커의 작동 방식을 익혀, 먼저 이미 있는 기능을 확인한 뒤 워커를 만들어 기능을 추가하도록 가르칩니다.
iii-observability
19k에이전트가 iii 엔진에 추적, 구조화된 로그, 지표, 알림을 추가하도록 돕습니다. OpenTelemetry를 써서 시스템에서 무슨 일이 일어나는지 볼 수 있습니다.
iii-stream
19k이 워커는 지원 중단되었으며 곧 제거될 예정이니, 실시간 데이터 피드를 쓰고 있다면 옮길 계획을 세우세요.