iii-sandbox
O que ela faz
Executa código em máquinas virtuais isoladas e de curta duração, para que código de origem desconhecida não consiga tocar no seu sistema principal. Ela é para desenvolvedores que criam agentes de IA ou ferramentas que executam código que não escreveram.
Quando usar
- ✓Quando um agente precisa executar código em que você não confia totalmente.
- ✓Quando você quer testar um trecho de código em um ambiente limpo que é descartado depois.
- ✓Quando você precisa de vários comandos ou edições de arquivo dentro de uma única sandbox isolada.
Link da skill
https://github.com/iii-hq/iii/blob/main/crates/iii-worker/src/sandbox_daemon/skills/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Execute este trecho de Python não confiável em uma sandbox isolada e me mostre a saída.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill inicia uma pequena máquina virtual, executa o código ou os comandos dentro dela e devolve a saída. Em trabalhos de várias etapas, a sandbox fica ativa entre as chamadas. Depois ela é interrompida e seus arquivos temporários são descartados.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
Quais computadores podem executá-la?
Macs com Apple Silicon ou máquinas Linux com virtualização de hardware. Macs Intel e o Windows não conseguem iniciar essas sandboxes.
Ela mantém meus arquivos depois?
Não. O sistema de arquivos temporário é descartado quando a sandbox para.
Preciso conhecer os detalhes das funções?
Não. A skill busca os argumentos exatos de cada função no motor antes de chamá-la.
Detalhes
Descrição original do autor
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
Popularidade
- Estrelas no GitHub
- 19 mil
- Posição no ranking
- #10485
- Licença
- —
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
configuration
19 milPermite que seu agente configure um registro compartilhado de valores de configuração nomeados, verificados contra um esquema, para que os workers leiam e reajam às mudanças.
iii
19 milEnsina seu agente como os workers do iii funcionam, para que ele possa adicionar uma capacidade verificando primeiro o que já existe e depois construindo um worker.
iii-observability
19 milAjuda seu agente a adicionar rastreamento, logs estruturados, métricas e alertas a um motor iii, usando o OpenTelemetry para que você veja o que está acontecendo.
iii-stream
19 milExplica o worker iii-stream para feeds de dados ao vivo. Ele está obsoleto e será removido em uma versão futura, então planeje sair dele.
Skills parecidas
diffs
394 milPermite que seu agente gere um diff real e compartilhável das edições, como link de visualização ou arquivo de imagem, em vez de um resumo escrito à mão.
coding-agent
394 milAjuda seu agente a passar um trabalho grande de programação para o Codex, Claude Code ou OpenCode em segundo plano e acompanhar o andamento.
gh-issues
394 milAjuda seu agente a encontrar issues do GitHub, escolher quais resolver e abrir pull requests com correções, acompanhando os comentários de revisão.