Skip to content

verifier ​

The verifier checks the returned value and can inspect files the program created. A program that cannot run produces an error finding. Use agencyReviewAgent to check source without executing it.

A stopped run may return saved partial findings. A failed judgment returns no findings, so an empty list alone does not prove the program passed.

Functions ​

buildTools ​

ts
buildTools(): any[]

Return the Agency verifier's file inspection and command execution tools.

Returns: any[]

(source)

agencyVerifierAgent ​

ts
agencyVerifierAgent(
  source: string,
  task: 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 a task. Run failures become error findings, and a failed judgment returns no findings.

Parameters:

NameTypeDefaultDescription
sourcestring
taskstring
maxCostnumber$20.00Cost budget in USD.
maxTimenumber15mTime budget in milliseconds.
modelstring""Model override for the judgment, or "" for the ambient model.
providerstring""Provider for the judgment model, ignored when model is empty.
sessionstring""Name a judgment conversation to reuse, or "" for an isolated thread.
extraToolsany[][]Additional tools for judging the program's result.

Returns: Result<Feedback[]>

Throws: std::guard, std::run

Needs: fileRead, fileWrite, subprocess

(source)