with one click
iii-pubsub
Fire-and-forget topic pub/sub: broadcast an event with `publish` and every matching `subscribe` trigger receives it. Use for real-time notifications where missed events are acceptable.
Fire-and-forget topic pub/sub: broadcast an event with `publish` and every matching `subscribe` trigger receives it. Use for real-time notifications where missed events are acceptable.
Ephemeral microVM sandboxes for running untrusted or agent-generated code in isolation — a one-call run path, a create/exec/stop lifecycle, and a set of filesystem operations.
Expose registered functions as HTTP endpoints via an `http` trigger, with a preHandler middleware chain for auth, rate limiting, and logging. Reach for it to serve REST without standing up a separate web server.
Connect this engine to another iii engine over a long-lived WebSocket so functions call across the boundary. Wire stable ids with `forward:`/`expose:`; `bridge.invoke` is the ad-hoc escape hatch.
Schedule any registered function on a 6- or 7-field cron expression, with once-only execution across a fleet when backed by the redis adapter. Its whole surface is the `cron` trigger type.
WebSocket-routed worker mesh — the engine's Function/Trigger/Worker model and the iii-sdk surface for authoring them. 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.
OpenTelemetry-backed tracing, structured logs, metrics with rollups, alerts, sampling, and baggage for the engine — emit and query telemetry through `engine::*` functions and react to logs with a `log` trigger.
| name | iii-pubsub |
| description | Fire-and-forget topic pub/sub: broadcast an event with `publish` and every matching `subscribe` trigger receives it. Use for real-time notifications where missed events are acceptable. |
The iii-pubsub worker is topic-based publish/subscribe messaging. Publish an event to a named topic with the publish function and every registered subscribe trigger whose topic matches is invoked with the raw payload — no envelope, no persistence, no retries. It is fire-and-forget broadcast: subscribers receive each event as it arrives, and a subscriber that is offline simply misses it.
The worker exposes one callable function (publish, registered with the bare function id "publish" — no namespace prefix) and one trigger type (subscribe). Two adapters: local (default; in-memory broadcast channels; only delivers to subscribers in this engine process; no external dependency) and redis (redis_url: ${REDIS_URL:redis://localhost:6379}; uses Redis Pub/Sub so events propagate across multiple engine instances).
redis adapter).iii-queue (topic mode, durable:subscriber) when every consumer must process every event.publish returns topic_not_set, and a subscribe trigger registered with an empty topic never fires.iii-state or iii-stream instead — iii-pubsub carries discrete events, not state.publish — broadcast an event to a topic; every subscribe trigger on that exact topic receives the raw data. Empty topic returns topic_not_set.Bind a subscribe trigger when a function should run every time publish broadcasts to a configured topic. The handler receives the raw data value from the publish call directly — no envelope. Multiple triggers can subscribe to the same topic; each gets an independent copy (true fan-out).
Reach for it when:
redis adapter.If subscribers must reliably process every event with retries and dead-letter handling, use iii-queue's durable:subscriber instead — subscribe is fire-and-forget.
iii.registerFunction('notifications::on-order-shipped', handler).iii.registerTrigger({
type: 'subscribe',
function_id: 'notifications::on-order-shipped',
config: {
topic: 'orders.shipped', // required, non-empty. Exact match only — no wildcards.
},
})
The handler receives the published data unchanged, with no topic field; if one handler serves multiple topics, embed the topic inside data at publish time. The handler's return value is ignored and there is no retry.
For the published payload shape, call iii get function info on publish or the handler function id.