Skip to main content

Documentation Index

Fetch the complete documentation index at: https://iii.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

Workers are the units that add capability to a iii system.

Worker types

TypeExamplesDescription
Built-in workersiii-http, iii-queue, iii-state, iii-stream, iii-cron, iii-observabilityRust workers shipped with the engine and enabled in config.yaml.
External workersNode.js, Python, Rust, browser workersSDK processes that connect to the engine and register application functions.
Managed workersLocal directories or OCI images added with iii worker addWorkers started and supervised by the iii worker manager.

Configuration

Built-in and managed workers are configured under the workers key:
workers:
  - name: iii-http
    config:
      port: 3111

  - name: iii-queue
External SDK workers usually configure only their engine address:
const iii = registerWorker(process.env.III_URL ?? 'ws://localhost:49134')
Older docs and configs may use “module” for built-in workers. In current iii, “worker” is the canonical term.
Workers are the interface between the Engine and the rest of the application. They are responsible for establishing connections to services, implementing trigger types, and supplying application Context. Every capability in iii (HTTP endpoints, cron scheduling, state management, queues, streams, observability) is implemented as a Worker. This modular architecture means the Engine itself stays small and focused on orchestration, while Workers handle all external concerns.

Built-in Workers

WorkerProvidesConfig key
HTTPHTTP trigger type, request/response handlingrest_api
QueueAsync message processing with retriesqueue
CronScheduled task executioncron
StateKey-value state storage with atomic updatesstate
StreamReal-time data streams with WebSocket pushstream
PubSubPublish/subscribe messagingpubsub
ObservabilityStructured logging, tracing, and metricsobservability
ExecShell command executionexec
BridgeWebSocket bridge for SDK connectionsbridge

How Workers Work

A Worker has two responsibilities:
  1. Register trigger types: A Worker can introduce new ways to invoke Functions. For example, the HTTP worker registers the http trigger type, and the Cron worker registers the cron trigger type.
  2. Supply Context: A Worker can add capabilities to the Context object that gets passed to every Function. For example, the State worker adds state::get, state::set, and other state operations.
Workers are configured in config.yaml (the engine default). Use -c iii-config.yaml to specify a custom path:
workers:
  - name: iii-http
    config:
      port: 3111
      host: 0.0.0.0
  - name: iii-state
    config:
      adapter:
        name: kv
        config:
          store_method: in_memory
  - name: iii-queue
    config:
      adapter:
        name: builtin
        config:
          store_method: in_memory
You can build your own Workers to integrate any service or infrastructure. See Custom Workers for a detailed guide.