veryfront/eval

Import

TypeScript
import {  compareEvalModelReports,  compareEvalReports,  createEvalDatasetMetadata,  createEvalModelComparisonMarkdown,  createEvalReport,  createEvalRunId,} from "veryfront/eval";

Examples

TypeScript
import { datasets, evalAgent, metrics } from "veryfront/eval"; export default evalAgent({  target: "agent:researcher",  dataset: datasets.inline([    { id: "q1", input: "Capital of France?", reference: "Paris" },  ]),  metrics: [    metrics.answer.contains({ text: "Paris" }).gate(),    metrics.agent.calledTool("search_docs").gate(),    metrics.agent.noFailedTools().gate(),  ],});

Target-free dataset eval

TypeScript
import { datasets, evalDataset, judges, metrics, runEval } from "veryfront/eval"; const supportReplyQuality = evalDataset({  id: "eval:support-reply-quality",  dataset: datasets.inline([    {      id: "billing-refund-reply",      input: "Hello, I checked the duplicate charge and started a refund.",    },  ]),  metrics: [    metrics.judge.rubric({      rubric: "The text must be polite, specific, and free of internal jargon.",      judge: judges.llm.rubric({ framing: "text" }),    }),  ],}); // No target runs: each example's stored value is graded directly. Metrics still// execute, so an LLM judge like the one above calls a model provider.const report = await runEval(supportReplyQuality, { adapters: {} });

Live agent-service eval

TypeScript
import { datasets, evalAgent, metrics, runEval } from "veryfront/eval";import { createAgentServiceEvalAdapter } from "veryfront/eval/agent-service"; const definition = evalAgent({  target: "agent:veryfront",  dataset: datasets.inline([{ id: "smoke", input: "List project files." }]),  metrics: [metrics.agent.noFailedTools().gate()],}); const report = await runEval(definition, {  adapters: {    agent: createAgentServiceEvalAdapter({      endpoint: "http://127.0.0.1:3001/api/ag-ui",      authToken: "<TOKEN>",      projectId: "<PROJECT_ID>",    }),  },});

Exports

Components

NameDescriptionSource
EVAL_REPORT_SCHEMA_VERSIONAdditive eval report contract version written by new reports and summary artifacts.source

Functions

NameDescriptionSource
compareEvalModelReportsCompare eval reports from multiple models using conservative promotion rules.source
compareEvalReportsCompare a current eval report against a saved baseline report.source
createEvalDatasetMetadataCreate stable dataset metadata for report consumers and CI artifacts.source
createEvalModelComparisonMarkdownRender a human-reviewable markdown summary for a model comparison report.source
createEvalReportCreate a JSON-serializable eval report from executed records.source
createEvalRunIdCreate a timestamp-sortable eval run id with a collision-resistant suffix.source
createEvalRunProvenanceBuild stable provenance metadata from explicit git/cloud inputs.source
createEvalSourceDocumentCreate the normalized Eval document Studio can list, inspect, and edit.source
deriveEvalIdDerive the stable eval:<path> ID for an eval file.source
discoverEvalsDiscover eval definitions from a project eval directory.source
evalAgentDefine an eval that targets a Veryfront agent.source
evalDatasetDefine a target-free eval that grades each stored dataset example directly.source
evalToolDefine an eval that targets a Veryfront tool.source
exportEvalReportExport an eval report through the configured eval report exporter registry.source
findEvalByIdDiscover and return one eval definition by ID.source
isEvalDefinitionCheck whether a value is a normalized eval definition.source
resolveEvalRunProvenanceResolve local or Cloud provenance for an eval run without failing the eval if git metadata is unavailable.source
runEvalExecute an eval locally with injected target adapters.source
summarizeEvalRecordsSummarize eval records into pass/fail and metric aggregates.source

Types

