SDK Reference
Use this skill for language-specific SDK details. Use iii-core-primitives for the common model and
iii-error-handling for exception handling.
Install
Choose the SDK
Logger/OpenTelemetry, HTTP request/response types, stream, queue, and worker-connection types live in
the helpers package — @iii-dev/helpers (Node, with submodules like /observability and /http) or
iii-helpers (Python iii_helpers.*, Rust iii_helpers::*) — installed alongside the SDK.
Common API Map
Node.js
Node supports custom WebSocket headers, Logger, OpenTelemetry options, HTTP-invoked function
registration, trigger metadata, channels, and custom trigger types.
Browser
Do not expose the private engine worker port to untrusted browsers; put the rbac-proxy worker in front of it (iii trigger compose::add worker=rbac-proxy). Browser workers cannot send
custom WebSocket headers and must not hold backend secrets.
Python
Python handlers may be sync or async. Use await iii.trigger_async(request) inside async handlers,
and iii.trigger(request) in sync contexts. HttpResponse (from iii_helpers.http) uses status_code, like the other helpers packages.
Rust
Rust supports typed handlers and schema extraction when input/output types derive
schemars::JsonSchema. Add the otel feature when using OpenTelemetry helpers.
Channels
- Use channels for binary data, large payloads, or streaming transfer between workers.
- Pass
readerReforwriterRefthrough a function payload. - Reconstruct readers/writers from refs in consumers when the SDK requires it.
Namespaces
A worker belongs to one namespace: options.namespace (InitOptions.namespace) → the III_NAMESPACE
environment variable → the engine's default. Compose sets III_NAMESPACE to its daemon's namespace
(iii compose -n dev ...) for every worker it starts, so a whole project lands in one namespace
without any code change. Routing is strict: a function is only reachable in the namespace it
registered in.
iii.trigger({ function_id })resolves in the calling worker's namespace. Calls to your own functions and to other workers declared in the sameworker-compose.yamlneed no namespace.- Engine-owned functions register in
default:engine::*,configuration::*, andstream::*(fromiii-stream).engine::*resolves there implicitly; for the others passnamespace: "default"on the call when your worker runs in a Compose namespace. registerTriggerbinds in the worker's namespace. Leavetrigger_namespaceunset; the engine looks for the trigger type's provider in your namespace first and the engine's own second, which is what lets a project ship its ownhttpprovider or fall back to the engine'scron.- Never prefix a function id with a namespace. The id stays
orders::validate; the namespace is a separate field. - From the CLI,
iii trigger -n dev orders::validate ...selects the namespace; omitting-nresolves indefault.
When to Use
- Use this skill for package names, SDK exports, initialization options, browser security constraints, channel API details, and language-specific syntax.
- Use this when a task asks for Python or Rust examples and the issue is SDK syntax rather than iii architecture.
Boundaries
- For the common Function/Trigger/Worker model, built-in trigger schemas, custom triggers, and
invocation mode decisions, use
iii-core-primitives. - For deployment config, engine-owned workers, RBAC (
rbac-proxy), and ports, useiii-engine-config. - For retryability and exception classes, use
iii-error-handling.


