cloud-agent-sandbox
Sets up and runs this monorepo inside a memory-constrained Kilo Cloud Agent sandbox with `.kilo/cloud-agent-setup.sh`. Use when working in a Cloud Agent…
от Kilo-Org★ 25 звёзд на GitHub
Установить cloud-agent-sandbox в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Cloud Agent sandbox
.kilo/cloud-agent-setup.sh prepares a Debian/Ubuntu Cloud Agent sandbox for
pnpm dev:start. It usually runs automatically when the machine starts. You can
run it at any time: reruns are safe and take about 20 s once the machine is set up.
Follow the local-development skill for ports, fake login, and service
management. This skill covers what is different in the sandbox.
Is setup done?
What survives depends on how the sandbox came back:
- A plain restart wipes Docker, the pnpm wrapper, and
.wrangler/kilo-startup/. The repository andnode_modulessurvive. Run full setup. - A workspace resumed from a workspace tail snapshot, or a session started from
an environment snapshot, gets the whole disk back: the pnpm wrapper,
.wrangler/kilo-startup/, installed packages, and Docker images. Processes and cgroups are not restored, so dockerd, dnsmasq, the DNS iptables rule, and thekilo-dockercgroup are gone. Nothing restarts them automatically: Docker is only needed by the dev stack, database tests, and local Cloud Agent sessions, so start it when you need those.
Check before starting services from the repository root:
if ! test -f .wrangler/kilo-startup/env \
|| ! grep -q kilo-cloud-agent-pnpm-wrapper "$(command -v pnpm)"; then
echo 'setup needed'
elif ! docker info >/dev/null 2>&1; then
echo 'resume needed'
else
echo ready
fi
For resume needed, restart Docker, dnsmasq, and the DNS redirect from the
installed filesystem. This takes a few seconds and skips apt, installs, and
image builds:
bash .kilo/cloud-agent-setup.sh --resume
For setup needed, run full setup:
bash .kilo/cloud-agent-setup.sh
--resume on a machine that was never set up runs full setup instead.
A restarted machine takes about 6 minutes, mostly building the Cloud Agent
sandbox images; node_modules survives the restart. A rerun on a running
machine takes under 2 minutes, because images come from the build cache. A
machine without dependencies adds about 3 minutes for pnpm install. Setup stops at the first failure and prints
the line number.
Memory containment
The session wrapper (services/cloud-agent-next/wrapper/src/control/workload-cgroup.ts)
owns memory limits; setup does not create a cap of its own. Under the delegated
/sys/fs/cgroup/kilo-workloads, capped at the container limit minus 1 GiB:
| cgroup | Owner | Contents and limit |
|---|---|---|
kilo-control-<id>/server |
wrapper | The Kilo server, protected with memory.min and OOM immunity |
kilo-control-<id>/tools |
wrapper | Every agent tool process: pnpm, node, tmux, dev servers. Moved there within a second. Capped 1.5 GiB below the parent |
kilo-setup |
wrapper | Environment setup and start commands and the daemons they start |
kilo-docker |
setup | daemon/ holds dockerd, containerd, and dnsmasq. containers/ holds every container, and containers/builds (2 GiB) holds image builds. Capped 1.5 GiB below the parent |
Every agent process is capped within a second of starting, however it was
started. When the Kilo runtime stops, the wrapper kills its whole
kilo-control-<id> scope, including dev servers the agent started. Docker and
its containers survive in kilo-docker.
What setup does
- Creates the
kilo-dockercgroup tree above. - Installs Docker, Compose v2, tmux, Chromium, agent-browser, and dnsmasq.
Starts dockerd with its containers in
kilo-docker/containersand pulls images throughmirror.gcr.io. The daemon log is.wrangler/kilo-startup/dockerd.log. - Installs a global
pnpmwrapper. Inside this repository it loads.wrangler/kilo-startup/env. Outside the repository it runs the real pnpm, saved at/usr/local/lib/kilo-cloud-agent/real-pnpm, unchanged. - Installs dependencies, creates
.env.local, runspnpm test:db, and seeds a fake-login user with credits and local Cloud Agent billing SKUs. - Builds the Cloud Agent sandbox images by running
wrangler devforcloud-agent-nexton spare ports untilContainer image(s) ready. The log is.wrangler/kilo-startup/sandbox-images.log. Skip this withKILO_STARTUP_SANDBOX_IMAGES=0. - It does not start the dev stack.
Environment builds
The same script runs as an environment's setup command in the snapshot builder.
The builder sets KILO_ENVIRONMENT_BUILD=1 for every setup command; the script
uses it to switch to build mode. That builder has no session wrapper, so it has
no kilo-workloads cgroup. Build mode installs packages, pulls images and warms
the sandbox image build, then stops the Docker daemon it started and exits. It
skips the Docker cgroup, database migration and fake-user seed. Without
KILO_ENVIRONMENT_BUILD=1, a missing kilo-workloads cgroup still fails setup.
A snapshot captures files, not running daemons. In a session started from it,
run bash .kilo/cloud-agent-setup.sh --resume before starting services, as
described above.
Environ
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл cloud-agent-sandbox?
Sets up and runs this monorepo inside a memory-constrained Kilo Cloud Agent sandbox with `.kilo/cloud-agent-setup.sh`. Use when working in a Cloud Agent sandbox, before starting local services there, after a sandbox restart, or when debugging the dev memory cap, Docker, DNS, fake login, agent-browser, or fake-LLM Cloud Agent sessions in the sandbox.
Как установить скилл cloud-agent-sandbox?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cloud-agent-sandbox запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
AnthropicThe scan that the plugin's GitHub Action runs.
azure-static-web-apps
GitHubHelps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
ai-ready
GitHubMake any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
aws-cdk-python-setup
GitHubSetup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…