This page defines how every agent in Synedrix OS is tested, scored, and approved — the evaluation framework, the evaluator types, offline and online evaluation, promotion gates, and the ownership split between Synedrix OS, domain packs, and business instances.

Evaluation is a first-class operating concern. Agents without a declared evaluation suite must not graduate from draft to active status in the agent registry (agent-runtime-and-orchestration.md, registry lifecycle). The evaluation framework is defined here and enforced by the OS-level registry; domain packs may contribute domain-specific suites and business instances may tighten thresholds, but neither can waive a blocking: true suite.

Three evaluation dimensions

Synedrix OS separates evaluation into three orthogonal dimensions, each mapped to a specific platform surface rather than collapsed into one composite score.

DimensionPlatformAnswers
Output qualityLangfuse (Layer 10)Is the agent producing correct, coherent, and on-policy outputs?
Policy complianceAudit + orchestration layers (Layers 3 and 9)Is the agent operating within its declared authority boundary?
Operational healthGrafana/Prometheus + Langfuse (Layer 10)Is the agent performing reliably within cost and latency budgets?

PostHog (Layer 10) provides complementary product and behavioural analytics — how the agent is being used, which workflows invoke it most — but does not own evaluation gates. This separation follows the Observability layer design and the Tech Stack platform responsibility matrix §9.

Output quality checks

Output quality evaluations cover six check types:

  • Factual correctness — the output matches ground truth for known inputs.
  • Schema compliance — the output matches the declared output_schema in the agent contract.
  • Confidence calibration — stated confidence is consistent with actual accuracy.
  • Reasoning coherence — the reasoning supports the conclusion.
  • Hallucination detection — claims are grounded in the provided context.
  • Policy instruction adherence — the output follows safety and governance overlays in the prompt policy.

Policy compliance checks

Policy compliance evaluations cover:

  • Authority boundary checks — the agent did not attempt actions outside its declared authority.
  • Approval gate compliance — the agent correctly flagged approval-required actions.
  • Side-effect compliance — the agent produced only declared side effects.
  • Escalation compliance — the agent escalated correctly when conditions required it.
  • Tool permission compliance — the agent invoked only tools within its declared tool_permissions.
  • Scope compliance — the agent stayed within its declared memory access scope.

Policy compliance scoring is binary per check; aggregate compliance rate is compliant_invocations / total_invocations. High-risk agents (risk_tier: high or critical) must maintain a compliance rate of 1.0.

Operational health checks

  • Latency SLO compliance — p50/p95/p99 latency within latency_slo_ms.
  • Token budget compliance — average usage within declared budgets.
  • Error rate — proportion of invocations ending in failure or escalation.
  • Retry rate — high rates indicate model or tool instability.
  • Circuit breaker open rate — how often the circuit breaker opens.
  • Cost per invocation — within declared budget.
  • Fallback rate — how often the agent degrades to fallback model or rules-only mode.

Observability metric families as evaluation inputs

Promotion gates consume canonical observability metrics defined in the Observability Metrics Spec. Each metric family is classified as blocking (suite failure prevents promotion) or advisory (informs review but does not block promotion alone). The defaults below are OS-floor values; domain packs and business instances may tighten but not relax them.

Metric familySpec sectionScopeBlocking?
Retrieval quality (retrieval_f1_at_k, retrieval_quality_score)§7.1InvocationAdvisory
Groundedness / hallucination (hallucination_probability, hallucination_flag, faithfulness_score)§7.2InvocationBlocking for interface and high-risk agents
Cost and drift (cost_drift_flag, cost_drift_pct)§7.3InvocationAdvisory
Semantic validity (semantic_validity_score, semantic_validity_flag)§7.4InvocationBlocking when structured output feeds downstream automation
Multi-turn coherence (coherence_score, goal_alignment_score)§7.6ConversationBlocking for interface agents
Tool reliability (tool_success_rate, p95_latency_ms)§7.7Tool aggregateAdvisory
Risk alignment (risk_alignment_score, risk_policy_violations_count)§7.8InvocationBlocking for medium, high, and critical risk tiers
Guardrail effectiveness§7.9Guardrail aggregateAdvisory
User trust and satisfaction (trust_score_30d_avg, trust_trend_30d)§7.10Conversation / agentAdvisory (promotion gate for interface agents; not per-call runtime veto)

Promotion gate examples:

# Interface agent gate
eval_suite:
  suite_id: eval-interface-trust-gate
  agent_id: <agent_id>
  dimensions: [output-quality, observability-metrics]
  blocking: true
  pass_thresholds:
    trust_score_30d_avg_min: 0.70
    coherence_score_min: 0.75
    hallucination_probability_max: 0.20
