Iii iii-engine-config
git clone https://github.com/iii-hq/iii
T=$(mktemp -d) && git clone --depth=1 https://github.com/iii-hq/iii "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/iii-engine-config" ~/.claude/skills/iii-hq-iii-iii-engine-config && rm -rf "$T"
skills/iii-engine-config/SKILL.mdEngine Config
Comparable to: Infrastructure as code, Docker Compose configs
Key Concepts
Use the concepts below when they fit the task. Not every deployment needs all workers or adapters.
- iii-config.yaml defines the engine workers, adapters, and queue configs
- Environment variables use
syntax (default is optional)${VAR:default} - Workers are the building blocks — each enables a capability (API, state, queue, cron, etc.)
- External workers are binary modules managed via
and theiii.toml
CLI commandsiii worker - Adapters swap storage backends per worker: in_memory, file_based, Redis, RabbitMQ
- Queue configs control retry count, concurrency, ordering, and backoff per named queue
- The engine listens on port 49134 (WebSocket) for SDK/worker connections
Architecture
The iii-config.yaml file is loaded by the iii engine binary at startup. Workers are initialized in order, adapters connect to their backends, and the engine begins accepting worker connections over WebSocket on port 49134. External workers defined in the config are spawned as child processes automatically.
iii Primitives Used
| Primitive | Purpose |
|---|---|
| HTTP API server (port 3111) |
| WebSocket streams (port 3112) |
| Persistent key-value state storage |
| Background job processing with retries |
| In-process event fanout |
| Time-based scheduling |
| OpenTelemetry traces, metrics, logs |
| Outbound HTTP call security |
| Spawn external processes |
| Distributed cross-engine invocation |
| Anonymous product analytics |
| Worker connection lifecycle |
| Built-in engine functions |
| Worker manifest (name → version) |
| Install a worker from the registry |
| Uninstall a worker |
| List installed workers |
| Show registry info for a worker |
Reference Implementation
See ../references/iii-config.yaml for the full working example — a complete engine configuration with all workers, adapters, queue configs, and environment variable patterns.
Common Patterns
Code using this pattern commonly includes, when relevant:
— start the engine with a config fileiii --config ./iii-config.yaml
— pull the Docker imagedocker pull iiidev/iii:latest- Dev storage:
withstore_method: file_basedfile_path: ./data/... - Prod storage: Redis adapters with
redis_url: ${REDIS_URL} - Prod queues: RabbitMQ adapter with
andamqp_url: ${AMQP_URL}queue_mode: quorum - Queue config:
withqueue_configs
,max_retries
,concurrency
,type
per queue namebackoff_ms - Env var with fallback:
port: ${III_PORT:49134} - Health check:
curl http://127.0.0.1:3111/health - Ports: 3111 (API), 3112 (streams), 49134 (engine WS), 9464 (Prometheus)
Worker Config Format (v0.11+)
Workers in
iii-config.yaml use name: and optional config::
workers: - name: iii-http config: port: 3111 host: 127.0.0.1 - name: iii-state config: adapter: name: kv config: store_method: file_based file_path: ./data/state_store.db - name: iii-queue config: adapter: name: builtin config: store_method: file_based file_path: ./data/queue_store - name: iii-stream config: port: 3112 host: 127.0.0.1 adapter: name: kv config: store_method: file_based file_path: ./data/stream_store - name: iii-cron config: adapter: name: kv - name: iii-pubsub config: adapter: name: local - name: iii-observability config: enabled: true service_name: my-service exporter: memory sampling_ratio: 1.0 metrics_enabled: true logs_enabled: true
External Worker System
External workers are installed via the CLI and configured in
iii-config.yaml:
— install a worker binary from the registryiii worker add pdfkit@1.0.0
(no name) — install all workers listed iniii worker addiii.toml
— remove binary, manifest entry, and config blockiii worker remove pdfkit
— show installed workers and versions fromiii worker listiii.toml
Workers appear in
iii.toml as a version manifest:
[workers] pdfkit = "1.0.0" image-processor = "2.3.1"
Worker config blocks in
iii-config.yaml use marker comments for automatic management:
workers: # === iii:pdfkit BEGIN === - name: pdfkit config: output_dir: ./output # === iii:pdfkit END ===
At startup, the engine resolves each worker name, finds the binary in
iii_workers/, and spawns it as a child process.
Adapting This Pattern
Use the adaptations below when they apply to the task.
- Start with file_based adapters for development, switch to Redis/RabbitMQ for production
- Define queue configs per workload: high-concurrency for parallel jobs, FIFO for ordered processing
- Use environment variables with defaults for all deployment-sensitive values (URLs, ports, credentials)
- Enable only the workers you need — unused workers can be omitted from the config
- Use
to install external workers and auto-generate their config blocksiii worker add - Set
andmax_retries
based on your failure tolerance and SLA requirementsbackoff_ms - Configure
with your collector endpoint and sampling ratioiii-observability - Use
instead ofhost: 127.0.0.1
to avoid IPv4/IPv6 mismatches on macOShost: localhost
Pattern Boundaries
- For HTTP handler logic (request/response, path params), prefer
.iii-http-endpoints - For queue processing patterns (enqueue, FIFO, concurrency), prefer
.iii-queue-processing - For cron scheduling details (expressions, timezones), prefer
.iii-cron-scheduling - For OpenTelemetry SDK integration (spans, metrics, traces), prefer
.iii-observability - For real-time stream patterns, prefer
.iii-realtime-streams - Stay with
when the primary problem is configuring or deploying the engine itself.iii-engine-config
When to Use
- Use this skill when the task is primarily about
in the iii engine.iii-engine-config - Triggers when the request directly asks for this pattern or an equivalent implementation.
Boundaries
- Never use this skill as a generic fallback for unrelated tasks.
- You must not apply this skill when a more specific iii skill is a better fit.
- Always verify environment and safety constraints before applying examples from this skill.