HS

Himanshu Sharma

Lead Platform Engineer

← All blogs

AI Agents • Orchestration • Conductor

Durable Orchestration for AI Agents on Conductor

Conductor is an event-driven engine for applications and AI agents. The trick is mapping a model’s plan onto tasks the platform already knows how to retry, compensate, and audit—the same primitives we use for iPaaS sagas.

Map agent concepts to workflow tasks

Agent conceptConductor primitiveNotes
Plan / decomposeLLM_PLAN workerPure function: JSON plan out, no side effects
Tool callDomain task (CRM, SMS…)Idempotent, compensated
Ask a humanWAIT / human taskSLA timeout → escalate
Reflect / criticDecision taskMay loop with max iterations
StopTerminal statusMust be idempotent (PR #766)

A typical agent run

Intent API / bot Retrieve graph + memory Plan LLM worker Tools iPaaS adapters HITL? Done Loop: critic scores result → replan or compensate maxIterations on workflow · poison after N · never unbounded LLM while Each tool task writes CDC so graph + audit stay consistent
Agent run progress Critic replan loop
The LLM only appears in Plan/Critic boxes. Tools are ordinary Conductor tasks.

Each step emits OpenTelemetry spans tagged with workflowId, taskDomain, and token cost so finance and SRE share one dashboard.

Cap loops. An agent that can replan forever is a cost and safety incident. Encode maxIterations, token budgets, and a terminal FAILED_BUDGET status.

Task domains for specialist agents

Route planner, crm-tools, comms-tools, and graph-writer as separate Conductor task domains. That reuses worker isolation, throttles, and the summary-index filter from PR #492. A noisy retrieval worker cannot starve SMS delivery.

Conductor queues partitioned by task domain planner GPU / LLM pool crm-tools Java workers comms-tools Node workers graph-writer KG mutations
Queue per domain Isolated worker pools
Same isolation story as omnichannel lanes: domains, not one shared worker farm.

Failure, duplicate signals, HITL

Agent runs get terminated from UI, budgets, and parent workflows. Duplicate terminate notifications spam operators and confuse downstream agents. The duplicate-termination guard is not a nicety for agent platforms—it is correctness.

  1. Tool failure → compensate that step, critic decides replan vs abort.
  2. Human timeout → escalate domain, do not silently succeed.
  3. Already TERMINATED → no-op, no second webhook to the product.