Skip to content

verifier

The verifier runs; review reads. To check source text without executing it, use agencyReviewAgent instead.

Functions

buildTools

ts
buildTools(): any[]

Return the Agency verifier's tools. It reads and measures what the program left behind; it has no write tools, because a verifier that can fix things is no longer a verifier.

Returns: any[]

(source)

agencyVerifierAgent

ts
agencyVerifierAgent(
  source: string,
  task: string,
  context: string = "",
  maxCost: number = $20.00,
  maxTime: number = 15m,
  model: string = "",
  provider: string = "",
  session: string = "",
  extraTools: any[] = [],
): Result<Feedback[]>

Run an Agency program and judge its result against the task. A program that fails to run yields a single error finding rather than a failure, so callers can always read findings.

@param source - The Agency program to run @param task - What the program's result must satisfy @param context - Extra material for the judgment, or "" @param maxCost - Hard spend cap @param maxTime - Hard wall-clock cap @param model - Model override, or "" for the ambient model @param provider - Provider for the model override @param session - Session name to share a thread across calls, or "" for isolated @param extraTools - Extra tools to offer the LLM, appended to the built-in set

Parameters:

NameTypeDefault
sourcestring
taskstring
contextstring""
maxCostnumber$20.00
maxTimenumber15m
modelstring""
providerstring""
sessionstring""
extraToolsany[][]

Returns: Result<Feedback[]>

Throws: std::guard, std::run

(source)