0% read on this device
Browse the curriculum

Start Here

Vision

First Principles

Operating Model

Domain Model

Agent Factory

Runtime Architecture

AI Engineering

Autonomous Workflows

Verification & Delivery

Factory Platform

Quality Engineering

Security & Governance

Case Studies

Labs

Interview Practice

Research Journal

Reference

Curriculum/Runtime Architecture/Complete source chapter
Runtime Architecture6 min readchapterQuick Read

Orchestration Component Model and Runtime Contracts

Define the twelve component families that turn authorized work into bounded, durable, observable execution.

Status: Review readyRisk: criticalLifecycle: plan · execute · verify · learnContent reviewed 2026-08-30Maturity guide →
Claim boundaryThis chapter references implementation evidence. Inspect its evidence boundary before treating a claim as proven.
Quick Read

The chapter in one pass.

~2 min
  • Purpose: Define the twelve component families that turn authorized work into bounded, durable, observable execution.
  • Control rule: The orchestrator advances authoritative workflow state; models and workers propose actions but cannot widen authority or accept their own results.
  • Reliability rule: Every loop has measurable acceptance, budgets, stop conditions, and a recovery path.
  • Deployment: These are responsibilities and interfaces. A small V1 can implement several in one modular application.

1. The problem

A model call is not a runtime. Production orchestration must route intent, freeze context and capability versions, manage durable state, authorize every side effect, withstand duplicates and outages, stop nonconverging work, produce independent evidence, and support human intervention. When these responsibilities are implicit inside an agent loop, failure becomes unreproducible and authority becomes ambiguous.

2. Enduring Principle

Keep durable control outside probabilistic execution

The control plane owns workflows, transitions, policy, budgets, approvals, and reconciliation. Workers receive immutable manifests and return structured observations. The orchestration layer coordinates models, knowledge, tools, memory, policy, reliability, telemetry, and humans without allowing one dependency to become the source of truth for the whole run.

3. Canonical component catalog

FamilyResponsibilityAuthoritative inputOwned outputExplicit non-responsibility
Intent and capability routerClassify request and choose an eligible workflow familyIntent, actor, inventory, risk, catalogRouting decision with confidence and fallbackChanging intent or granting authority
Workflow and agent controllerAdvance durable graph, dispatch, join, pause, cancel, reconcileApproved plan, manifest, eventsWorkflow state and commandsPerforming arbitrary tool effects
Prompt and context compilerAssemble instruction hierarchy and immutable contextTask, policy, source selections, budgetsPrompt/context package with lineageTreating retrieved text as authority
Model gateway and routerSelect approved model profile and mediate inferenceTask profile, policy, availability, costModel response, usage, version, finish stateAccepting task completion
Retrieval coordinatorGenerate, filter, rank, and attribute candidatesRetrieval request and identityCandidate and context-selection recordsAltering source permissions
Tool and function managerValidate, authorize, invoke, deduplicate, reconcileTool call proposal, grant, schemaResult, side-effect receipt, errorBroad workflow planning or approval
Session, state, and memory managerMaintain scoped working state and governed durable memoryEvents, policy, retentionVersioned state snapshots and memory proposalsPromoting observations to authority
Policy and authorization enforcerDecide action eligibility and issue scoped grantsIdentity, subject, action, resource, contextAllow/deny/condition decision and grantBusiness acceptance
Guardrails and validationValidate inputs, outputs, plans, actions, and artifactsExact subject and quality/policy contractFindings, scores, eligibility inputsProducer self-certification
Reliability controllerApply timeout, retry, backoff, circuit break, fallback, compensationError taxonomy, operation contract, stateRecovery command and reconciled resultRetrying unknown side effects blindly
Observability, audit, evidence, and forensicsCorrelate runtime facts and convert eligible proofEvents, traces, artifacts, evaluator resultsTelemetry, audit, proof references, forensic bundleReconstructing authority from logs
Budget, rate, capacity, and concurrency controllerAdmit and constrain resource use fairlyPriority, quota, costs, capacity, deadlineReservation, limit, charge attributionOverriding safety stop conditions for throughput

4. Runtime contract envelope

{
  "contractVersion": "1.0",
  "correlationId": "mission-184",
  "commandId": "cmd-991",
  "idempotencyKey": "attempt-7:tool-4",
  "actor": {"identity": "workload://worker/42", "grant": "grant-83"},
  "subject": {"type": "attempt", "id": "attempt-7", "version": 12},
  "tenant": "tenant-a",
  "classification": "confidential",
  "deadline": "2026-08-30T18:30:00Z",
  "budget": {"toolCalls": 20, "tokens": 90000, "costUsd": 8.0},
  "payload": {},
  "policyDecision": "decision-51",
  "traceContext": "00-...",
  "replyContract": "tool-result@2"
}

Consumers authenticate the sender, validate scope and schema, compare the expected state version, reserve capacity, persist acceptance, and dispatch. They return a durable acknowledgement distinct from completion. Results bind the exact input digest, environment, dependency versions, outputs, costs, errors, side-effect receipt, and unresolved uncertainty.

