Worker setup
Every iii worker starts by initialising the SDK and connecting to the engine.- Node / TypeScript
- Python
- Rust
Step 1 — HTTP handler
Registers a function and binds it to an HTTP trigger. Returns immediately after publishing to the queue.- Node / TypeScript
- Python
- Rust
Step 2 — Queue handler
Consumes the event, builds the greeting, and persists it to state.- Node / TypeScript
- Python
- Rust
Connect and run
The Node SDK establishes the WebSocket connection when you call
registerWorker(). There is no separate connect() method. Keep the process alive so the worker stays registered.- Node / TypeScript
- Python
- Rust
Test it
Key concepts
iii.registerFunctionpairs a string ID with an async handler. The ID is referenced by all triggers bound to that function.iii.registerTriggerbinds a trigger type + config to a function ID. A function can have multiple triggers.iii.trigger({ function_id, payload, action: TriggerAction.Enqueue({ queue }) })enqueues work to a named queue. The target function receives the payload as its input.iii.trigger({ function_id: 'state::set', payload: { scope, key, value }, action: TriggerAction.Void() })persists data to the engine’s key-value store.