Skip to content
Press / to search

ContextOS Metrics Glossary

Unified metric glossary across the five planes — Intelligence, Context, Decision, Action, Trust.

Reference DesignLast reviewed: Edit on GitHub
At a glance

This page is the stable metrics contract for ContextOS. It defines the names, dimensions, source artifacts, owners, and minimum scorecard that every implementation should keep consistent across the five planes.

This is a documented instrumentation protocol, not a claim that this repository emits production metrics. Teams can add local signals, but release gates, incidents, and executive scorecards should declare formulas, source artifacts and evidence scope consistently.

Naming Conventions

Metric names use one namespace and one shape:

contextos.<plane>.<component>.<signal>

Cross-cutting run and aggregate accounting signals use the existing contextos.run.* and contextos.budget.* namespaces. A metric owner is responsible for trustworthy measurement; naming does not authenticate an observation.

Examples:

MetricMeaning
contextos.decision.gateway.request_duration_msAI Gateway request latency.
contextos.context.pack.evidence_coverage_rateShare of required evidence represented in the compiled Context Pack.
contextos.decision.plan.validity_rateShare of generated plans passing structural validation.
contextos.action.tool.success_rateShare of attempted calls with validated required outputs and verified required effects/postconditions; a transport/tool status alone is insufficient.
contextos.trust.trace.completeness_rateShare of runs with the required trace and audit artifacts.

Rules:

  • Use lowercase snake case for components and signals.
  • Use _duration_ms for latency and wall-clock duration.
  • Use _rate for fractions, _count for event counts, _total for monotonic counters, and _cost_usd or _cost_inr for cost.
  • Record latency as distributions with at least p50, p95, and p99 rollups.
  • Keep model names, provider names, tool IDs, and policy IDs in dimensions, not in metric names.
  • Do not encode raw user text, prompts, document titles, or error messages in metric names or labels.

Required Dimensions

Every metric must be joinable to the run trace. High-cardinality IDs such as run_id and trace_id belong on spans, events, exemplars, and rollup records; only attach them as time-series labels when the backend is designed for that cardinality.

DimensionRequired onPurpose
tenant_idspan, event, rollupTenant-level slicing and data isolation.
environmentspan, event, metricdev, staging, prod, or equivalent.
release_versionspan, event, metricRuntime or service release attribution.
planespan, event, metricOne of intelligence, context, decision, action, trust.
componentspan, event, metricGateway, compiler, planner, tool manager, evaluator, or observability component.
component_versionspan, event, rollupLocalizes regressions to a deployed component version.
workflow_idspan, event, rollupWorkflow or journey-level rollup.
intent_idspan, event, rollupIntent-level quality, safety, and cost comparison.
task_typespan, event, rollupStable task taxonomy used by scorecards.
risk_classspan, event, rollupV1 compatibility and historical safety tier; do not use as the only native risk dimension.
run_idspan, event, exemplarJoins artifacts for a single run.
trace_idspan, event, exemplarJoins telemetry with the trace bundle.

Use the following dimensions when they apply:

DimensionApplies to
model_profile_id, provider, routing_policy_idAI Gateway and LLM Router calls.
pack_version, context_pack_id, evidence_source_typeContext Pack compilation and evidence metrics.
memory_tier, knowledge_snapshot_idMemory and knowledge-substrate metrics.
tool_id, adapter_id, native action_effect, action_authority, action_reversibility, action_interaction, action_data_scope, and v1 approval_mode_declared / approval_mode_effectiveTool Manager and adapter calls.
policy_profile, policy_decision_idPolicy and approval metrics.
evaluator_id, golden_set_id, replay_dataset_idEvaluation and Observability metrics.
channel, locale, user_cohortUser-facing adoption and UX metrics.
exact profile/control refs, contract_id, operation ID and ownership generationAdmission, authority, effects and recovery observations; keep high-cardinality identifiers on events/artifacts rather than unbounded time-series labels.

Minimum Scorecard

Every production scorecard should expose these metrics by tenant_id, intent_id, release_version, and pack_version, plus applicable native risk dimensions. Keep risk_class for v1 and historical comparisons.

MetricDefinitionOwnerDirection
contextos.decision.task.verified_success_rateTasks that pass the configured verifier divided by tasks started.Decision planeUp
contextos.decision.task.safe_completion_rateTasks completed without policy or approval violations divided by tasks started.Trust planeUp
contextos.run.end_to_end_duration_msTime from accepted user or system request to terminal run state.Platform runtimeDown
contextos.run.first_useful_response_duration_msTime from request acceptance to first useful response or action proposal.Product + runtimeDown
contextos.budget.cost_per_verified_successTotal inference, retrieval, tool, retry, evaluation, observability, infrastructure, and human-review cost divided by accepted grounded, policy-compliant outcomes in the rollup window. This is the canonical “cost per trusted outcome” metric.Platform + productDown
contextos.context.answer.evidence_backed_rateResponses requiring evidence that include valid evidence_refs.Context planeUp
contextos.action.tool.success_rateSuccessful tool results divided by attempted tool calls.Action planeUp
contextos.trust.policy.violation_rateAdmitted runs with verified policy violations divided by all admitted runs in the declared start cohort, including failed/cancelled runs; report pending/unknown coverage separately.Trust planeDown
contextos.trust.trace.completeness_rateRuns with required spans, scorecard, evidence, and audit links.ObservabilityUp
contextos.trust.replay.conformance_rateReplay runs whose deterministic artifacts match exactly and whose probabilistic stages satisfy declared properties or scorecards.EvaluationUp

Thresholds are environment- and intent-specific. The contract defines formulas and owners; each deployment defines alert thresholds, sampling policy, and release gates.

Report unknown effects, incomplete metering and missing verification separately; never count them as successful or drop their cost from a successful-outcome numerator. Preserve exact declared currencies/accounting quantum and the legacy fractional-cent adapter semantics. A passing scorecard does not establish profile conformance or permit averaging away a mandatory denied case.

Per-Plane Metrics

Model-side metrics — Decision plane

The AI Gateway and LLM Router sit at the Decision plane’s model boundary. Earlier metric names placed these under contextos.intelligence.*, conflicting with the five-plane ownership. Migrate the gateway, provider, router, output and tokens families to contextos.decision.* with an explicit collector/dashboard alias window; do not combine both names as separate work in cost totals.

AreaContract metrics
Availabilitycontextos.decision.gateway.availability_rate, contextos.decision.provider.error_rate, contextos.decision.provider.timeout_rate
Latencycontextos.decision.gateway.request_duration_ms, contextos.decision.router.decision_duration_ms, contextos.decision.provider.request_duration_ms
Routingcontextos.decision.router.fallback_rate, contextos.decision.router.model_switch_rate, contextos.decision.router.policy_rejection_count
Quality controlscontextos.decision.output.invalid_schema_rate, contextos.decision.output.refusal_rate, contextos.decision.output.repair_rate
Budgetcontextos.decision.tokens.input_total, contextos.decision.tokens.output_total, contextos.decision.gateway.cost_usd, contextos.decision.gateway.cache_hit_rate

Context Plane

The Context plane owns per-request compilation, admitted evidence and conflict/sufficiency diagnostics. The Intelligence plane owns retrieval, memory and knowledge snapshots. Keep these ownership boundaries when instrumenting Context Pack, Memory and Knowledge Graph services. The retrieval/memory prefixes below replace historical contextos.context.retrieval.* / contextos.context.memory.* with an explicit alias migration.