NameDescriptionSource
CreateEvalSourceDocumentOptionsOptions for creating a Studio source document from a discovered eval.source
DiscoveredEvalEval definition discovered from project source.source
EvalAgentAdapterAdapter used by runEval to execute V1 agent targets.source
EvalAgentAdapterContextContext passed to an agent adapter when runEval executes an example.source
EvalAgentAdapterResultAgent adapter result normalized into an eval record.source
EvalAgentInputInput accepted by evalAgent.source
EvalAnswerGroundednessMetricOptionsOptions for judge-backed answer grounding checks.source
EvalBudgetDeltaSummaryNumeric budget delta between a current eval report and a baseline report.source
EvalCheckContextContext passed to an eval definition's check callback.source
EvalCitationCitation emitted by an answer and matched against retrieved or expected sources.source
EvalDatasetDataset loader used by an eval definition.source
EvalDatasetInputInput accepted by evalDataset. Dataset evals grade each stored example value directly, so they have no execution target; the report identity is the stable id.source
EvalDatasetLoadContextContext passed to dataset loaders.source
EvalDefinitionFirst-class eval definition discovered from project source.source
EvalDiscoveryOptionsOptions for project-local eval discovery.source
EvalDiscoveryResultResult returned by eval discovery.source
EvalDurationSummaryDuration aggregate for an eval report.source
EvalEditableFieldForm-editable Eval source field name.source
EvalExampleNormalized dataset example used by eval runners and reports.source
EvalExampleInputDataset example shape accepted by eval definitions.source
EvalExpectBuilt-in expectation helpers available inside check.source
EvalExpectationFluent severity helpers for check expectations.source
EvalFailedExampleSummaryPer-example failure aggregate included in a report summary.source
EvalFlakeSummaryFlake classification for repeated eval examples.source
EvalGateFailureSummaryBlocking failure included in a report summary.source
EvalKnowledgeCitationMetricOptionsOptions for citation precision and recall over retrieved knowledge.source
EvalKnowledgeExpectedSourceExpected knowledge source or passage for retrieval-quality metrics.source
EvalKnowledgeMrrMetricOptionsOptions for mean reciprocal rank over retrieved knowledge.source
EvalKnowledgeRetrievalMetricOptionsOptions shared by knowledge retrieval metrics.source
EvalLlmGroundednessJudgeOptionsOptions for the built-in LLM groundedness judge.source
EvalLlmRubricJudgeOptionsOptions for the built-in general-purpose LLM rubric judge.source
EvalMetricMetric contract used by eval definitions.source
EvalMetricContextOptional runtime context passed to metric evaluators.source
EvalMetricDeltaSummaryPer-metric delta between a current eval report and a baseline report.source
EvalMetricFamilyMetric family used for grouping report summaries.source
EvalMetricResultResult emitted by a metric or check assertion.source
EvalMetricSummaryAggregate pass/fail summary for one metric.source
EvalMetricThresholdNumeric threshold attached to score-based metrics.source
EvalMockToolsStatic or request-scoped mock tools for local evalAgent execution.source
EvalMockToolsResolverRequest-scoped mock tool resolver for local evalAgent execution.source
EvalMockToolsResolverContextContext passed to an agent eval mock tool resolver.source
EvalModelCandidateComparisonCandidate-vs-baseline comparison used to decide whether a model is promotable.source
EvalModelComparisonAggregate report for comparing one baseline model against candidate models.source
EvalModelComparisonConstraintHard model comparison eligibility constraint.source
EvalModelComparisonDecisionConservative model comparison recommendation.source
EvalModelComparisonMetricNameMetric names available to model comparison constraints and objectives.source
EvalModelComparisonObjectiveWeighted model comparison objective used to rank eligible candidates.source
EvalModelComparisonOptionsPromotion thresholds for model comparison.source
EvalModelReportSummaryPer-model row in an eval model comparison report.source
EvalProgressEventProgress notification emitted by runEval while it executes records.source
EvalRecordOne executed example and repetition inside an eval report.source
EvalReportJSON-serializable report produced by runEval.source
EvalReportComparisonBaseline comparison for a current eval report.source
EvalReportComparisonPolicyRegression policy for comparing a current eval report to a saved baseline.source
EvalReportDatasetMetadataStable dataset identity attached to new eval reports when examples are available.source
EvalReportExportConfigExport configuration for a completed eval report.source
EvalReportMetadataAdditional report metadata that should not affect pass/fail semantics.source
EvalReportSummaryAggregate pass/fail summary for one eval report.source
EvalRetrievedContextRetrieved context item captured for deterministic RAG metrics.source
EvalRunV2-ready Eval run projection.source
EvalRunProvenanceRuntime and source identity attached to an eval report.source
EvalSeverityHow a metric result affects the final eval result.source
EvalSourceSource location for a discovered eval definition.source
EvalSourceDocumentStudio-editable Eval source document.source
EvalSourcePatchEval source patch submitted by Studio forms.source
EvalSourceReferenceSource location for an Eval definition.source
EvalStudioCapabilityCapability string Studio uses for Eval source and run actions.source
EvalTargetKindPrimitive kind an eval can execute.source
EvalToolAdapterAdapter used by runEval to execute tool targets.source
EvalToolAdapterContextContext passed to a tool adapter when runEval executes an example.source
EvalToolAdapterResultTool adapter result normalized into an eval record.source
EvalToolCallTool call metadata captured during one eval record.source
EvalToolCallCountOptionsOptions for checking how often a tool was called.source
EvalToolCallMatchOptionsOptions for matching a required tool call.source
EvalToolCallStatusNormalized status for a tool call captured during an eval record.source
EvalToolInputInput accepted by evalTool.source
EvalToolInputContextContext passed to an evalTool input mapper.source
EvalToolInputMatchModeHow expected tool input is compared to the captured tool input.source
EvalTraceTrace metadata captured for one eval record.source
EvalUsageToken and cost usage captured for one eval record.source
EvalUsageSummaryUsage totals for an eval report.source
LocalEvalReportEval report returned by local execution, with its dataset hash intact.source
RunEvalOptionsOptions for running an eval locally.source

