Strict LLM-as-judge gate for synthesized agent specs.
Constructed once per agency strategy execution; reused across multiple spawn_specialist calls. Stateless aside from the immutable config.
spawn_specialist
const judge = new EmergentAgentJudge({ judgeModel: 'gpt-4o-mini', generateText: async (model, prompt) => callLlm(model, prompt),});const verdict = await judge.reviewAgent(spec);if (!verdict.approved) { return { success: false, data: `Judge rejected: ${verdict.reason}` };} Copy
const judge = new EmergentAgentJudge({ judgeModel: 'gpt-4o-mini', generateText: async (model, prompt) => callLlm(model, prompt),});const verdict = await judge.reviewAgent(spec);if (!verdict.approved) { return { success: false, data: `Judge rejected: ${verdict.reason}` };}
Evaluate an agent spec. Never throws — all failure paths return a structured rejection so the caller can surface a clean error to the manager LLM.
Strict LLM-as-judge gate for synthesized agent specs.
Constructed once per agency strategy execution; reused across multiple
spawn_specialistcalls. Stateless aside from the immutable config.Example