# Iii Core Primitives

Use when registering iii functions, binding triggers, observing functions, selecting...

- Repository: https://github.com/iii-hq/iii (18876 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add iii-hq/iii --skill iii-core-primitives -g -a claude-code -y`
Codex: `npx skills add iii-hq/iii --skill iii-core-primitives -g -a codex -y`
Cursor: `npx skills add iii-hq/iii --skill iii-core-primitives -g -a cursor -y`
Gemini CLI: `npx skills add iii-hq/iii --skill iii-core-primitives -g -a gemini-cli -y`

## Description

Use when registering iii functions, binding triggers, observing functions, selecting sync/void/enqueue invocation, creating workers, inspecting the live worker registry, installing registry workers, authoring event sources, moving channel data, or adapting external HTTP functions across TypeScript, Python, and Rust.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Core Primitives

iii has three top-level primitives:

- **Function**: a named unit of work such as `orders::validate`
- **Trigger**: an event source bound to a function
- **Worker**: a process that connects to the engine and executes functions

Since 0.25 every function is also **observable**: `iii.observe(source, target)` invokes `target`
on each invocation of `source` that passes its filters. Observers replace trigger bindings over
time; the built-in providers (`http`, `cron`, queue, `state`, `stream`, pub/sub, database) still
use trigger types in 0.25, so keep `registerTrigger` for them. See `iii-observe`.

Use `::` in function IDs, leading slashes in HTTP `api_path`, and `expression` for cron config.

## Function Registration

Register local handlers when you control the implementation. Register HTTP-invoked functions when
iii should call an existing external endpoint.

| Shape | Use for |
| --- | --- |
| `registerFunction(id, handler, options?)` | Local worker code |
| `registerFunction(id, HttpInvocationConfig, options?)` | Existing HTTP services |
| `registerTrigger({ type, function_id, config, metadata? })` | Binding a built-in event source (deprecated in 0.25, still required for providers that have not migrated) |
| `observe({ function_id, args?, filters? }, target, options?)` | Running `target` after another function's invocations, or on an engine event (`iii-observe`) |
| `trigger({ function_id, payload, action?, timeout? })` | Calling any function by ID |

Functions and triggers can carry metadata for ownership, discovery, and generated skills. Do not put
secrets in metadata.

## Workers and Registry

A worker is any process that connects to the engine and registers functions or trigger types. There
are two common paths:

The rest: https://github.com/iii-hq/iii/blob/HEAD/skills/iii-core-primitives/SKILL.md
