Skip to content
Skillpedia
General coding19k · #10497

iii-sdk-reference

What it does

Covers how to install and use the iii SDK in several languages, with notes on each language's quirks. It is for developers writing iii workers who want the language details right the first time.

When to use it

  • ✓When you are starting a worker in a language you have not used with iii before.
  • ✓When you need to set up logging or OpenTelemetry in an iii worker.
  • ✓When you are building a browser app that needs to call iii functions.

Skill link

https://github.com/iii-hq/iii/blob/main/skills/iii-sdk-reference/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/iii-hq/iii/blob/main/skills/iii-sdk-reference/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Show me how to install the iii SDK for Python and register my first function.”

5 new skills a week. 1 minute to read.

How it works

The skill gives the install command for each language, then explains how to start a worker, register functions and call them. It notes caveats for each SDK, such as using the async call inside Python async handlers.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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

# TypeScript / Node.js
npm install iii-sdk

# Browser apps
npm install iii-browser-sdk

# Python
pip install iii-sdk

# Rust
cargo add iii-sdk

# Go
go get github.com/iii-hq/iii/sdk/packages/go/iii

Choose the SDK

SDK Package Best for Important caveat
Node.js iii-sdk Server-side TypeScript/JavaScript workers Supports custom headers, Logger, OpenTelemetry, HTTP-invoked functions
Browser iii-browser-sdk Web apps and interactive UI callbacks Connect through the rbac-proxy worker's public port, never the engine port; keep secrets server-side
Python iii-sdk Sync or async Python workers Use trigger_async inside async handlers
Rust iii-sdk High-performance tokio workers Handler error type should map into iii_sdk::Error
Go github.com/iii-hq/iii/sdk/packages/go/iii Go services Handlers take (ctx, json.RawMessage); pass the handler's ctx to Trigger

Logger/OpenTelemetry, HTTP request/response types, stream, queue, and worker-connection types live in the helpers package, installed alongside the SDK: @iii-dev/helpers (Node, with submodules like /observability and /http) or iii-helpers (Python iii_helpers.*, Rust iii_helpers::*).

Common API Map

Capability Node / browser Python Rust Go
Connect worker registerWorker(url, options?) register_worker(address, options?) register_worker(url, InitOptions) iii.RegisterWorker(url, opts...)
Register local function registerFunction(id, handler, options?) register_function(id, handler, **options) register_function("id", RegisterFunction::new(...)) client.RegisterFunction(id, handler, opts...)
Register trigger (deprecated in 0.25) registerTrigger({ type, function_id, config }) register_trigger({...}) register_trigger(RegisterTriggerInput::new(type, function_id, config)) client.RegisterTrigger(iii.RegisterTriggerInput{Type, FunctionID, Config})
Observe a function observe(source, target, options?) observe(source, target, options) observe(Source::function(id)..., target) / observe_with(.., ObserverOptions) client.Observe(iii.Source{...}, target, opts...)
Owner hooks registerFunction(id, h, { observe: {...} }) register_function(id, h, observe=ObserveHooks(...)) RegisterFunction::new(h).observe(Observe::owner()...) RegisterFunctionOptions{Observe: &iii.ObserveHooks{...}}
Current invocation currentInvocation() current_invocation() iii_sdk::current_invocation() iii.InvocationFromContext(ctx)
Invoke function trigger({ function_id, payload }) trigger(request) / trigger_async(request) trigger(TriggerRequest) client.Trigger(ctx, iii.TriggerRequest{...})
Durable enqueue TriggerAction.Enqueue({ queue }) {"type": "enqueue", "queue": name} TriggerAction::Enqueue { queue } iii.EnqueueAction(queue)
Channels createChannel(iii) (iii-sdk/helpers) create_channel(iii) / create_channel_async(iii) (iii.helpers) iii_sdk::helpers::create_channel(&iii, None).await client.CreateChannel(ctx, nil)

Node.js

import { registerWorker } from "iii-sdk";
import { Logger } from "@iii-dev/helpers/observability";

const iii = registerWorker("ws://localhost:49134", {
  workerName: "node-worker",
  invocationTimeoutMs: 30000,
});

iii.registerFunction("users::lookup", async (input) => {
  new Logger().info("looking up user", { userId: input.userId });
  return { userId: input.userId, name: "Ada" };
});

Node supports custom WebSocket headers, Logger, OpenTelemetry options, HTTP-invoked function registration, trigger metadata, channels, observers, and owner hooks. Custom trigger types (registerTriggerType) still work but are deprecated in 0.25.

Browser

import { registerWorker, TriggerAction } from "iii-browser-sdk";

const iii = registerWorker("wss://api.example.com/worker?token=session-token");

const result = await iii.trigger({
  function_id: "backend::get-user",
  payload: { userId: "123" },
});

await iii.trigger({
  function_id: "analytics::track",
  payload: { event: "page_view" },
  action: TriggerAction.Void(),
});

Do not expose the pri

FAQ

Which languages are covered?

Node.js, browser, Python, Rust and Go.

Can a browser app connect directly to the engine?

No. It connects through the rbac-proxy worker's public port, and secrets stay on the server.

Where are error details covered?

In a separate skill about iii error handling.

Details

Original description by the author

Use when working with iii SDK APIs across Node.js, browser, Python, Rust, or Go: package installation, worker initialization, function/trigger registration, observers, invocation, local dispatch, channels, logging, OpenTelemetry, and language-specific caveats.

repo: iii-hq/iii

Popularity

GitHub stars
19k
Ranking position
#10497
License
—
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills