Skip to main content

Interface: QueryRouterResult

Defined in: packages/agentos/src/orchestration/pipeline/query/types.ts:267

Final result returned by the QueryRouter after classification, retrieval, and answer generation.

This surface is intentionally provenance-oriented: it includes not only the generated answer and citations, but also the tier path actually exercised and the fallback names that were activated during routing.

Properties​

answer​

answer: string

Defined in: packages/agentos/src/orchestration/pipeline/query/types.ts:269

The generated answer text, grounded in retrieved sources.


classification​

classification: ClassificationResult

Defined in: packages/agentos/src/orchestration/pipeline/query/types.ts:272

The classification result that determined routing behaviour.


durationMs​

durationMs: number

Defined in: packages/agentos/src/orchestration/pipeline/query/types.ts:284

Total wall-clock duration of the entire query pipeline in milliseconds.


fallbacksUsed​

fallbacksUsed: string[]

Defined in: packages/agentos/src/orchestration/pipeline/query/types.ts:297

Names of fallback strategies that were activated during this query. Empty array if no fallbacks were needed.

Example​

['keyword-fallback', 'tier-escalation']

grounding?​

optional grounding: VerifiedResponse

Defined in: packages/agentos/src/orchestration/pipeline/query/types.ts:305

Citation verification results produced by the router when verifyCitations is enabled and verification can run.

Hosts may also attach their own grounding metadata to this field.


recommendations?​

optional recommendations: object

Defined in: packages/agentos/src/orchestration/pipeline/query/types.ts:317

Recommended skills, tools, and extensions based on query analysis.

Populated when the plan-aware classifier (classifyWithPlan) produces capability recommendations. When no recommendations are made (or the plan-aware classifier is not used), this field is undefined.

Each recommendation includes a confidence score (0-1) and a human-readable reasoning string explaining why the capability was recommended.

extensions​

extensions: object[]

skills​

skills: object[]

tools​

tools: object[]


researchSynthesis?​

optional researchSynthesis: string

Defined in: packages/agentos/src/orchestration/pipeline/query/types.ts:281

Synthesized narrative from the deep research phase, when tier-3 routing exercised external or host-provided research.


sources​

sources: SourceCitation[]

Defined in: packages/agentos/src/orchestration/pipeline/query/types.ts:275

Citations for the sources used in generating the answer.


tiersUsed​

tiersUsed: QueryTier[]

Defined in: packages/agentos/src/orchestration/pipeline/query/types.ts:290

Which tiers were actually exercised during this query.

Example​

[0] for trivial, [1, 2] for multi-source with fallback