Illustrative example, not a production implementation. Review and test before use.
# High-risk agent gate
eval_suite:
  suite_id: eval-risk-alignment-blocking
  agent_id: <agent_id>
  dimensions: [policy-compliance, observability-metrics]
  blocking: true
  pass_thresholds:
    risk_alignment_score_min: 0.95
    risk_policy_violations_count_max: 0
    hallucination_probability_max: 0.15
Illustrative example, not a production implementation. Review and test before use.

Evaluation suite schema

Every evaluation suite is declared as a YAML configuration:

eval_suite:
  suite_id:                    # e.g. eval-policy-guard-regression
  agent_id:                    # e.g. os-agt-009
  description:                 # Human-readable purpose
  dimensions:                  # output-quality | policy-compliance | operational-health | observability-metrics
  run_trigger:                 # on-deploy | scheduled | on-prompt-change | on-demand | on-model-change
  langfuse_dataset_ref:        # Reference to the Langfuse dataset for offline evaluation
  pass_thresholds:
    output_quality_min:        # 0.0–1.0
    policy_compliance_min:     # 0.0–1.0
    latency_p95_max_ms:
    error_rate_max:
    token_budget_compliance:
  blocking:                    # true = deployment blocked if suite fails
  notification_targets:
  regression_sensitivity:      # strict | standard | permissive
Illustrative example, not a production implementation. Review and test before use.

A suite that is strong on one dimension but fails another has not “mostly passed” — every blocking: true threshold in a suite is combined with AND, not an average. A suite may reasonably run with blocking: false while being stood up, but no agent may remain at active status indefinitely without at least one blocking: true suite enforced.

Evaluation triggers

TriggerDescriptionRecommended for
on-deployRun full suite before agent goes activeAll agents
on-prompt-changeRun output quality suite on any prompt layer version changeAll LLM-backed agents
scheduledPeriodic regression against live or shadow trafficProduction agents
on-demandManual trigger for debugging or incident reviewAll agents
on-model-changeTriggered when primary or fallback model version changesAll agents using managed models

Deterministic vs. LLM-as-judge vs. production ground truth

Deterministic checks

Exact-match, schema-validation, substring or regex-style assertions. No model judgment involved — the cheapest, most objective signal available, and the right tool for locking in a regression against a known-bad answer shape. A deterministic check either passed or it didn’t; there is no calibration question to ask about it.

Synedrix OS rule: anything checkable by code is checked by code. A judge is the fallback, not the default.

Reasons to reach for deterministic evaluators first:

  • They are free. No model call, so an evaluator can run on every example on every commit without cost concerns.
  • They are fast. A suite of deterministic evaluators over two hundred examples finishes in the time a judge takes on ten.
  • They do not need validating. A judge’s scores are only as good as the judge; code that checks whether a number is within five percent of another number requires no validation exercise. It is either correct or it has a bug.

LLM-as-judge checks

A second model scores the agent’s output against the grounding it was given. The judge must never be the same model or checkpoint being evaluated — a model does not grade its own work, and doing so silently inflates every score it produces.

Judge scores are a proxy for quality, not quality itself. Treat a single run’s judge score as informative, not authoritative, until the judge itself has been spot-checked against a few outputs a human actually read. Observed directly on os-agt-009’s live on-the-fly scoring: two runs of a near-identical multi-turn conversation, both with the same retrieved sources, scored coherence_score: 0.80 / hallucination_probability: 0.20 on one run and coherence_score: 0.00 / hallucination_probability: 1.00 on the other. Quantized, batched inference backends can be genuinely non-deterministic even at temperature: 0 (floating-point batching effects), and the answer being judged is rarely temperature: 0 itself, so small wording differences between runs can tip a borderline judgment either way. Closing this gap requires a judge-calibration pass — a small set of answers with known-correct human labels, checked against how consistently the judge agrees with them.

A judge validated against one model version is not validated against its successor, and model versions change underneath you.

Production ground truth

trust_score_30d_avg and similar metrics sourced from real end-user signals (e.g. thumbs up/down feedback captured as a score on the originating trace). This is the only one of the three that is not a proxy — it is real users reacting to real answers. It is also the slowest to accumulate and the most sensitive to sample size. A “PASS” computed from a handful of events is provisional, not durable — report the sample size (n) alongside the average, and re-check once real traffic has accumulated over the full window. A pass on n = 5 and a pass on n = 500 are not the same claim.

