Request Orchestration Layer

Purpose

The request orchestration layer is the shared control layer for a company-wide agent system.

It extends the intention recognition layer (CH01) into a broader runtime: the front half — request conditioning, interpretation, ambiguity evaluation, clarify-or-route — is inherited unchanged; this chapter owns the back half, where requests are routed to domains, matched to capabilities, executed under governance, validated, and handed off when automation cannot converge.

In this design, RAG is one capability among several, not the default execution path.

Mental Model

Three constructs explain everything in this chapter:

1. FLOW       the request lifecycle:
              inherited CH01 front half
              -> two-level tool resolution (domain, then capability)
              -> schema loading -> governed execution
              -> validation -> fallback / handoff
2. REGISTRY   capabilities as governed products with owners, contracts,
              tool bundles, and lifecycle metadata - looked up, never hardcoded
3. BOUNDARIES five boundaries around the flow:
              cross-domain policy, security/governance (model proposes,
              harness decides), escalation budgets, latency UX, and the
              human handoff contract

And when the runtime itself must be designed in detail, its three aspects map one-to-one onto the subchapters:

AspectQuestionSubchapter
Statewhat exists now?CH02_01_Runtime-Objects.md
Transitionwhat can happen next?CH02_02_State-Machine-and-Control-Loop.md
Policywhat should be allowed next?CH02_03_Confidence-Safety-and-Validation.md

State, Transition, Policy is also the smallest split that keeps the runtime readable: merging them makes the runtime dense, splitting them further fragments the design.

Why A Shared Runtime Exists

If the company wants a system of agents rather than one isolated feature, the core problem is not question answering — it is governed request execution at scale.

Without a shared orchestration layer, each agent tends to implement its own:

  • request normalization
  • routing logic
  • tool selection
  • confidence policy
  • clarification behavior
  • fallback rules
  • permission checks
  • handoff format

That creates duplicated logic, inconsistent behavior, and weak governance. The request orchestration layer standardizes those behaviors once, across agents.

From Intention Layer To Orchestration

The intention recognition layer remains valid; it becomes the front half of this runtime.

Previous shape:

User request
-> Intention recognition
-> RAG

Extended shape:

User request
-> Request understanding        (front half, inherited from CH01)
-> Domain and task framing      \
-> Capability selection          |
-> Adaptive schema loading       |  back half,
-> Governed execution            |  this chapter
-> Validation and escalation    /

What stays the same from CH01: deterministic normalization, lightweight model interpretation, confidence-aware routing, clarification-first disambiguation, escalation budgets, graceful handoff.

What extends: execution routes through domain-scoped subsystems, tool schemas load adaptively by capability, and execution is governed by the harness rather than delegated to the model.

Design principle:

Centralize orchestration patterns; decentralize domain knowledge and capability bundles.

The Flow

The steps below trace a request end to end. Steps 1–4 (input capture, deterministic conditioning, intent framing, ambiguity evaluation) and the clarification gate are inherited from CH01_Intention-Recognition-Layer.md unchanged; they appear in the table below only so the sequence stays readable in one place.

Tool Resolution: Domain, Then Capability

Steps 5 and 7 are one decision made at two levels of granularity — finding the right tool means first finding the right neighborhood, then the right instrument inside it:

Level 1  DOMAIN      which bounded context owns the answer
                     signals: candidate domains, scope policy, permissions
                     failure mode: domain ambiguity -> routing clarification

Level 2  CAPABILITY  which execution family solves it inside that domain
                     signals: task type, risk, latency/cost target, registry
                     failure mode: capability mismatch -> switch / fallback

Then  SCHEMA SURFACE smallest tool bundle for the resolved
                     (domain, capability) pair

Domain is not an independent design axis; it exists because tool selection needs a cheaper first cut. Splitting by business functionality — HR, customer support, sales, finance, legal — shrinks the search space, simplifies the prompts and tool bundles that could apply, and reduces cross-domain ambiguity before any capability choice is made. Ownership, permission scoping, and domain-scoped capability products follow from that split and are defined in the Capability Registry section below.