AreaContract metrics
Pack buildcontextos.context.pack.build_duration_ms, contextos.context.pack.token_count, contextos.context.pack.context_window_utilization_rate
Evidencecontextos.context.pack.evidence_coverage_rate, contextos.context.answer.evidence_backed_rate, contextos.context.claim.attribution_rate
Intelligence retrievalcontextos.intelligence.retrieval.precision_at_k, contextos.intelligence.retrieval.recall_at_k, contextos.intelligence.retrieval.stale_source_rate
Intelligence memorycontextos.intelligence.memory.promotion_accept_rate, contextos.intelligence.memory.correction_rate, contextos.intelligence.memory.stale_read_rate
Context hazardscontextos.context.noise.irrelevant_token_rate, contextos.context.conflict.detected_rate, contextos.context.conflict.resolved_rate, contextos.context.poisoning.suspected_rate

Decision Plane

The Decision plane owns planning, execution choice, critique, loop controls, and the Decision Record. See also the Decision Catalog.

AreaContract metrics
Planningcontextos.decision.plan.validity_rate, contextos.decision.plan.feasibility_rate, contextos.decision.plan.revision_count
Execution controlcontextos.decision.executor.step_success_rate, contextos.decision.executor.loop_guard_trigger_rate, contextos.decision.executor.escalation_rate
Critiquecontextos.decision.critic.veto_rate, contextos.decision.critic.repair_success_rate, contextos.decision.critic.false_pass_rate
Outcomescontextos.decision.task.success_rate, contextos.decision.task.verified_success_rate, contextos.decision.task.abandonment_rate
Recordscontextos.decision.record.completeness_rate, contextos.decision.record.evidence_ref_count, contextos.decision.record.policy_ref_count

Action Plane

The Action plane owns side effects through the Tool Manager and the Adapter Mesh.

AreaContract metrics
Tool callscontextos.action.tool.success_rate, contextos.action.tool.error_rate, contextos.action.tool.request_duration_ms, contextos.action.tool.retry_rate
Approval bindingcontextos.action.approval.required_rate, contextos.action.approval.honored_rate, contextos.action.approval.denied_rate
Native riskcontextos.action.risk.declaration_coverage_rate, contextos.action.risk.policy_denial_rate, contextos.action.risk.v1_projection_mismatch_rate
Idempotencycontextos.action.idempotency.replay_hit_rate, contextos.action.idempotency.duplicate_effect_rate
Adapter healthcontextos.action.adapter.availability_rate, contextos.action.adapter.schema_validation_error_rate, contextos.action.adapter.version_drift_count
Evidence returncontextos.action.tool.evidence_return_rate, contextos.action.tool.audit_link_rate

Trust Plane

The Trust plane owns policy, approval gates, evaluation, observability, audit, replay, and security posture. See Evaluation and Observability, Observability, and the Policy Engine.

AreaContract metrics
Policycontextos.trust.policy.violation_rate, contextos.trust.policy.must_refuse_coverage_rate, contextos.trust.policy.decision_duration_ms
Evaluationcontextos.trust.scorecard.coverage_rate, contextos.trust.eval.pass_rate, contextos.trust.eval.regression_rate, contextos.trust.eval.judge_agreement_rate
Observabilitycontextos.trust.trace.completeness_rate, contextos.trust.audit.completeness_rate, contextos.trust.trace.fetch_duration_ms
Replaycontextos.trust.replay.conformance_rate, contextos.trust.replay.deterministic_match_rate, contextos.trust.replay.property_pass_rate, contextos.trust.replay.dataset_coverage_rate, contextos.trust.replay.duration_ms
Securitycontextos.trust.security.event_count, contextos.trust.security.cross_tenant_denial_count, contextos.trust.security.redaction_failure_rate
Adoptioncontextos.trust.user_correction_rate, contextos.trust.operator_override_rate, contextos.trust.human_escalation_rate

Emitted Artifacts

Metrics are only useful when their source artifacts are stable. Each run should emit the artifacts needed for its path; for example, a read-only answer may not emit an approval decision, but any governed action must. Names matching published schemas or exports below are canonical. RoutingDecision, PolicyDecision, and TraceBundle remain locally versioned candidate/profile artifacts until ContextOS publishes corresponding schemas.