Evaluator alignment

A judge is a measuring instrument, and an uncalibrated instrument produces numbers rather than measurements. Synedrix OS requires an agreement rate on record before a judge’s output can gate anything. A judge with no recorded alignment can be used for exploration but cannot be used for promotion.

The alignment procedure:

  1. Sample — Take twenty to fifty examples spanning the difficulty range, not just the clear cases.
  2. Label by hand — A person applies the same rubric the judge will use, without seeing the judge’s answers. If two people do it, measure whether they agree with each other first. If humans agree only seventy percent of the time, the rubric is ambiguous and no judge will fix that.
  3. Compare — Run the judge on the same examples and measure agreement with the human labels.
  4. Examine the disagreements — Each one is either a bad rubric, a genuinely hard case, or a judge failing. All three are worth knowing.
  5. Iterate on the rubric — not on the judge’s model — and repeat.

The agreement rate is the confidence interval on everything that judge subsequently reports. A judge agreeing with people ninety percent of the time is a good instrument; one agreeing sixty percent of the time is close to a coin flip on the cases that matter.

In Langfuse, alignment happens through annotation queues, which have been MIT-licensed since June 2025, making the discipline available in self-hosted and air-gapped Mode 3.

Trajectory and pairwise evaluation

Not all agent evaluation is about the final answer. Some agents — notably the Orchestrator (os-agt-001) — produce plans or decompositions where there is no single correct output to compare against.

Trajectory evaluation

Scores the sequence of steps rather than the final output. Much of what is worth checking in a trajectory is deterministic:

  • Did the plan cover every part of the stated goal?
  • Did it delegate only to agents that exist and are active?
  • Did it avoid proposing actions the requester’s authority does not permit?
  • Did it stay within a reasonable number of revisions?
  • Were there no forbidden tool calls, repeated identical calls, or cost ceiling violations?

Synedrix OS rule: trajectory checks are required on any agent that delegates or causes side effects, regardless of how good its outputs look. An agent producing correct results through an alarming route is a problem that outcome-based evaluation cannot see.

Trajectory evaluation is not a first-class Langfuse feature (it remains an open feature request), so on the canonical stack it is implemented as custom scores over the observation tree. The requirement stands regardless: “the platform has no button for it” is not a reason to skip the check.

Pairwise comparison

When there is no standard to score against but you can tell which of two outputs is better, pairwise evaluation presents both and asks for a preference. Relative judgement is more stable than absolute judgement for models as for people.

The result is a preference rate — version B was preferred over version A in sixty-eight percent of cases. Pairwise gives you a ranking and no absolute position, so it complements a blocking suite rather than replacing it: the suite establishes a floor; pairwise measures movement above it.

Offline vs. online evaluation

The two answer different questions and neither substitutes for the other.

OfflineOnline
WhenBefore deploymentContinuously
InputsA fixed datasetReal traffic
Reference outputUsually yesNo
CoverageEvery exampleA sample
PurposeGate a releaseDetect drift and problems
Acts on resultA person deciding to shipAn alert

Offline runs a fixed dataset through an agent and scores the results. You control the inputs, you know what the answers should be, and you run it when you choose.

Online scores runs that are already happening — real requests from real users. There is no reference output. Online evaluators check properties rather than correctness: schema conformance, budget conformance, prompt injection signals, and response relevance. Langfuse splits evaluation into offline (“test your application against a fixed dataset before you deploy”) and online (“scores live traces to catch issues in real traffic”) with LLM-as-a-Judge and code evaluators running online, supported by annotation queues for human ground truth (langfuse.md).

For the OS agents, four online evaluation checks:

  • Schema conformance — deterministic, cheap enough to run on everything.
  • Budget conformance — steps, tokens, cost. Also deterministic.
  • Prompt injection signals — whether an input appears to be attempting to manipulate the agent.
  • Response relevance — whether the output addresses the request. Needs a judge, so it is sampled; the alignment requirement applies.

The first two run on everything because they cost nothing.

The loop from online to offline

Online evaluation flags a production run as problematic. Someone investigates. If it represents a real failure, the run becomes an example in the offline regression suite. This is what turns online evaluation into something more than a dashboard — without the loop, online scores tell you a problem exists and nothing prevents its return. With it, each detected problem becomes a permanent check.

Offline datasets and variance discipline

Each agent maintains at least two datasets:

  • Blocking suite dataset — small, fast, required to pass before an agent moves to active. Should be quick enough that nobody is tempted to skip it.
  • Regression suite dataset — larger, slower, run before releases. Where accumulated production failures live.