Why two levels instead of one: the two resolutions are asymmetric in cost, and that asymmetry is the reason they stay separate. A wrong domain invalidates every downstream capability choice, while a wrong capability can still be corrected by switch or fallback. Because each level can fail on its own, the clarification gate sits between them in the table — each resolution has its own budget and its own clarification question.

The funnel is also what keeps the schema surface small: only after both resolutions does step 8 load schemas.

StepMain purposeKey decisions or rulesOwned by
1. Input capturepreserve original wording and contextalways preserve untouched user input for traceability and handoffCH01 front half
2. Deterministic conditioningcheap, auditable cleanup before model reasoningtransforms low-risk and traceableCH01 front half
3. Intent and task framingframe task type, candidate domains, target guess, requested fieldsmodel shapes the request, never silently replaces user intentCH01 front half
4. Ambiguity evaluationdecide whether it is safe to proceedprefer strong deterministic signals; clarify on material conflict between rule and model outputsCH01 front half
5. Domain routingtool resolution level 1: choose the domain-scoped subsystemif domain confidence is low, ask a short routing clarification before loading domain toolsthis chapter
6. Clarification gateresolve material ambiguity before capability executionshort specific questions; bounded retries; clarification over confident garbage outputCH01 policy
7. Capability selectiontool resolution level 2: choose the best execution family in the selected domaincandidate families: resolution, structured lookup, unstructured retrieval, reasoning, action, escalationthis chapter
8. Adaptive schema loadingexpose only the relevant tool surfacesmallest relevant schema surface; early reasoning stages stay schema-lightthis chapter
8A. Execution graph planninglet the model propose a tool graph while the harness keeps controlmodel may describe the graph; harness owns scheduling, permissions, dependency enforcement, partial-result policythis chapter
9. Governed executionexecute only after identity, permission, and policy checksthe model suggests, the harness decides, the executor acts; read tools are governed exactly like write toolsthis chapter
10. Validationverify the result satisfies user need and quality policyrelevance, completeness, grounding, consistency, confidence sufficiency, policy compliancethis chapter
11. Fallback and escalationrecover gracefully when the chosen path fails or stays weakevery recovery path spends an escalation budget: clarification retry, stronger model, alternate capability, human handoffboth halves
12. Logging and handoffproduce durable traces and escalation artifactslogs support audit, replay, monitoring, attribution, postmortemsthis chapter

Step 12’s logging is structured, not free-form: every step emits typed fields, and the authoritative schema is the set of runtime objects in CH02_01_Runtime-Objects.md — request envelope, interpretation record, routing decision, execution record, final outcome, and handoff packet. Later chapters reference those objects rather than redefining field lists.

The Capability Registry

Capabilities are governed products, not ad hoc tool collections.

Some are global — clarification generation, human handoff building, generic reasoning utilities. Some are domain-scoped — HR policy lookup, customer case retrieval, finance workflow actions, legal document retrieval.

Every capability declares nine contract elements — purpose, usage boundary (use_when / avoid_when), input contract, tool schema bundle, output contract, confidence and validation signals, fallback paths, owner, and domain scope. The concrete catalog-entry schema is defined in CH02_01_Runtime-Objects.md.

Capability Families

Capability familyPurposeTypical tools
Resolutionresolve entities, aliases, shorthand, canonical namingalias matcher, typo recovery, canonical entity resolver
Structured lookupanswer exact questions from structured data sourcesmetadata search, SQL or service query, record lookup APIs
Unstructured retrievalanswer questions requiring document evidencesummary retrieval, vector search, keyword retrieval, rerank, raw chunk fetch
Reasoningdecomposition, comparison, synthesis, higher-cost interpretationflash model, pro model, planner or synthesizer
Action and workflow executionperform external actions or guided business operationsAPI clients, workflow runners, ticketing or case-management actions
Escalationclarifying questions or human handoffclarification generator, handoff packet builder, human-agent routing connector