Constants

NameDescriptionSource
datasetsDataset factories for inline, JSON, and JSONL eval examples.source
getEvalEditableFieldSchemaSchema for an editable Eval source field name.source
getEvalRunSchemaSchema for V2-ready Eval run projections.source
getEvalSourceDocumentSchemaSchema for a Studio-editable Eval source document.source
getEvalSourcePatchSchemaSchema for a source patch submitted from an Eval editor.source
getEvalSourceReferenceSchemaSchema for an Eval source reference.source
getEvalStudioCapabilitySchemaSchema for Eval Studio capabilities.source
getEvalTargetKindSchemaSchema for an Eval target primitive kind.source
judgesBuilt-in judge factories for semantic eval metrics.source
metricsMetric factories for deterministic answers, agent behavior, operations, and judges.source

Deep imports

These import paths group focused functionality under this module. Each is a separate barrel; import only what you need.

veryfront/eval/agent-service

TypeScript
import {  assertCompleted,  assertNoMalformedCreateFileToolCalls,  buildAgentServiceEvalRequestBody,} from "veryfront/eval/agent-service";

Components

NameDescriptionSource
DEFAULT_AGENT_SERVICE_EVAL_ENDPOINTDefault local AG-UI endpoint used by agent-service evals.source
DEFAULT_DURABLE_RUN_CANARY_TIMEOUT_MSDefault value for durable run canary timeout ms.source
DEFAULT_LIVE_EVAL_AREA_TAG_RULESDefault value for live eval area tag rules.source
DEFAULT_LIVE_EVAL_ENDPOINTDefault value for live eval endpoint.source
DEFAULT_LIVE_EVAL_OPTIONAL_JUDGE_CASE_PREFIXESDefault value for live eval optional judge case prefixes.source
DURABLE_RUN_TOKEN_GROWTH_CANARY_MARKERMarker used by the durable run token-growth canary prompt.source

Functions

