iii-agentic-backend
by @rohitg00
Creates and orchestrates multi-agent pipelines on the iii engine. Use when building AI agent collaboration, agent orchestration, research/review/synthesis ch...
clawhub install iii-agentic-backendπ About This Skill
name: iii-agentic-backend description: >- Creates and orchestrates multi-agent pipelines on the iii engine. Use when building AI agent collaboration, agent orchestration, research/review/synthesis chains, or any system where specialized agents hand off work through queues and shared state.
Agentic Backend
Comparable to: LangGraph, CrewAI, AutoGen, Letta
Key Concepts
Use the concepts below when they fit the task. Not every agentic workflow needs all of them.
Architecture
HTTP request
β Enqueue(agent-tasks) β Agent 1 (researcher) β writes state
β Enqueue(agent-tasks) β Agent 2 (critic) β reads/updates state
β explicit approval check (is-approved?)
β Enqueue(agent-tasks) β Agent 3 (synthesizer) β final state update
β publish(research.complete)
iii Primitives Used
| Primitive | Purpose |
| ---------------------------------------------------------------------------- | -------------------------------------------- |
| registerWorker | Initialize the worker and connect to iii |
| registerFunction | Define each agent |
| trigger state::set, state::get, state::update | Shared context between agents |
| trigger({ ..., action: TriggerAction.Enqueue({ queue }) }) | Async handoff between agents via named queue |
| trigger({ function_id, payload }) | Explicit condition check before enqueuing |
| trigger({ function_id: 'publish', payload, action: TriggerAction.Void() }) | Broadcast completion to any listeners |
| registerTrigger({ type: 'http' }) | Entry point |
Reference Implementation
See ../references/agentic-backend.js for the full working example β a multi-agent research pipeline where a researcher gathers findings, a critic reviews them, and a synthesizer produces a final report.
Common Patterns
Code using this pattern commonly includes, when relevant:
registerWorker(url, { workerName }) β worker initializationtrigger({ function_id, payload, action: TriggerAction.Enqueue({ queue }) }) β async handoff between agentsstate::set, state::get, state::update β shared context between agentsawait iii.trigger({ function_id: 'condition-fn', payload }) before enqueuing next agenttrigger({ function_id: 'publish', payload: { topic, data }, action: TriggerAction.Void() }) β completion broadcastregisterFunction with agents:: prefix IDsconst logger = new Logger() β structured logging per agentAdapting This Pattern
Use the adaptations below when they apply to the task.
TriggerAction.Enqueue({ queue })iii-config.yaml under queue_configsresearch-tasks, support-tickets)functionId segments should reflect your agent hierarchy (e.g. agents::researcher, agents::critic)Engine Configuration
Named queues for agent handoffs are declared in iii-config.yaml under queue_configs. See ../references/iii-config.yaml for the full annotated config reference.
Pattern Boundaries
registerFunction (including prompts asking for { path, id } endpoint maps + loops), prefer iii-http-invoked-functions.iii-agentic-backend when the primary problem is multi-agent orchestration, queue handoffs, approval gates, and shared context.When to Use
iii-agentic-backend in the iii engine.