@mastra/core
Version:
30 lines • 1.57 kB
TypeScript
import type { AgentMemoryOption, ToolsInput } from '../../agent/types.js';
import type { ScorerJudgeConfig } from '../../evals/index.js';
import type { MastraModelConfig } from '../../llm/index.js';
import type { Mastra } from '../../mastra/index.js';
import type { MastraMemory } from '../../memory/index.js';
import type { RequestContext } from '../../request-context/index.js';
/**
* Build the default goal scorer: an LLM judge using `judgeModel` and the
* effective `prompt` (the ported MastraCode judge prompt unless overridden).
* The objective and the agent's latest output are passed by the goal step on the
* scorer run input (`originalTask`/`currentText`).
*
* When `tools` is provided, the judge agent can call them (read-only verification
* tools) before deciding, matching the original MastraCode judge's tool surface.
*/
export declare function createGoalScorer({ judgeModel, prompt, tools, memory, defaultMemoryOptions, onStream, maxSteps, mastra, requestContext, }: {
judgeModel: MastraModelConfig;
prompt?: string;
tools?: ToolsInput;
memory?: MastraMemory;
defaultMemoryOptions?: AgentMemoryOption;
onStream?: ScorerJudgeConfig['onStream'];
maxSteps?: number;
mastra?: Mastra;
requestContext?: RequestContext<any>;
}): import("../../evals").MastraScorer<"goal-scorer", any, any, Record<"analyzeStepResult", {
decision: "continue" | "done" | "waiting";
reason: string;
}> & Record<"generateScoreStepResult", number> & Record<"generateReasonStepResult", string>>;
//# sourceMappingURL=scorer.d.ts.map