NameDescriptionSource
assertCompletedAssert that a durable run canary completed successfully.source
assertNoMalformedCreateFileToolCallsAssert no malformed create file tool calls helper.source
buildAgentServiceEvalRequestBodyBuild the AG-UI request body for a single eval example.source
buildFailureSuffixBuilds failure suffix.source
buildLiveEvalCaseMetadataBuilds live eval case metadata.source
buildLiveEvalCaseTagSummaryBuilds live eval case tag summary.source
buildLiveEvalRequestBodyBuilds live eval request body.source
buildLiveEvalRuntimeSummaryBuilds live eval runtime summary.source
buildLiveEvalStatusSummaryBuilds live eval status summary.source
buildProgressLineBuilds progress line.source
buildRuntimePerformanceSummaryBuilds runtime performance summary.source
cancelLiveEvalInputRequestRequest payload for cancel live eval input.source
collectAssistantTextCollect assistant text helper.source
containsOrderedSubsequenceContains ordered subsequence helper.source
containsSkillLoadsource
countStepStartedEventsCount step started events helper.source
createAgentServiceEvalAdapterCreate an EvalAgentAdapter that executes examples against an AG-UI agent-service endpoint.source
createDurableRunCanaryApiClientCreate durable run canary API client.source
createDurableRunCanaryRunnerCreate durable run canary runner.source
createDurableRunTokenGrowthCanaryCaseCreate a two-turn durable run canary for historical tool-input token growth.source
createFailedEvalResultResult returned from create failed eval.source
createLiveEvalApiClientCreate live eval API client.source
createLiveEvalCaseSupportCreate live eval case support.source
createLiveEvalConversationCreate live eval conversation.source
createLiveEvalProjectUploadFixtureCreate live eval project upload fixture.source
createLiveEvalReleaseCreate live eval release.source
createPassedEvalResultResult returned from create passed eval.source
createPlainTextPdfCreate plain text pdf.source
createSkippedEvalResultResult returned from create skipped eval.source
deleteLiveEvalConversationDelete live eval conversation helper.source
deleteLiveEvalProjectFileDelete live eval project file helper.source
evaluateAgentServiceEvalEnvironmentEvaluate whether the required live agent-service eval environment is present.source
evaluateRuntimeConfidenceEnvEvaluate runtime confidence env helper.source
findAssistantMessageMessage shape for find assistant.source
getLiveEvalProjectFileReturn live eval project file.source
hasEveryLiveEvalTagCheck whether every live eval tag is present.source
hasFinishedCheck whether finished is present.source
listOpenLiveEvalInputRequestsList open live eval input requests.source
parseDurableRunCanaryRunSummaryParses durable run canary run summary.source
printRuntimeConfidencePreflightPrint runtime confidence preflight helper.source
resolveAgentServiceEvalEnvironmentResolve environment values for live agent-service eval execution.source
resolveDurableRunCanaryEnvironmentResolves durable run canary environment.source
resolveLiveEvalEnvironmentResolves live eval environment.source
resolveLiveEvalRequestedCaseIdsResolves live eval requested case IDs.source
runDurableRunCanaryCliRun durable run canary cli.source
runLiveEvalCliRun live eval cli.source
selectLiveEvalCasesSelect live eval cases helper.source
stringifyUnknownStringify unknown helper.source
submitLiveEvalInputResponseResponse payload for submit live eval input.source
waitForOpenLiveEvalInputRequestRequest payload for wait for open live eval input.source
withLiveEvalMetadataApplies live eval metadata.source

Types

