kit.yaml

Every skill runs in a sandbox, and its kit says what that sandbox gets. Read this page when a skill needs more than the default image, hosts of its own or a setup step.

kit.yaml describes the sandbox the skill runs in. The file is optional; unknown keys are rejected.

Key Type Default Meaning
image string the deployment’s image Container image of the sandbox. Empty uses sandbox.image from kojo.yaml, or the toolchain image published with the release.
resources.cpu string none CPU request, in Kubernetes quantity syntax: "4". At most the deployment’s sandbox.max_resources.cpu.
resources.memory string none Memory request: 8Gi. At most sandbox.max_resources.memory.
resources.disk string none Size of the workspace: 40Gi. At most sandbox.max_resources.disk.
needs_docker boolean false The skill wants its own Docker daemon in the sandbox.
egress.allow list of strings none Hosts the sandbox may reach, on ports 443 and 80, or host:port for another port. Everything else is denied.
credentials list none Credentials the proxy injects, by name.
credentials[].name string required Unique within the kit.
credentials[].hosts list of strings none Hosts the credential is sent to, with the port when it is not 443 or 80. Each must be covered by egress.allow.
credentials[].scope string none Documentation only: what the credential is for, such as contents:read. It is not enforced.
setup list of strings none Shell commands run in the workspace before the skill’s first run in a session.

There is no env or secrets key. A kit never carries a secret, only the name of a credential the deployment holds.

Egress. An entry is a hostname or a *.domain pattern, which allows ports 443 and 80, or either followed by a port, registry.example.com:5000, which allows that port only. A port is a number from 1 to 65535. A bare *, a path or a user is refused. You do not list the forge: kōjō adds the host the repository is cloned from, and the clone credential for it, to every sandbox of the session. kojo-proxy sets that credential only on git’s fetch. A push, a writing API call or an API read from a sandbox goes out without it, on every forge; with the sbx driver, deny rules refuse them. On GitHub the credential is also short-lived and limited to the repository; on GitLab and Forgejo it is the configured token. See Security. A repository or org kit must stay inside the scope’s egress limits (settings/egress), which only an admin edits. A new install starts with the Go, npm, PyPI, crates.io, Maven Central and RubyGems registries, the vulnerability databases vuln.go.dev and api.osv.dev, and the configured forges’ hosts: every host a built-in kit names. How the allowlist is enforced is on the kojo-proxy page.

Credentials. A credential name must be on the scope’s allowed_credentials list. A name resolves only when it is the forge of the session’s own repository (github, gitlab or forgejo), and then only to that repository’s clone credentials. Any other name is an error when the sandbox is set up.

Resources. What a driver does with each quantity is in Resources, timeouts and lifetime. A deployment can cap every kit with sandbox.max_resources in kojo.yaml: a kit that asks for more gets the cap, and one that asks for less keeps its own. The docker driver also lowers CPU and memory to what the Docker daemon has. A kit is not refused for asking for more than the machines have; on Kubernetes its sandbox fails when no node can take its pod (see Scheduling).

Docker. needs_docker is honoured where the sandbox driver can provide a Docker daemon. Where it cannot, the skill still runs, without Docker, and the subagent is told so in its instructions.

Setup. Setup commands run before the skill’s first run in a session, with the kit’s egress allowlist in force. They run once per skill and session: a second run of the same skill does not repeat them, and each skill of a session runs its own, even when two skills share a sandbox. Each command is recorded as a step of the session and has 10 minutes. A failing command stops the skill before it starts. Setup runs before the starting point of the skill’s diff is taken, so files it creates do not count against the skill’s constraints; files that .gitignore does not hide are still part of the session’s change.

Image. When two skills of a session name different images, the session creates a second sandbox and copies the workspace into it. On the k8s driver the sandbox runs with no capability and cannot gain privileges, even when the image runs as root, so setup cannot install system packages (apt-get switches users and changes file owners): put them in the image. Writing under the image’s own directories still works for the user that owns them.

Scroll to move. + - zoom, 0 fit, Esc close.100%