5. Workflow and attempt state

Only the state owner performs transitions. Events may request or inform a transition but do not mutate the projection directly. Resume revalidates manifest, source versions, policy, grants, leases, capability qualification, budgets, and environment. If any governing input changes materially, create a new attempt or explicit replan rather than pretending continuity.

6. Stop-condition table

ConditionDetectionTerminal or intervention stateRequired evidence
Acceptance satisfiedIndependent quality contract passesVerifying to succeededEligible proof package
Maximum attemptsDurable attempt countFailed or escalateAttempt summaries and last findings
Maximum tool callsGateway counterPause or failedTool-call ledger
Elapsed-time budgetMonotonic deadlineCancel or escalateDeadline and control event
Token or monetary budgetReserved plus actual usagePause before overrunUsage and reservation ledger
No measurable improvementEvaluator delta below threshold for N iterationsStop correction; escalate or accept known gap by policyRun comparison
Repeated equivalent failureNormalized error fingerprintCircuit open and escalateFailure cluster
Human escalation requestedDecision eventAwaiting inputRequest, owner, deadline
Policy denialAuthorization decisionBlocked or quarantinedPolicy version and denial reason
CancellationAuthorized commandCancelled then reconciledCommand and acknowledgements
Dependency unavailableHealth, timeout, circuit stateRetry, fallback, pause, or fail by contractDependency and fallback events
Irrecoverable system failureReconciliation cannot establish safe stateQuarantineState snapshot and incident reference

Safety limits are hard boundaries. A model cannot negotiate extra attempts, authority, or budget. Budget extension is a new human or policy decision.

7. Error and recovery taxonomy

  • Business rejection: Correct the plan or output; do not retry unchanged.
  • Deterministic contract error: Fail fast; fix schema or configuration.
  • Transient infrastructure error: Retry only idempotent work with bounded exponential backoff and jitter.
  • Unknown external result: Reconcile using idempotency key or provider query before any retry.
  • Capacity or rate denial: Queue, shed, or route under policy; preserve fairness and deadlines.
  • Security or policy failure: Fail closed, preserve evidence, and contain.
  • Quality nonconvergence: Stop after measured limit and escalate with the best artifact plus unresolved findings.

Fallbacks are prequalified substitutions, not improvisation. They declare semantic equivalence, changed cost/latency/quality, and any lower autonomy ceiling.

8. Human intervention points

Humans approve material plans, exceptions, authority promotion, destructive or privileged actions, consequential release, disputed evidence, and learning promotion. Operators may pause, cancel, quarantine, reroute to an approved fallback, request evidence, or start reconciliation. The interface displays current state, pending effect, authority, evidence, uncertainty, alternatives, deadline, and recovery implication.

9. Observability and evidence

All families emit correlated spans, structured events, logs, metrics, and cost records using stable internal semantics. Minimum fields include workflow, task, attempt, actor, capability/model/tool/evaluator versions, state before and after, policy decision, environment, duration, usage, result class, and error fingerprint. High-cardinality identifiers belong in traces and events, not unbounded metric labels. Evidence eligibility additionally requires exact subject binding, provenance, independence, freshness, and tamper protection.

10. Performance, capacity, and availability

Define SLOs separately for admission, dispatch, model/tool latency, state commit, control actions, verification, and reconciliation. Reserve capacity for cancellation and containment. Use concurrency keys for repositories, environments, and privileged resources. Backpressure propagates to admission; queues never create invisible promises beyond the declared deadline or budget.

11. Versioning and compatibility

Contracts use explicit versions and a producer/consumer support window. Additive fields require tolerant readers; changed meaning or state semantics require a new major version, dual-read/write migration, replay tests, and rollback. Capability or policy revocation supersedes ordinary compatibility. Retain decoders for evidence and audit records for their full retention period.

12. Tradeoffs, nonclaims, and maturity

A general workflow engine supplies durable execution but not factory-specific authority, evidence, or capability semantics. A custom loop is simple but quickly accumulates hidden state and recovery debt. Start with deterministic graphs and isolated probabilistic steps. This review-ready specification does not prove throughput, failover, state correctness, or cost behavior in an implementation.

13. Interview and hands-on lab

Whiteboard a task that times out after an external mutation. Explain why an immediate retry is unsafe, how reconciliation works, which state owner decides, and what evidence remains. Then complete the Orchestration Failure, Recovery, and Cost Lab.

Evidence boundary

Curriculum maturity is not implementation proof.

This chapter defines architecture or practice. It does not by itself prove a corresponding production implementation.

CurriculumReview readyImplementation evidenceNot asserted hereInspect evidence map →
External review

Review this chapter.

Challenge a claim, boundary, missing failure mode, unclear term, or unsupported evidence statement.

  • Claim
  • Boundary
  • Failure
  • Evidence