Example sources

Examples arrive in roughly this order over a system’s life:

  1. Written up front — the cases you can think of before anything has run. Necessary but not sufficient.
  2. Production failures — an agent behaves badly, someone investigates the trace, and the trace becomes an example. This is the most valuable source by a considerable margin.
  3. Generated — synthetic variations to cover more ground. Useful for breadth, but a generated example’s reference output is only as good as whatever generated it.

A critical step most teams miss: after fixing a production failure, add the trace to the regression dataset so the same failure is detected automatically if it ever returns. Without this step, every fix is a one-off.

Data governance

A production trace contains real customer data. Putting it in an evaluation dataset means the data is now retained somewhere with different access controls, different retention, and a different purpose. Synedrix OS requires that examples derived from production are redacted before being added, using the same PII handling defined in Academy chapter 02.2. Where redaction would destroy what made the example interesting, the example is reconstructed by hand rather than copied.

The variance problem

Models are not deterministic, so two runs of the same agent against the same dataset produce different scores. An agent loop compounds that: a slightly different first tool call leads to different observations and a different path.

Synedrix OS rule: measure your variance baseline before trusting comparisons. Run the same unchanged agent five times against the same dataset. The spread you see is the threshold below which differences are meaningless. Require repetitions (typically three) for any experiment that gates a change. A single run per example is fine for spotting a catastrophic regression, but not enough to justify shipping a change on the grounds that it improved things slightly.

The aggregate score is the least informative number in a comparison view. Look instead at examples that changed direction (passing before, failing now), examples that were already failing and still are, and consistency across repetitions.

Promotion gates

Promotion gates are enforced by the OS registry and cannot be bypassed by domain packs or business instances.

TransitionRequired gate
draft → activeAll blocking: true suites must pass
Prompt version bumpOutput quality suite must pass
Model version changeFull suite must pass
deprecated → retiredReplacement agent must be active with passing suites
suspended → activeFull suite plus incident review must pass

When a suite fails, the fix is not always where it looks like it is. Before spending effort, classify the failure by root cause:

Root causeWhat it usually meansWhere to fix it
RetrievalThe agent never had the right context — a chunking, ranking, or pinning problemFix retrieval/data: chunking, CANONICAL_FACTS-style pinning, re-ranking. Cheapest and most common.
Model-behaviorThe agent had the right context but the generation model mishandled itFix at the decoding/serving layer first: structured/guided decoding, tool-choice forcing, sampling parameters. Try before weight changes.
ReasoningThe agent had the right context and produced well-formed output, but the actual reasoning was wrongThe one category where a stronger model or fine-tuning the agent’s own already-authored behavior is the correct lever.
HallucinationUsually a retrieval problem wearing a generation-layer costumeCheck retrieval first, same as the Retrieval row.

This is the same evidence-gated ordering used for os-agt-009, generalized as the intended reading of any suite built against this spec.

Ownership split: OS, domain packs, business instances

ConcernSynedrix OSDomain PackBusiness Instance
Evaluation framework and suite schemaOwnsDeclares domain-specific suites and datasetsSets instance-level targets and notification targets
Promotion gate enforcementOwns — not bypassableContributes required suites per agentCannot waive blocking suites
Pass thresholdsDefines minimum floor valuesMay set stricter thresholds per agent classMay tighten; cannot lower below floor
Compliance scoringOwns compliance rate calculation and alerting modelDeclares applicable compliance checks per agentSets alert routing and incident response owners

Database tables

The evaluation system persists data in five Supabase table groups (Agent DB Schema Group E):

TablePurpose
agent_eval_suitesSuite definitions per agent
agent_eval_runsHistorical record of every suite execution
agent_eval_resultsPer-check results within a run
agent_eval_promotion_gatesGate outcomes per lifecycle transition
agent_eval_compliance_eventsImmutable audit log of compliance breaches

The observability metrics spec also defines evaluation_results (§8.3) for observational metrics that are not promotion-gate records, and response_reviews (§8.4) for human review outcomes.

Invariants

  • Every agent must have at least one blocking: true eval suite before transitioning to active.
  • Policy compliance checks for risk_tier: high or critical agents must be blocking and require 1.0 compliance.
  • Promotion gate enforcement is owned by the OS registry and cannot be bypassed.
  • Every compliance breach must emit an auditable event.
  • Evaluation suites must be versioned with immutable pass/fail history.
  • A judge with no recorded alignment can be used for exploration and cannot be used for promotion.
  • Any agent that delegates or causes side effects needs trajectory checks.
  • Evaluation suites are a precondition for active status, not an afterthought.

