import { AgentJudgeEval } from "@agentium/eval";
import { Agent, openai } from "@agentium/core";
const agent = new Agent({ name: "writer", model: openai(process.env.OPENAI_MODEL ?? "gpt-6.1-sol") });
const evaluator = new AgentJudgeEval({
name: "writing-quality",
agent,
judge: openai(process.env.OPENAI_FAST_MODEL ?? "gpt-6-luna"),
criteria: [
"Response is grammatically correct",
"Response is concise (under 200 words)",
"Response directly answers the question",
],
scoringMode: "numeric",
cases: [
{ name: "explain-recursion", input: "Explain recursion in simple terms" },
],
});
try {
const result = await evaluator.run();
console.log(`${result.passed}/${result.total} passed`);
if (result.failed > 0) process.exitCode = 1;
} finally {
await agent.close();
}