Interface: EmergentJudgeConfig
Defined in: packages/agentos/src/cognition/emergent/EmergentJudge.ts:98
Configuration for the EmergentJudge.
All LLM interaction is abstracted behind the generateText callback,
making the judge model-agnostic and easily testable with mocks.
Properties
generateText()
generateText: (
model,prompt) =>Promise<string>
Defined in: packages/agentos/src/cognition/emergent/EmergentJudge.ts:123
Callback that invokes an LLM to generate text from a prompt. The judge calls this for creation reviews and promotion panels.
Parameters
model
string
The model ID to use for generation.
prompt
string
The full prompt string to send to the LLM.
Returns
Promise<string>
The raw text response from the LLM.
generateTextWithSystem()?
optionalgenerateTextWithSystem: (model,system,user) =>Promise<string>
Defined in: packages/agentos/src/cognition/emergent/EmergentJudge.ts:153
Optional structured callback that receives a stable system prefix and
a candidate-specific user payload separately. When supplied, the
judge prefers this path over generateText so hosts can attach
provider-level prompt caching (e.g. Anthropic cache_control: ephemeral
or OpenAI automatic prefix cache) to the shared rubric. A 10-20 call
run on Anthropic sees ~25% judge cost reduction once the ~500-token
rubric hits the cache on call 2+.
Hosts that do not care about caching may omit this field; the judge
falls back to concatenating system + '\n\n' + user and calling the
legacy generateText path, which preserves behavior exactly.
Parameters
model
string
Model ID to use for generation.
system
string
Stable rubric text. Safe to mark cacheable.
user
string
Candidate-specific payload that varies per call.
Returns
Promise<string>
The raw text response from the LLM.
judgeModel
judgeModel:
string
Defined in: packages/agentos/src/cognition/emergent/EmergentJudge.ts:105
Model ID used for the single-pass creation review. Should be a fast, cost-efficient model since correctness is primarily validated through test cases.
Example
"gpt-4o-mini"
promotionModel
promotionModel:
string
Defined in: packages/agentos/src/cognition/emergent/EmergentJudge.ts:113
Model ID used by both reviewers in the promotion panel.
Should be a more capable model than judgeModel since promotion
decisions are higher-stakes.
Example
"gpt-4o"
providerId?
optionalproviderId:string| () =>string|undefined
Defined in: packages/agentos/src/cognition/emergent/EmergentJudge.ts:133
The provider the host's generateText calls for the judge, written into a forge trace's provenance as the
verdict's provider. A function is called each time a review request is sent, in the same synchronous step as the
call to generateText, so a host whose callback picks its provider when it is called names the provider that
request went to. Absent, or a function that returns no string or throws, means AgentOS does not know it, and the
trace says null.
Example
"openai"