Import
import {
compareEvalModelReports,
compareEvalReports,
createEvalDatasetMetadata,
createEvalModelComparisonMarkdown,
createEvalReport,
createEvalRunId,
} from "veryfront/eval";
Examples
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(),
],
});
Live agent-service eval
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
| Name | Description | Source |
|---|---|---|
EVAL_REPORT_SCHEMA_VERSION | Additive eval report contract version written by new reports and summary artifacts. | source |
Functions
| Name | Description | Source |
|---|---|---|
compareEvalModelReports | Compare eval reports from multiple models using conservative promotion rules. | source |
compareEvalReports | Compare a current eval report against a saved baseline report. | source |
createEvalDatasetMetadata | Create stable dataset metadata for report consumers and CI artifacts. | source |
createEvalModelComparisonMarkdown | Render a human-reviewable markdown summary for a model comparison report. | source |
createEvalReport | Create a JSON-serializable eval report from executed records. | source |
createEvalRunId | Create a timestamp-sortable eval run id with a collision-resistant suffix. | source |
createEvalRunProvenance | Build stable provenance metadata from explicit git/cloud inputs. | source |
createEvalSourceDocument | Create the normalized Eval document Studio can list, inspect, and edit. | source |
deriveEvalId | Derive the stable eval:<path> ID for an eval file. | source |
discoverEvals | Discover eval definitions from a project eval directory. | source |
evalAgent | Define an eval that targets a Veryfront agent. | source |
evalTool | Define an eval that targets a Veryfront tool. | source |
exportEvalReport | Export an eval report through the configured eval report exporter registry. | source |
findEvalById | Discover and return one eval definition by ID. | source |
isEvalDefinition | Check whether a value is a normalized eval definition. | source |
resolveEvalRunProvenance | Resolve local or Cloud provenance for an eval run without failing the eval if git metadata is unavailable. | source |
runEval | Execute an eval locally with injected target adapters. | source |
summarizeEvalRecords | Summarize eval records into pass/fail and metric aggregates. | source |
Types
| Name | Description | Source |
|---|---|---|
CreateEvalSourceDocumentOptions | Options for creating a Studio source document from a discovered eval. | source |
DiscoveredEval | Eval definition discovered from project source. | source |
EvalAgentAdapter | Adapter used by runEval to execute V1 agent targets. | source |
EvalAgentAdapterContext | Context passed to an agent adapter when runEval executes an example. | source |
EvalAgentAdapterResult | Agent adapter result normalized into an eval record. | source |
EvalAgentInput | Input accepted by evalAgent. | source |
EvalAnswerGroundednessMetricOptions | Options for judge-backed answer grounding checks. | source |
EvalBudgetDeltaSummary | Numeric budget delta between a current eval report and a baseline report. | source |
EvalCheckContext | Context passed to an eval definition’s check callback. | source |
EvalCitation | Citation emitted by an answer and matched against retrieved or expected sources. | source |
EvalDataset | Dataset loader used by an eval definition. | source |
EvalDatasetLoadContext | Context passed to dataset loaders. | source |
EvalDefinition | First-class eval definition discovered from project source. | source |
EvalDiscoveryOptions | Options for project-local eval discovery. | source |
EvalDiscoveryResult | Result returned by eval discovery. | source |
EvalDurationSummary | Duration aggregate for an eval report. | source |
EvalEditableField | Form-editable Eval source field name. | source |
EvalExample | Normalized dataset example used by eval runners and reports. | source |
EvalExampleInput | Dataset example shape accepted by eval definitions. | source |
EvalExpect | Built-in expectation helpers available inside check. | source |
EvalExpectation | Fluent severity helpers for check expectations. | source |
EvalFailedExampleSummary | Per-example failure aggregate included in a report summary. | source |
EvalFlakeSummary | Flake classification for repeated eval examples. | source |
EvalGateFailureSummary | Blocking failure included in a report summary. | source |
EvalKnowledgeCitationMetricOptions | Options for citation precision and recall over retrieved knowledge. | source |
EvalKnowledgeExpectedSource | Expected knowledge source or passage for retrieval-quality metrics. | source |
EvalKnowledgeMrrMetricOptions | Options for mean reciprocal rank over retrieved knowledge. | source |
EvalKnowledgeRetrievalMetricOptions | Options shared by knowledge retrieval metrics. | source |
EvalLlmGroundednessJudgeOptions | Options for the built-in LLM groundedness judge. | source |
EvalLlmRubricJudgeOptions | Options for the built-in general-purpose LLM rubric judge. | source |
EvalMetric | Metric contract used by eval definitions. | source |
EvalMetricContext | Optional runtime context passed to metric evaluators. | source |
EvalMetricDeltaSummary | Per-metric delta between a current eval report and a baseline report. | source |
EvalMetricFamily | Metric family used for grouping report summaries. | source |
EvalMetricResult | Result emitted by a metric or check assertion. | source |
EvalMetricSummary | Aggregate pass/fail summary for one metric. | source |
EvalMetricThreshold | Numeric threshold attached to score-based metrics. | source |
EvalMockTools | Static or request-scoped mock tools for local evalAgent execution. | source |
EvalMockToolsResolver | Request-scoped mock tool resolver for local evalAgent execution. | source |
EvalMockToolsResolverContext | Context passed to an agent eval mock tool resolver. | source |
EvalModelCandidateComparison | Candidate-vs-baseline comparison used to decide whether a model is promotable. | source |
EvalModelComparison | Aggregate report for comparing one baseline model against candidate models. | source |
EvalModelComparisonConstraint | Hard model comparison eligibility constraint. | source |
EvalModelComparisonDecision | Conservative model comparison recommendation. | source |
EvalModelComparisonMetricName | Metric names available to model comparison constraints and objectives. | source |
EvalModelComparisonObjective | Weighted model comparison objective used to rank eligible candidates. | source |
EvalModelComparisonOptions | Promotion thresholds for model comparison. | source |
EvalModelReportSummary | Per-model row in an eval model comparison report. | source |
EvalRecord | One executed example and repetition inside an eval report. | source |
EvalReport | JSON-serializable report produced by runEval. | source |
EvalReportComparison | Baseline comparison for a current eval report. | source |
EvalReportComparisonPolicy | Regression policy for comparing a current eval report to a saved baseline. | source |
EvalReportDatasetMetadata | Stable dataset identity attached to new eval reports when examples are available. | source |
EvalReportExportConfig | Export configuration for a completed eval report. | source |
EvalReportMetadata | Additional report metadata that should not affect pass/fail semantics. | source |
EvalReportSummary | Aggregate pass/fail summary for one eval report. | source |
EvalRetrievedContext | Retrieved context item captured for deterministic RAG metrics. | source |
EvalRun | V2-ready Eval run projection. | source |
EvalRunProvenance | Runtime and source identity attached to an eval report. | source |
EvalSeverity | How a metric result affects the final eval result. | source |
EvalSource | Source location for a discovered eval definition. | source |
EvalSourceDocument | Studio-editable Eval source document. | source |
EvalSourcePatch | Eval source patch submitted by Studio forms. | source |
EvalSourceReference | Source location for an Eval definition. | source |
EvalStudioCapability | Capability string Studio uses for Eval source and run actions. | source |
EvalTargetKind | Primitive kind an eval can execute. | source |
EvalToolAdapter | Adapter used by runEval to execute tool targets. | source |
EvalToolAdapterContext | Context passed to a tool adapter when runEval executes an example. | source |
EvalToolAdapterResult | Tool adapter result normalized into an eval record. | source |
EvalToolCall | Tool call metadata captured during one eval record. | source |
EvalToolCallCountOptions | Options for checking how often a tool was called. | source |
EvalToolCallMatchOptions | Options for matching a required tool call. | source |
EvalToolCallStatus | Normalized status for a tool call captured during an eval record. | source |
EvalToolInput | Input accepted by evalTool. | source |
EvalToolInputMatchMode | How expected tool input is compared to the captured tool input. | source |
EvalTrace | Trace metadata captured for one eval record. | source |
EvalUsage | Token and cost usage captured for one eval record. | source |
EvalUsageSummary | Usage totals for an eval report. | source |
RunEvalOptions | Options for running an eval locally. | source |
Constants
| Name | Description | Source |
|---|---|---|
datasets | Dataset factories for inline, JSON, and JSONL eval examples. | source |
getEvalEditableFieldSchema | Schema for an editable Eval source field name. | source |
getEvalRunSchema | Schema for V2-ready Eval run projections. | source |
getEvalSourceDocumentSchema | Schema for a Studio-editable Eval source document. | source |
getEvalSourcePatchSchema | Schema for a source patch submitted from an Eval editor. | source |
getEvalSourceReferenceSchema | Schema for an Eval source reference. | source |
getEvalStudioCapabilitySchema | Schema for Eval Studio capabilities. | source |
getEvalTargetKindSchema | Schema for an Eval target primitive kind. | source |
judges | Built-in judge factories for semantic eval metrics. | source |
metrics | Metric 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
import {
assertCompleted,
assertNoMalformedCreateFileToolCalls,
buildAgentServiceEvalRequestBody,
} from "veryfront/eval/agent-service";
Components
| Name | Description | Source |
|---|---|---|
DEFAULT_AGENT_SERVICE_EVAL_ENDPOINT | Default local AG-UI endpoint used by agent-service evals. | source |
DEFAULT_DURABLE_RUN_CANARY_TIMEOUT_MS | Default value for durable run canary timeout ms. | source |
DEFAULT_LIVE_EVAL_AREA_TAG_RULES | Default value for live eval area tag rules. | source |
DEFAULT_LIVE_EVAL_ENDPOINT | Default value for live eval endpoint. | source |
DEFAULT_LIVE_EVAL_OPTIONAL_JUDGE_CASE_PREFIXES | Default value for live eval optional judge case prefixes. | source |
DURABLE_RUN_TOKEN_GROWTH_CANARY_MARKER | Marker used by the durable run token-growth canary prompt. | source |
Functions
| Name | Description | Source |
|---|---|---|
assertCompleted | Assert that a durable run canary completed successfully. | source |
assertNoMalformedCreateFileToolCalls | Assert no malformed create file tool calls helper. | source |
buildAgentServiceEvalRequestBody | Build the AG-UI request body for a single eval example. | source |
buildFailureSuffix | Builds failure suffix. | source |
buildLiveEvalCaseMetadata | Builds live eval case metadata. | source |
buildLiveEvalCaseTagSummary | Builds live eval case tag summary. | source |
buildLiveEvalRequestBody | Builds live eval request body. | source |
buildLiveEvalRuntimeSummary | Builds live eval runtime summary. | source |
buildLiveEvalStatusSummary | Builds live eval status summary. | source |
buildProgressLine | Builds progress line. | source |
buildRuntimePerformanceSummary | Builds runtime performance summary. | source |
cancelLiveEvalInputRequest | Request payload for cancel live eval input. | source |
collectAssistantText | Collect assistant text helper. | source |
containsOrderedSubsequence | Contains ordered subsequence helper. | source |
containsSkillLoad | Contains skill load helper. | source |
countStepStartedEvents | Count step started events helper. | source |
createAgentServiceEvalAdapter | Create an EvalAgentAdapter that executes examples against an AG-UI agent-service endpoint. | source |
createDurableRunCanaryApiClient | Create durable run canary API client. | source |
createDurableRunCanaryRunner | Create durable run canary runner. | source |
createDurableRunTokenGrowthCanaryCase | Create a two-turn durable run canary for historical tool-input token growth. | source |
createFailedEvalResult | Result returned from create failed eval. | source |
createLiveEvalApiClient | Create live eval API client. | source |
createLiveEvalCaseSupport | Create live eval case support. | source |
createLiveEvalConversation | Create live eval conversation. | source |
createLiveEvalProjectUploadFixture | Create live eval project upload fixture. | source |
createLiveEvalRelease | Create live eval release. | source |
createPassedEvalResult | Result returned from create passed eval. | source |
createPlainTextPdf | Create plain text pdf. | source |
createSkippedEvalResult | Result returned from create skipped eval. | source |
deleteLiveEvalConversation | Delete live eval conversation helper. | source |
deleteLiveEvalProjectFile | Delete live eval project file helper. | source |
evaluateAgentServiceEvalEnvironment | Evaluate whether the required live agent-service eval environment is present. | source |
evaluateRuntimeConfidenceEnv | Evaluate runtime confidence env helper. | source |
findAssistantMessage | Message shape for find assistant. | source |
getLiveEvalProjectFile | Return live eval project file. | source |
hasEveryLiveEvalTag | Check whether every live eval tag is present. | source |
hasFinished | Check whether finished is present. | source |
listOpenLiveEvalInputRequests | List open live eval input requests. | source |
parseDurableRunCanaryRunSummary | Parses durable run canary run summary. | source |
printRuntimeConfidencePreflight | Print runtime confidence preflight helper. | source |
resolveAgentServiceEvalEnvironment | Resolve environment values for live agent-service eval execution. | source |
resolveDurableRunCanaryEnvironment | Resolves durable run canary environment. | source |
resolveLiveEvalEnvironment | Resolves live eval environment. | source |
resolveLiveEvalRequestedCaseIds | Resolves live eval requested case IDs. | source |
runDurableRunCanaryCli | Run durable run canary cli. | source |
runLiveEvalCli | Run live eval cli. | source |
selectLiveEvalCases | Select live eval cases helper. | source |
stringifyUnknown | Stringify unknown helper. | source |
submitLiveEvalInputResponse | Response payload for submit live eval input. | source |
waitForOpenLiveEvalInputRequest | Request payload for wait for open live eval input. | source |
withLiveEvalMetadata | Applies live eval metadata. | source |
Types
| Name | Description | Source |
|---|---|---|
AgentServiceEvalAdapterConfig | Configuration for the live agent-service eval adapter. | source |
AgentServiceEvalEnvironment | Resolved environment values for live agent-service evals. | source |
AgentServiceEvalEnvironmentInput | Environment input accepted by agent-service eval helpers. | source |
AgentServiceEvalEnvironmentPreflightResult | Preflight result for a live agent-service eval environment. | source |
AgentServiceEvalForwardedProps | Veryfront forwarded props included in an AG-UI eval request. | source |
AgentServiceEvalRequestBody | AG-UI request body sent to an agent-service endpoint. | source |
BuildAgentServiceEvalRequestBodyInput | Input accepted by buildAgentServiceEvalRequestBody. | source |
BuildLiveEvalCaseMetadataInput | Input payload for build live eval case metadata. | source |
BuildLiveEvalRequestBodyInput | Input payload for build live eval request body. | source |
DurableRunCanaryApiClient | Public API contract for durable run canary API client. | source |
DurableRunCanaryApiConfig | Configuration used by durable run canary API. | source |
DurableRunCanaryCase | Public API contract for durable run canary case. | source |
DurableRunCanaryCliCaseFactoryInput | Input payload for durable run canary cli case factory. | source |
DurableRunCanaryCreateRootRunInput | Input payload for durable run canary create root run. | source |
DurableRunCanaryEnvironment | Public API contract for durable run canary environment. | source |
DurableRunCanaryExecution | Execution metadata retained for each durable run canary prompt. | source |
DurableRunCanaryMessage | Message shape for durable run canary. | source |
DurableRunCanaryPreparedCase | Public API contract for durable run canary prepared case. | source |
DurableRunCanaryResult | Result returned from durable run canary. | source |
DurableRunCanaryRunnerConfig | Configuration used by durable run canary runner. | source |
DurableRunCanaryRunSummary | Public API contract for durable run canary run summary. | source |
DurableRunCanarySendUserMessageInput | Input payload for durable run canary send user message. | source |
DurableRunCanaryStartRunInput | Input payload for durable run canary start run. | source |
DurableRunTokenGrowthCanaryCaseInput | Input payload for create durable run token-growth canary case. | source |
LiveEvalApiClient | Public API contract for live eval API client. | source |
LiveEvalApiContext | Context for live eval API. | source |
LiveEvalCase | Public API contract for live eval case. | source |
LiveEvalCaseMetadata | Public API contract for live eval case metadata. | source |
LiveEvalCaseMetadataOptions | Options accepted by live eval case metadata. | source |
LiveEvalCaseSelectionInput | Input payload for live eval case selection. | source |
LiveEvalCaseSurface | Public API contract for live eval case surface. | source |
LiveEvalCaseTagRule | Public API contract for live eval case tag rule. | source |
LiveEvalCliCaseFactoryInput | Input payload for live eval cli case factory. | source |
LiveEvalCliCaseGroups | Public API contract for live eval cli case groups. | source |
LiveEvalContext | Context for live eval. | source |
LiveEvalConversationInput | Input payload for live eval conversation. | source |
LiveEvalCreateConversationInput | Input payload for live eval create conversation. | source |
LiveEvalCreateReleaseInput | Input payload for live eval create release. | source |
LiveEvalEnvironment | Public API contract for live eval environment. | source |
LiveEvalInputRequestInput | Input payload for live eval input request. | source |
LiveEvalInputRequestRecord | Record shape for live eval input request. | source |
LiveEvalInputResponseValues | Public API contract for live eval input response values. | source |
LiveEvalProjectFile | Public API contract for live eval project file. | source |
LiveEvalProjectFileInput | Input payload for live eval project file. | source |
LiveEvalProjectFileReaderInput | Input payload for live eval project file reader. | source |
LiveEvalProjectUploadFixtureInput | Input payload for live eval project upload fixture. | source |
LiveEvalRequestBody | Public API contract for live eval request body. | source |
LiveEvalRequestTimeoutInput | Input payload for live eval request timeout. | source |
LiveEvalResultForPerformance | Public API contract for live eval result for performance. | source |
LiveEvalResultForReport | Public API contract for live eval result for report. | source |
LiveEvalResultRecord | Record shape for live eval result. | source |
LiveEvalRunnerConfig | Configuration used by live eval runner. | source |
LiveEvalRuntime | Public API contract for live eval runtime. | source |
LiveEvalSubmitInputResponseInput | Input payload for live eval submit input response. | source |
LiveEvalWaitForOpenInputRequestInput | Input payload for live eval wait for open input request. | source |
PreparedLiveEvalInput | Input payload for prepared live eval. | source |
RunDurableRunCanaryCliInput | Input payload for run durable run canary cli. | source |
RunLiveEvalCliInput | Input payload for run live eval cli. | source |
RuntimeConfidencePreflightResult | Result returned from runtime confidence preflight. | source |
RuntimePerformanceSummary | Public API contract for runtime performance summary. | source |
Constants
| Name | Description | Source |
|---|---|---|
getDurableRunCanaryMessageSchema | Zod schema for get durable run canary message. | source |