The Forecasting Agent as canonical test case

The Forecasting Agent (os-agt-006) is the canonical test case for evaluation in Synedrix OS, the agent against which every evaluation technique is demonstrated before being applied elsewhere.

Its mission is to generate forward-looking projections from historical time-series and operational data, returning structured forecast outputs with a value, confidence interval, and rationale (Agent Registry §4). Of all the OS agents, it is the only one whose output can be checked against something that actually happened — time passes, the thing either happened or it did not, and by how much is a number. That makes it possible to write an evaluator with no judgement in it.

Four deterministic checks cover what matters:

  1. Accuracy — relative error against the actual outcome.
  2. Interval coverage — did the actual value fall inside the stated confidence interval? Over a whole dataset this should happen roughly as often as the interval claims.
  3. Interval width — an agent can achieve perfect coverage by producing uselessly wide intervals. Checking width alongside coverage prevents gaming.
  4. Schema conformance — does the output validate?

The second and third only mean something together. An evaluator measuring one without the other can be satisfied by an agent that has learned to game it.

For the rationale dimension — whether the explanation actually supports the number — a deterministic check is insufficient, so a judge-based evaluator is used. This is the layer where alignment is required.

Once the techniques are demonstrated on the Forecasting Agent with a clear signal, applying them to agents where there is no ground truth (the Orchestrator, the Policy Guard, the Registry Agent) is a smaller step.

os-agt-009 Stage 0: reference implementation

os-agt-009 (General Chat Agent)’s Stage 0 suite is the first concrete instance of this schema in the platform. It implements:

  • A suite definition (eval-suite-os-agt-009.yaml) against the interface-agent promotion gate.
  • A golden set of items tagged by the same root-cause categories (retrieval, model-behavior, reasoning, hallucination).
  • An independent judge implementation (judge.ts) — not the same model being evaluated.
  • A runner (scripts/eval.ts) that also pulls trust_score_30d_avg from real production feedback already in Langfuse rather than estimating it.
  • Run results written per-run to agent/evals/results/ and as scores on each answer’s own Langfuse trace.

This suite is the reference pattern when standing up an evaluation suite for a new agent.

Where Langfuse fits in the evaluation pipeline

Langfuse (Layer 10) is the output-quality evaluation platform. It owns prompt versioning, LLM trace capture, token and cost attribution, evaluations, and quality scoring. Both LangGraph (Layer 4) and n8n AI Agent nodes (Layer 3) emit traces to Langfuse via OpenTelemetry or the native exporter, providing a single correlated view of every model call regardless of which engine made it.

Key Langfuse concepts used in evaluation:

  • Datasets — named collections of dataset items (input + optional reference output), supporting splits for fast vs. comprehensive runs.
  • Dataset runs — experiments that run an agent against a dataset, producing outputs and scores.
  • Scores — universal data objects (numeric, categorical, boolean, or text) attached to traces, observations, sessions, or dataset runs.
  • LLM-as-a-Judge evaluators — judge models with rubrics, producing scores over live traces or dataset runs.
  • Code evaluators — custom Python or TypeScript functions that produce scores.
  • Annotation queues — for structured human review, where ground-truth labels are assembled during judge alignment.
  • Online evaluation — scoring live production traces with configured sampling rates and filters.
  • Prompts — versioned and labeled, with client-side caching so retrieval adds no latency.

Langfuse is required in all three deployment modes and is the Layer 10 platform. The Agent Evaluation Spec’s requirements map directly onto Langfuse’s capabilities: datasets, experiments, judges, annotation queues, and online evaluation all exist in both products.

Agent DB schema — evaluation tables

The Agent DB schema (Group E) defines the evaluation tables in Supabase:

  • agent_eval_suites — suite definitions, including suite_id, agent_id, dimensions, blocking, and pass_thresholds.
  • agent_eval_runs — every suite execution, linked to the suite and containing trigger, dataset version, and result summary.
  • agent_eval_results — per-check results within a run, including individual score, pass/fail, and evaluator version.
  • agent_eval_promotion_gates — gate outcomes per lifecycle transition, including the transition type, passing suites, and the decision.
  • agent_eval_compliance_events — immutable audit log of compliance breaches, including the agent, dimension, metric, and severity.

Invocation-level evaluation metrics are persisted in agent_invocation_outcomes (Agent DB Group D, Observability Metrics Spec §8.1), and observational evaluation results go into evaluation_results (Observability Metrics Spec §8.3).

Versioning