Request Orchestration Layer
Categories:
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:
| Aspect | Question | Subchapter |
|---|---|---|
| State | what exists now? | CH02_01_Runtime-Objects.md |
| Transition | what can happen next? | CH02_02_State-Machine-and-Control-Loop.md |
| Policy | what 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.
| Step | Main purpose | Key decisions or rules | Owned by |
|---|---|---|---|
| 1. Input capture | preserve original wording and context | always preserve untouched user input for traceability and handoff | CH01 front half |
| 2. Deterministic conditioning | cheap, auditable cleanup before model reasoning | transforms low-risk and traceable | CH01 front half |
| 3. Intent and task framing | frame task type, candidate domains, target guess, requested fields | model shapes the request, never silently replaces user intent | CH01 front half |
| 4. Ambiguity evaluation | decide whether it is safe to proceed | prefer strong deterministic signals; clarify on material conflict between rule and model outputs | CH01 front half |
| 5. Domain routing | tool resolution level 1: choose the domain-scoped subsystem | if domain confidence is low, ask a short routing clarification before loading domain tools | this chapter |
| 6. Clarification gate | resolve material ambiguity before capability execution | short specific questions; bounded retries; clarification over confident garbage output | CH01 policy |
| 7. Capability selection | tool resolution level 2: choose the best execution family in the selected domain | candidate families: resolution, structured lookup, unstructured retrieval, reasoning, action, escalation | this chapter |
| 8. Adaptive schema loading | expose only the relevant tool surface | smallest relevant schema surface; early reasoning stages stay schema-light | this chapter |
| 8A. Execution graph planning | let the model propose a tool graph while the harness keeps control | model may describe the graph; harness owns scheduling, permissions, dependency enforcement, partial-result policy | this chapter |
| 9. Governed execution | execute only after identity, permission, and policy checks | the model suggests, the harness decides, the executor acts; read tools are governed exactly like write tools | this chapter |
| 10. Validation | verify the result satisfies user need and quality policy | relevance, completeness, grounding, consistency, confidence sufficiency, policy compliance | this chapter |
| 11. Fallback and escalation | recover gracefully when the chosen path fails or stays weak | every recovery path spends an escalation budget: clarification retry, stronger model, alternate capability, human handoff | both halves |
| 12. Logging and handoff | produce durable traces and escalation artifacts | logs support audit, replay, monitoring, attribution, postmortems | this 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 family | Purpose | Typical tools |
|---|---|---|
| Resolution | resolve entities, aliases, shorthand, canonical naming | alias matcher, typo recovery, canonical entity resolver |
| Structured lookup | answer exact questions from structured data sources | metadata search, SQL or service query, record lookup APIs |
| Unstructured retrieval | answer questions requiring document evidence | summary retrieval, vector search, keyword retrieval, rerank, raw chunk fetch |
| Reasoning | decomposition, comparison, synthesis, higher-cost interpretation | flash model, pro model, planner or synthesizer |
| Action and workflow execution | perform external actions or guided business operations | API clients, workflow runners, ticketing or case-management actions |
| Escalation | clarifying questions or human handoff | clarification 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:
- single-domain by default
- clarify if domain scope is ambiguous
- 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:
| Tier | Typical Path | User-Facing Behavior |
|---|---|---|
| Fast | deterministic lookup, single API read | immediate or minimal loading state |
| Standard | normal retrieval, light clarification, bounded tool chain | short wait hint |
| Careful | multi-step reasoning, conflict resolution, higher-risk checks | progress steps or staged status |
| Escalation | unresolved ambiguity or blocked execution | explicit 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:
| Level | Example Metrics |
|---|---|
| Tool | latency distribution, failure rate, timeout rate, bad schema rate |
| Capability | success rate, fallback rate, retry rate |
| Domain | volume, latency, handoff rate, top failure patterns |
| Orchestration | wrong-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.