Contract or profile artifactRequired contentsPrimary owner
CompiledContextprompt/provenance, policy/tool/evidence manifests, runtime admission controls, budget/omission report and context ledger/hash in their declared fieldsContext plane
Candidate RoutingDecision profilemodel profile, provider adapter, routing policy, rejected candidates summary, fallback index, usage, estimated cost; locally versioned profileDecision plane model boundary
Planplan ID, intent, steps/dependencies and decision checkpoints; separate declared runtime observations hold revisions and loop-guard stateDecision plane
DecisionRecordtyped decision, evidence/policy/approval/control/budget/lineage/trace fields; link separate verifier/effect evidence where applicableDecision plane
ToolCallEnvelope / ToolResultEnvelopetool ID, adapter ID, schema refs, native risk when available, v1 approval projection, idempotency key, result status, evidence refsAction plane
Candidate PolicyDecision profilepolicy profile, decision ID, rule refs, gate status, approver ref when applicableTrust plane
ContextLedger / EvidenceConflictMarkersource refs, omissions, compiled hash, competing evidence, affected requirements, and resolution refContext + Trust planes
MemoryProposalproposed content, target tier, evidence refs, consent and contradiction results; flags do not self-authenticate consentIntelligence plane
RunScore / DecisionScorecardevaluator dimension scores, thresholds or acceptance state, and release-gate evidenceEvaluation
Candidate TraceBundle profileW3C trace context, plane span chain, artifact refs, audit refs, sampling reasonObservability
ReplayPacketpinned request/run context, pack and compiled-context refs, tool transcripts, side-effect policy, expected outcome, and replay resultsEvaluation

Execution-control signals

Measure these obligations from current verified runtime/store observations under the exact execution contract; the reference does not emit these deployment signals for you.

Signal familyRequired interpretationOwner
Admission and policy errorsUnsupported exact required control/feature and applicable expression failures; no demotion or silent false result.Admission / policy
Authority and approvalStale/revoked/unknown grants, binding/quorum/expiry failures and attempted duplicate redemption; a denial is correct enforcement, not an outage to optimize away.Brokers / approval store
Boundary and dataRequired active-control failures and denied actual stage/recipient/processor routes; source labels and configurations need verification.Sandbox/egress/data owners
Effects and recoveryConfirmed/partial/unknown operations, uncertainty age, reconciliation backlog, cancellation propagation and stale-generation dispatch denials.Durable controller / provider adapter
Aggregate accountingOriginal limits, usage and outstanding reservations across root/child/retry/evaluator work; zero accepted conservation violations and visible uncertain usage.Atomic ledger / metering
Memory propagationPending/failed/external-unknown correction/deletion targets and verified completion against the scoped complete inventory.Memory / data owner
Conformance evidenceAll mandatory useful/denied cases, trusted current evidence scope and insufficiencies; reference pass counts remain separate from runtime claims.Independent evaluator / release owner

Apply minimization, authorized readers, actual telemetry processor/residency and retention policy to dimensions, rollups and exemplars. A hash or reference can still reveal a sensitive relationship.

Owners

Every contract metric needs a named owner before it is used in release gates or incident review.

OwnerResponsibilities
Platform runtimeGateway latency, routing, cost, token accounting, run-level duration, service availability.
Context engineeringContext Pack quality, retrieval, memory promotion, evidence attribution, conflict and poisoning signals.
Decision engineeringPlan validity, execution control, verifier outcomes, Decision Record completeness.
Action platformTool Manager reliability, native-risk enforcement, v1 projection correctness, adapter health, idempotency, and tool evidence return.
Trust, security, and SREPolicy decisions, audit, trace completeness, replay, security events, redaction, incident scorecards.
Product or domain ownerIntent taxonomy, done criteria, golden sets, acceptable thresholds, user correction interpretation.

Owner duties:

  • Maintain the formula, numerator, denominator, unit, and rollup windows.
  • Declare the source artifact and required dimensions.
  • Define alert thresholds and release-gate thresholds per environment.
  • Review metric behavior after any schema, policy, model, tool, or Context Pack version change.