RAG belongs in the Unstructured retrieval family.

Registry Rules

  • the orchestration layer looks up capability definitions from a registry; it never hardcodes domain tool logic
  • each domain team owns and updates its own subsystem tools and schemas
  • every tool and capability records an explicit owner in the registry or schema metadata
  • version and rollout metadata are recorded so regressions trace to specific changes
  • the concrete catalog-entry schema lives with the runtime objects in CH02_01_Runtime-Objects.md

This owner metadata is what later powers operational attribution (see Measurement And Operations).

Hard Boundaries

Five boundaries apply to every path through the flow. They exist so that safety and cost do not depend on prompt compliance.

Governance Boundary

Security and permission enforcement belong to the harness and company policy systems, never to prompts alone:

  • the model may propose a tool call
  • the harness decides whether the call is allowed

Read access is governed exactly like write access: the model never directly reads protected content or acts outside the harness. This keeps permissions, risk rules, approvals, and content exposure controls in code and company systems.

Tools are simple executors. Tools do not call each other; only the orchestration layer plans and sequences tool calls — including all cross-domain calls.

Cross-Domain Policy

Cross-domain requests are allowed when the query genuinely requires them.

Default policy:

  1. single-domain by default
  2. clarify if domain scope is ambiguous
  3. allow multi-domain execution only for explicitly supported workflows

Additional rules:

  • permission is checked by the harness for each call
  • multi-domain execution may be sequential or parallel when dependencies allow
  • if a prerequisite call fails, dependent calls must not run
  • if one call fails, return the successful scoped information and clearly label the missing part
  • if sources conflict, do not infer a conclusion; present the conflict and recommend human confirmation
  • if ambiguity remains material, clarify rather than infer

Response style for partial success:

We could retrieve the general policy information, but we could not verify your identity at this time.
General information:
...
For account-specific conclusions, please try again later or contact a human agent.

Response style for conflicting sources:

We found conflicting information:
- Source A says ...
- Source B says ...
We cannot provide a reliable conclusion from the available data.
Please confirm with the related human agent.

Escalation Budgets

Everything that loops spends a finite budget from the same policy family introduced in CH01. The full budget model — which branches are capped, how attempt counters are tracked, and what fallback remains legal after a cap — is defined in CH02_02_State-Machine-and-Control-Loop.md.

The boundary itself: budget state is visible to routing at all times; an exhausted budget forces handoff_human instead of another guess. This is what makes the layered fallback path predictable instead of emergent.

Latency UX

Because execution is modular, the layer knows which path a request is taking before it finishes — so the product can set correct expectations per class of work.

Suggested latency tiers:

TierTypical PathUser-Facing Behavior
Fastdeterministic lookup, single API readimmediate or minimal loading state
Standardnormal retrieval, light clarification, bounded tool chainshort wait hint
Carefulmulti-step reasoning, conflict resolution, higher-risk checksprogress steps or staged status
Escalationunresolved ambiguity or blocked executionexplicit human handoff or retry guidance

Latency-related preferences are configurable per task, capability, or tool:

  • max retrieved chunks, max rerank candidates
  • max tool calls, max model escalations
  • queue-allowed or not, partial-response preferred or not
  • max wall-clock budget

For example: internal tools may accept queue-based throughput over immediacy; customer-support flows may prefer shorter first responses even when partial; retrieval-heavy capabilities may cap chunk counts differently by latency preference.

Modular orchestration makes latency visible and predictable: because the system knows which path it is taking, it can provide appropriate progress cues and expected wait times for each class of work.

Human Handoff Contract