NameDescriptionSource
AgentServiceEvalAdapterConfigConfiguration for the live agent-service eval adapter.source
AgentServiceEvalEnvironmentResolved environment values for live agent-service evals.source
AgentServiceEvalEnvironmentInputEnvironment input accepted by agent-service eval helpers.source
AgentServiceEvalEnvironmentPreflightResultPreflight result for a live agent-service eval environment.source
AgentServiceEvalForwardedPropsVeryfront forwarded props included in an AG-UI eval request.source
AgentServiceEvalRequestBodyAG-UI request body sent to an agent-service endpoint.source
BuildAgentServiceEvalRequestBodyInputInput accepted by buildAgentServiceEvalRequestBody.source
BuildLiveEvalCaseMetadataInputInput payload for build live eval case metadata.source
BuildLiveEvalRequestBodyInputInput payload for build live eval request body.source
DurableRunCanaryApiClientPublic API contract for durable run canary API client.source
DurableRunCanaryApiConfigConfiguration used by durable run canary API.source
DurableRunCanaryCasePublic API contract for durable run canary case.source
DurableRunCanaryCliCaseFactoryInputInput payload for durable run canary cli case factory.source
DurableRunCanaryCreateRootRunInputInput payload for durable run canary create root run.source
DurableRunCanaryEnvironmentPublic API contract for durable run canary environment.source
DurableRunCanaryExecutionExecution metadata retained for each durable run canary prompt.source
DurableRunCanaryMessageMessage shape for durable run canary.source
DurableRunCanaryPreparedCasePublic API contract for durable run canary prepared case.source
DurableRunCanaryResultResult returned from durable run canary.source
DurableRunCanaryRunnerConfigConfiguration used by durable run canary runner.source
DurableRunCanaryRunSummaryPublic API contract for durable run canary run summary.source
DurableRunCanarySendUserMessageInputInput payload for durable run canary send user message.source
DurableRunCanaryStartRunInputInput payload for durable run canary start run.source
DurableRunTokenGrowthCanaryCaseInputInput payload for create durable run token-growth canary case.source
LiveEvalApiClientPublic API contract for live eval API client.source
LiveEvalApiContextContext for live eval API.source
LiveEvalCasePublic API contract for live eval case.source
LiveEvalCaseMetadataPublic API contract for live eval case metadata.source
LiveEvalCaseMetadataOptionsOptions accepted by live eval case metadata.source
LiveEvalCaseSelectionInputInput payload for live eval case selection.source
LiveEvalCaseSurfacePublic API contract for live eval case surface.source
LiveEvalCaseTagRulePublic API contract for live eval case tag rule.source
LiveEvalCliCaseFactoryInputInput payload for live eval cli case factory.source
LiveEvalCliCaseGroupsPublic API contract for live eval cli case groups.source
LiveEvalContextContext for live eval.source
LiveEvalConversationInputInput payload for live eval conversation.source
LiveEvalCreateConversationInputInput payload for live eval create conversation.source
LiveEvalCreateReleaseInputInput payload for live eval create release.source
LiveEvalEnvironmentPublic API contract for live eval environment.source
LiveEvalInputRequestInputInput payload for live eval input request.source
LiveEvalInputRequestRecordRecord shape for live eval input request.source
LiveEvalInputResponseValuesPublic API contract for live eval input response values.source
LiveEvalProjectFilePublic API contract for live eval project file.source
LiveEvalProjectFileInputInput payload for live eval project file.source
LiveEvalProjectFileReaderInputInput payload for live eval project file reader.source
LiveEvalProjectUploadFixtureInputInput payload for live eval project upload fixture.source
LiveEvalRequestBodyPublic API contract for live eval request body.source
LiveEvalRequestTimeoutInputInput payload for live eval request timeout.source
LiveEvalResultForPerformancePublic API contract for live eval result for performance.source
LiveEvalResultForReportPublic API contract for live eval result for report.source
LiveEvalResultRecordRecord shape for live eval result.source
LiveEvalRunnerConfigConfiguration used by live eval runner.source
LiveEvalRuntimePublic API contract for live eval runtime.source
LiveEvalSubmitInputResponseInputInput payload for live eval submit input response.source
LiveEvalWaitForOpenInputRequestInputInput payload for live eval wait for open input request.source
PreparedLiveEvalInputInput payload for prepared live eval.source
RunDurableRunCanaryCliInputInput payload for run durable run canary cli.source
RunLiveEvalCliInputInput payload for run live eval cli.source
RuntimeConfidencePreflightResultResult returned from runtime confidence preflight.source
RuntimePerformanceSummaryPublic API contract for runtime performance summary.source

Constants

NameDescriptionSource
getDurableRunCanaryMessageSchemaZod schema for get durable run canary message.source