← All Patterns
Classified Orchestration Pattern class diagram
Classified Orchestration Pattern — structural diagram  ·  click to enlarge

Motivation

Teams adopting agentic AI make one of two persistent mistakes: routing every task through an LLM even when a workflow engine or rules engine is the correct tool, or avoiding LLM-based paths entirely and missing the reasoning capability needed for classification, extraction, or evidence correlation.

The Classified Orchestration Pattern resolves this by making the decision explicit and architectural. The Solutions Architect classifies each task at design time — the Orchestrator enforces the selected path at runtime. The boundary is drawn in code, visible on the canvas, and not left for the LLM to decide.

Two Variants

Variant A
Parallel Split
Orchestrator fires both agentic (Squad + LLM) and deterministic (Adapter) paths for the same event, then merges results.
Orchestrator
├─ Squad → Agents → LLM
└─ IntegrationAdapter → system
↓ merge_results()
Variant B
Event-Driven Chain
Orchestrator routes to an adapter path. Messaging Adapter publishes to a topic, triggering a downstream Workflow or Process Flow Adapter — no LLM involved.
Orchestrator
└─ MessagingAdapter
   └─ WorkflowAdapter
      └─ result

Classification Gate

Classification is a design-time decision based on event type, BPMN task type, or payload shape. The gate below shows how signals map to adapter types — or escalate to the agentic path:

SignalPathAdapter type
ServiceTask / REST APIGREENapi_adapter
BusinessRuleTask / policy engineGREENrules_adapter
SendTask / ReceiveTask / Kafka / SQSGREENmessaging_adapter → workflow or process
ScriptTask / workflow engine / DAGGREENworkflow_adapter
BPM process instance (Camunda, Pega)GREENbpm_adapter
Data read / write / SQLGREENdata_adapter
Reasoning, extraction, analysis, ambiguityAGENTICSquad + Agents + LLM

Structure

Key Concepts

BaseIntegrationAdapter IntegrationAdapterFactory PathDecision BaseMessagingAdapter BaseWorkflowAdapter BaseRulesAdapter BaseApiAdapter BaseDataAdapter Classification Gate

Used in K9-AIF

k9_adapters/integration/ IntegrationAdapterFactory K9X Studio canvas topology 7 Integration Adapter ABBs