When escalation fires, the handoff carries the packet shape defined in CH01 (conversation context, system summary, candidates, evidence, attempt history, suggested next step), extended with orchestration state — original request, framed interpretation, attempted capabilities and outcomes, budget states, and recommended next action. The concrete packet schema, including required fields, is defined in CH02_01_Runtime-Objects.md’s human handoff packet object.

Resolved human cases are recorded and fed back: recurring corrections become alias updates, routing-rule adjustments, prompt fixes, and escalation-policy tuning.

Measurement And Operations

This section is the third layer of CH04’s testing-and-evaluation model: CH04 defines the offline evaluation and production regression layers, and this section supplies the operational monitoring layer that CH04_Testing-and-Evaluation.md defers to. What is measured before launch — golden sets, test classes, acceptance thresholds — is defined there. This section covers what happens after launch: live monitoring, ownership attribution, and the nightly review loop that turns runtime telemetry into owner-routed follow-ups.

Online Monitoring

Useful online measures:

  • percentage of flash-model paths versus pro-model escalations
  • percentage of human handoffs
  • user satisfaction signals; repeated user retries as a negative signal
  • failure or rejection rates
  • latency and cost trends over time

Monitoring runs both scheduled and operationally: nightly summaries review aggregate drift, while engineers inspect significant anomalies and intervene as needed.

Ownership And Nightly Review

Because the system is split by domain, capability, tool schema, and owner, failures attribute precisely:

  • which tool is slow or failing
  • which capability is degrading
  • which domain subsystem is unstable
  • which team should investigate

A nightly job summarizes the day’s activity:

LevelExample Metrics
Toollatency distribution, failure rate, timeout rate, bad schema rate
Capabilitysuccess rate, fallback rate, retry rate
Domainvolume, latency, handoff rate, top failure patterns
Orchestrationwrong-route signals, clarification rate, escalation rate

Outputs go to issue queues routed by owner: latency trends, failed cases, timeout clusters, schema mismatch patterns, escalation spikes.

Failures are classified, not pooled:

  • orchestration issue
  • schema issue
  • tool or backend issue
  • permission or policy issue
  • dependency outage
  • user ambiguity cluster

Classification matters because it sends issues to the real source of degradation instead of to one catch-all group.

Deferred And Out Of Scope

General long-term agent memory is intentionally deferred. Current scope treats most requests as one-time interactions, with optional resume of a previous unresolved session via retrieval-plus-summary for the next agent or human.

Not yet decided — but will become necessary as session resume becomes common:

  • what session context persists
  • whether inferred facts may persist across unrelated sessions (and how user corrections override them)
  • what may be stored durably at all

Without these boundaries, later orchestration behavior becomes inconsistent or unsafe, so memory stays out until the boundaries are designed.

Remaining Open Design Questions

The architecture is now largely defined; remaining work is operational detail rather than top-level structure.

1. Confidence Calibration

Confidence-aware routing depends on turning signal patterns into decisions. Candidate inputs: deterministic match strength, model confidence, retrieval agreement, ambiguity signals, execution-outcome signals.

The open question is the exact runtime decision policy mapping these signals to proceed, clarify, retry, escalate, or reject-tool-execution. CH02_03_Confidence-Safety-and-Validation.md owns the structural side; calibration against labeled data is still pending.

2. Testing Strategy

Beyond prompt or answer-quality evaluation, the orchestration layer needs:

  • routing test cases
  • ambiguity and clarification tests
  • policy enforcement tests
  • capability output-contract tests
  • schema-loading regression tests
  • high-risk action confirmation tests
  • dependency-graph execution tests

covering both offline validation and production regression protection. See CH04_Testing-and-Evaluation.md.

3. Operational Alert Thresholds

Online monitoring and nightly review exist, but intervention thresholds are still unspecified: how much latency drift warrants investigation, when timeout-rate changes become urgent, when escalation spikes indicate a system issue, when schema-mismatch frequency indicates a bad rollout.

Without thresholds, monitoring exists but responses remain inconsistent.