Selects how functions are invoked: synchronous result-returning calls, fire-and-forget void dispatches, or durable `TriggerAction.Enqueue({ queue })` background jobs. Use whenever a handler should not block the caller, work should run later or reliably with retries, a request should return quickly, or an agent must choose between inline RPC, optional side effects, and queued async processing.
59
67%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./skills/iii-trigger-actions/SKILL.mdComparable to: RPC vs message queue vs fire-and-forget patterns
Use the concepts below when they fit the task. Not every invocation needs all three modes.
TriggerAction.Void()): fire-and-forget dispatch, returns immediately, no retry guaranteesTriggerAction.Enqueue({ queue })): routes through a named queue with automatic retries and backoff, returns a messageReceiptIdThe caller invokes trigger() with an optional action parameter. Synchronous mode waits for the handler result. Void mode dispatches and returns immediately. Enqueue mode places the payload on a named queue where a consumer processes it with retry guarantees.
| Primitive | Purpose |
|---|---|
trigger({ function_id, payload }) | Synchronous invocation, blocks for result |
trigger({ ..., action: TriggerAction.Void() }) | Fire-and-forget, returns immediately |
trigger({ ..., action: TriggerAction.Enqueue({ queue }) }) | Durable async via named queue, returns receipt |
iii trigger --function-id=ID --payload=JSON | CLI trigger (part of the engine binary) |
--timeout-ms | CLI flag to set trigger timeout (default 30s) |
See ../references/trigger-actions.js for the full working example — a comparison of all three
Also available in Python: ../references/trigger-actions.py
Also available in Rust: ../references/trigger-actions.rs invocation modes showing when and how to use sync, void, and enqueue patterns.
Code using this pattern commonly includes, when relevant:
await iii.trigger({ function_id: 'users::get', payload: { id } }) — sync, get result directlyiii.trigger({ function_id: 'analytics::track', payload: event, action: TriggerAction.Void() }) — fire-and-forgetiii.trigger({ function_id: 'orders::process', payload: order, action: TriggerAction.Enqueue({ queue: 'payments' }) }) — durable enqueueundefined in Node/browser, None in Python, and Value::Null in Rust{ messageReceiptId: string } as JSON; Rust may deserialize to EnqueueResult { message_receipt_id }iii trigger --function-id='users::get' --payload='{"id":"123"}' — invoke via CLIiii trigger --function-id='users::get' --payload='{"id":"123"}' --timeout-ms=5000 — with custom timeouttimeoutMs / timeout_ms.iii-error-handling for FORBIDDEN, TIMEOUT, function_not_found, function_not_invokable, invocation_failed, and invocation_stopped.Use the adaptations below when they apply to the task.
iii-engine-config.iii-dead-letter-queues.iii-error-handling.iii-functions-and-triggers.iii-trigger-actions when the primary problem is choosing the right invocation mode.iii-trigger-actions in the iii engine.a7ebbbb
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.