iii Worker SDK
Teaches the iii SDK for authoring workers, triggers and functions, checking the registry first.
Install
npx skills add iii-hq/iii --skill iii -g -a claude-code -y- Repository
- iii-hq/iii18.9k
- Category
- Engineering
- Updated
- 3d ago
- License
- See repository
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
How iii works and the iii-sdk surface for authoring workers, triggers, and functions. Teaches the ordered way to gain a capability before writing code, (1) check functions already registered in the engine, (2) search the public registry via iii-directory, (3) build a worker. Single self-contained skill, meant for system-prompt injection; do not re-fetch.
iii
iii is a language-agnostic runtime where services, agents, and tools are composed of the same things: workers, triggers, and functions. One engine process (default port 49134) holds a live registry of every connected worker, every function those workers expose, and every trigger bound to them. Workers are independent OS processes that open a WebSocket to the engine and register Functions (service::name handlers) and Triggers (the events that invoke those Functions). There is no direct worker-to-worker traffic, every call routes through the engine, which makes the language, runtime, and physical location of any worker invisible to its callers.
When to Use
Use this skill to discover live iii capabilities, call functions, author SDK workers, bind trigger types, or operate project workers through Compose.
You extend yourself by writing iii workers. A few lines get you on the bus:
import { registerWorker } from 'iii-sdk'
const iii = registerWorker(process.env.III_ENGINE_URL!, { workerName: 'demo' })
iii.registerFunction('demo::add', async (payload: { a: number; b: number }) => {
return { c: payload.a + payload.b }
})
The instant the handshake completes, demo::add is callable from any worker (and the harness itself) via iii.trigger({ function_id: 'demo::add', payload: { a: 2, b: 3 } }). No restart, no registration with the harness, the engine routes it automatically.
The four primitives
| Primitive | What it is | Owned by |
|---|---|---|
| Engine | One coordinator process. Routes every invocation. | The operator |
| Worker | A process that opens a WebSocket to the engine. | Anyone who writes one |
| Function | A named handler inside a worker, id service::name. Stable across worker restarts. | The registering worker |
| Trigger | A (type, config, function_id) triple. Causes a function to run when an event fires. | A worker (the type-publisher) + a caller (the binding) |
Three consequences worth internalising:
