Creating Workers
ASecurity``` The images that ship with iii come in two variants: | Image | Contents | Use it when | | ------------------------------------------------------------------ | ----------------------------------------------------------------- | ------------------------------------------------------...
- 18,978 stars
- 0 votes
- 0 copies
- 1 view
- Added December 1, 2026
Works with
Security analysis
92/100- Installs packages at runtime which could introduce malicious dependencies
- Installs packages at runtime which could introduce malicious dependencies
Pro scans all 21 files and shows the line behind each finding
npx -y skills add iii-hq/iii --skill creating-workers --agent claude-codeAre you the author of Creating Workers?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/iii-hq-creating-workers-520bc058)<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/creating-workers/worker-manifest.mdx. -->
This page covers `iii.worker.yaml` configuration options. `iii.worker.yaml` exists at a worker's
root and gives iii what it needs to provision the worker's runtime, install its dependencies, start
its process, and pass through configuration. At add time the schema is strict: an unknown key is an
error, and the error lists the supported fields.
Compose reads two fields from it: `scripts.start` and `runtime.base_image`. The worker provisioning
path reads the other fields. Project workers are declared and operated through
[`worker-compose.yaml`](../using-iii/compose), not the engine's `config.yaml`.
For how to connect a worker into a project once its manifest exists, see
[Creating Workers / Workers](./workers).
<Note>
`iii.worker.yaml` only matters when iii provisions and runs the worker in its built-in
virtualization. If you run the worker process yourself, for example `node ./myworker/src/index.js`
on your own host, you do not need the manifest at all. Any process that uses an iii SDK, calls
`registerWorker()`, and connects to an iii instance is a worker, and behaves identically whether
iii started it or not.
</Note>
## `name`
Required. One path segment: ASCII alphanumerics, `-`, `_` and `.`. A leading `.` and a `..` sequence
are both errors.
## `description`
Optional. One-line summary of the worker. iii prints it when it installs a worker from an image.
## `runtime`
Declares details about the worker's environment. `base_image` is the only supported field.
### `base_image`
Optional. Overrides the default OCI rootfs. Must be a valid OCI reference (alphanumerics plus
`. _ - / : @ +`, max 512 characters). Invalid references are dropped with a warning and the default
is used.
```yaml
runtime:
base_image: oven/bun:1 # From docker.io
# Or a fully-qualified registry path, e.g. GitHub Container Registry:
# base_image: ghcr.io/astral-sh/uv:bookworm-slim
```
The images that ship with iii come in two variants:
| Image | Contents | Use it when |
| ------------------------------------------------------------------ | ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `docker.io/iiidev/node:latest`, `docker.io/iiidev/python:latest` | The language runtime and its package manager. No build toolchain. | The dependencies of the worker install from prebuilt binaries or wheels. This is the default. |
| `docker.io/iiidev/node:builder`, `docker.io/iiidev/python:builder` | The same runtime plus a C toolchain and the development tools. | A dependency compiles from source at install time, for example a node-gyp module or a source distribution. |
## `scripts`
Lifecycle commands. `setup` runs once when the sandbox is provisioned, for the system packages a
dependency needs to build. `install` installs dependencies. `start` runs the worker process, and it
is required.
<CodeGroup>
```yaml Node
scripts:
setup: "apt-get update && apt-get install -y build-essential"
install: "npm install"
start: "npx tsx watch src/index.ts"
```
```yaml Python
scripts:
setup: "apt-get update && apt-get install -y libpq-dev"
install: "pip install watchfiles && pip install -e ."
start: "watchfiles 'python main.py'"
```
```yaml Rust
scripts:
setup: "apt-get update && apt-get install -y pkg-config libssl-dev"
install: "cargo install cargo-watch && cargo build"
start: "cargo watch -x run"
```
```yaml Go
scripts:
setup: "apt-get update && apt-get install -y golang-go"
install: "go mod download && go build -o worker ./cmd/worker"
start: "./worker"
```
</CodeGroup>
Declare `setup`, `install` and `start` explicitly. The keys that fed the old inference path
(`runtime.kind`, `runtime.package_manager`, `runtime.entry`, `runtime.language`) are deprecated and
will be removed in a later version.
An omitted `install` skips the dependency install and prints a warning. `install: ""` skips it
without a warning.
<Note>
A registry bundle manifest rejects `scripts.setup` with `W180 BundleManifestRejected`. It accepts
`scripts.install` and `runtime.base_image`, and it rejects a base image that is not a plausible
OCI reference. See [Worker Registry](../using-iii/workers-registry#artifact-types).
</Note>
## `env`
Map of environment variables injected into the worker process. Keys and values must be strings. The
keys `III_URL` and `III_ENGINE_URL` are filtered out; the engine sets the connection URL itself.
```yaml
env:
LOG_LEVEL: info
MY_API_KEY: replace-me
```
The manifest does not set the namespace a worker registers in. The worker environment
(`III_NAMESPACE`) or the registration call sets it. See [Namespaces](../using-iii/namespaces).
## `dependencies`
Map of `<worker-name>: <semver range>` declaring other workers this worker depends on, resolved
against the registry.
```yaml
dependencies:
http: "^0.20"
state: "^0.20"
```
Rules:
- Each name must satisfy the same rules as [`name`](#name).
- Each range must be a valid semver version requirement (for example `^1.2`, `~0.5.0`, `>=2 <3`).
- Duplicate keys are an error.
- A worker cannot depend on itself.
- Prerelease ranges are accepted syntactically, but the default registry resolver serves only stable
versions, so a prerelease range surfaces as `version_not_found` at resolve time.
## `resources`
Optional CPU and memory requests for the worker's sandbox. Requests above the cap are clamped to the
cap. For bundle workers this emits a `W182 BundleResourceClamped` warning at install time.
```yaml
resources:
cpus: 2
memory: 2048
```
### `cpus`
Optional integer. Number of vCPUs. Defaults to `2`, capped at `4`.
### `memory`
Optional integer. Memory in MiB. Defaults to `2048`, capped at `4096`.
## `iii_engine_version`
Optional string: the semver range of iii engines the worker runs on, like the `engines` field of a
Node `package.json`. Compose refuses to validate or start the worker (`INCOMPATIBLE_ENGINE`) when the
running iii engine is outside the range, and registry installs only pick versions whose range
includes it. A registry bundle is checked again each time it is installed, so one pinned in
`worker-compose.lock` before an `iii update` is refused too. The engine is compared by its `MAJOR.MINOR.PATCH`, so `0.26.0-rc.2` counts as `0.26.0`.
A range is one or more comparators (`>=`, `>`, `<=`, `<`, `=`, `^`, `~`, or none, followed by
`MAJOR.MINOR.PATCH`). Comparators joined by spaces must all hold; sets joined by `||` may each
hold. A bare `0.26.0` means exactly that version, and `^0.26.0` means `>=0.26.0 <0.27.0`. No `v`
prefix, prerelease, `x` wildcard, or hyphen range.
Quote the value: YAML reads a leading `>` as a block scalar.
```yaml
iii_engine_version: ">=0.26.0"
# iii_engine_version: ">=0.26.0 <0.28.0"
# iii_engine_version: "^0.25.0 || ^0.26.0"
```
## Publish metadata: `iii`, `deploy`, `manifest`, `tags`, `license`
Optional metadata used by the workers-repository release pipeline, not by the engine. The engine
accepts these keys (so a manifest published from the workers repo also works with a local Compose
worker) but never reads them at runtime.
```yaml
iii: v1 # manifest format marker
deploy: image # release artifact type: binary | image | bundle
manifest: pyproject.toml # file the release version is read from
tags: # search aliases sent to the workers registry
- http
- rest
- api
license: Apache-2.0
```
`iii`, `deploy`, `manifest`, and `license` are strings. `tags` is a list of strings used for agent
and user discovery in the workers registry. Keep tags short, lowercase, and focused on search terms
rather than repeating the worker description. `license` is an
[SPDX license id](https://spdx.org/licenses/), for example `Apache-2.0`. The release pipeline of the
workers repository requires it.
Files in this skill
- channels.mdx
- channels.mdx.skill.md
- database.mdx
- database.mdx.skill.md
- functions.mdx
- functions.mdx.skill.md
- http.mdx
- http.mdx.skill.md
- index.mdx
- index.mdx.skill.md
- observability.mdx
- observability.mdx.skill.md
- observable-functions.mdx
- observable-functions.mdx.skill.md
- queues.mdx
- queues.mdx.skill.md
- sandboxes.mdx
- sandboxes.mdx.skill.md
- worker-manager.mdx
- worker-manager.mdx.skill.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.