Judgments & Decisions
MindRoom's judgment layer answers fast, tool-less yes/no and multiple-choice questions without running a full agent turn.
It checks inputs for sensitive data and can use TypeSafe / System One (jev-*), the OpenAI Decisions API, or a configured LLM model alias.
Routing, thread behavior, model switching, contacts, triggers, search reranking, and plugins all use this layer.
Where Judgments Are Used
The thresholds below are the defaults at each use site.
For single decisions, thresholds apply to probability backends (typesafe and openai_decisions), not to llm.
| Use site | Settings | Default threshold | Backend selection and fallback |
|---|---|---|---|
| Routing & responder selection | router.judgment, router.threshold |
0.65 |
Inherits judgments.default; "disabled" is allowed. Without a judge, responder selection uses router.model with any room or thread model override, and ad hoc team mode uses router.model directly. |
| Adaptive participation | defaults.participation or agents.<id>.participation |
0.5 |
Opt-in block; inherits judgments.default when enabled. "disabled" is allowed. Without a judge, the agent's reply model decides. |
| Mid-turn coalescing | defaults.mid_turn or agents.<id>.mid_turn |
0.8 |
Opt-in block; requires a backend and inherits judgments.default when enabled. "disabled" is rejected; opt out with enabled: false. |
| Cold-cache model switching | defaults.cold_cache or agents.<id>.cold_cache |
0.8 |
Opt-in block and compatible cheap_model; inherits judgments.default when enabled. "disabled" is allowed. Without a judge, cheap_model itself decides. |
| Agent contact rule checks | contacts.judgment, contacts.threshold |
0.8 |
Active when contacts is configured; inherits judgments.default. "disabled" is allowed. Without a judge, skips the check and warns at startup or reload if rules exist, unless explicitly disabled. A judged check fails closed. |
| Reactive trigger triage | triage_judgment, triage_threshold |
0.8 |
Runs when triage_instructions is set; inherits judgments.default and rejects "disabled". False, None, an error, or unknown_judgment prevents firing. |
| Memory & knowledge reranking | reranker: |
0.3 for typesafe and openai_decisions; 0.5 for other rerankers |
Separate from judgments:; never inherits judgments.default and does not accept llm. Judgment reranking has its own eight-slot limit. |
| Plugins & hooks | Plugin-specific settings; judgment:completed |
Plugin-specific | Plugins choose how to judge; the observer hook reports completed evaluations and does not select a backend. |
- Routing asks who should answer an untagged room message or an OpenAI-compatible
model="auto"request, and which responder should take a follow-up in a thread with multiple eligible responders. It also asks whether an ad hoc team should split distinct subtasks (coordinate) or work together on a shared task (collaborate). - Adaptive participation asks whether an agent should reply to an untagged message in a multi-human thread it has already answered in. It runs separately for each eligible agent after the quiet window.
- Mid-turn coalescing asks whether queued messages can wait for the active task to finish or need the agent to wrap up and respond sooner.
It runs between completed tool batches and never interrupts a running tool.
With background tool jobs enabled, it also decides whether an incoming message (in default
automode) moves a waiting tool call to the background, where the work continues as a job; a reply that is only waiting on its background jobs is released at once without a judgment (explicitqueuemessages keep waiting without invoking the judge). - Cold-cache switching asks whether a cheaper model can continue the whole conversation just as well. It runs on eligible thread turns after the reply model's cache has gone cold, not before the agent's first reply in the thread.
- Contacts asks whether an outgoing message follows the rules for that contact before the agent sends it. If the judge does not approve, nothing is sent.
- Trigger triage asks whether a matching event meets the operator's or trigger author's instructions before waking an agent. Only a yes fires the trigger.
- Reranking asks whether each retrieved chunk helps answer the query, then uses the yes probabilities to rank knowledge and eligible memory results. The threshold controls which results automatic memory recall adds.
- Plugins can ask their own questions:
response-audit-pluginchecks delivered answers for unsupported factual claims, andinjection-guard-pluginchecks outside text in tool results before the model reads it. Usejudgment:completedto observe an evaluation without changing its result.
Judgment Backends
Define reusable backends by alias in the top-level judgments: registry.
Set threshold at the use site, not in a registry entry.
| Field | Backend | Default | Description |
|---|---|---|---|
provider |
All | Required | typesafe for System One, openai_decisions for the OpenAI Decisions API, or llm for a configured model alias |
model |
llm |
Required | Existing alias under models, which can be cheaper than the reply model |
credentials_service |
openai_decisions |
null |
Credential service holding the OpenAI API key instead of the OpenAI model credential |
timeout_seconds |
All | 5 for llm, otherwise 1.5 |
Positive deadline of at most 30 seconds; for participation, it starts after debounce_seconds |
defaultis selected when an active site'sjudgmentis unset ornull(ortriage_judgmentis omitted). Defining it automatically covers routing, configured contacts, enabled participation, mid-turn and cold-cache blocks, and active trigger triage; it does not turn on any opt-in agent feature and never applies toreranker:.- Other aliases are used only when explicitly selected, including through a
defaultsblock. "disabled"is reserved, not a registry alias. It skips the separate backend for routing, participation, cold-cache switching, and contact checks; mid-turn coalescing and trigger triage reject it.
Provider credentials
- TypeSafe: Set
TYPESAFE_API_KEYin the process environment or the.envnext toconfig.yaml. - OpenAI Decisions: This backend uses
gpt-6-lunaand the same key as OpenAI models, fromOPENAI_API_KEYor the dashboard. It always callsapi.openai.com, regardless of a model'sbase_url. If the model credential holds a proxy key, setcredentials_serviceto a service holding a real OpenAI key. If that named service has no key, MindRoom skips the backend rather than falling back to the OpenAI model credential. Custom service names have no environment variable; add the service'sapi_keyin the dashboard or via credential seeds. - LLM: MindRoom uses the alias's normal provider credentials but sends no tools, agent system prompt, or agent memory. It refuses model aliases whose providers add native tools that cannot be disabled.
All registry backends receive the same question and context, but their decisions can differ.
Agent-Wide Defaults & Per-Agent Overrides
Set defaults.participation, defaults.mid_turn, or defaults.cold_cache to opt agents into that feature; {} enables it with built-in settings.
Set defaults.cheap_model to share a cheaper model alias, or agents.<id>.cheap_model to take precedence for one agent.
The cheap model must differ from the reply model and meet the context-window requirements.
Inherited cold-cache settings skip agents without a compatible cheap model.
MindRoom warns if no agent has a cheap model or if an inherited cheap model is incompatible; explicitly enabling agents.<id>.cold_cache without a compatible model fails config validation.
Per-agent blocks merge field by field with defaults.
Omit the block or set it to null to inherit it in full; set enabled: false to opt out.
An explicitly configured agent block enables the feature unless it sets enabled: false; other omitted fields inherit their defaults.
judgment: null clears an inherited alias and resolves through judgments.default, and instructions: "" clears inherited guidance where supported.
This config.yaml uses TYPESAFE_API_KEY and OPENAI_API_KEY.
Routing, mid-turn coalescing, cold-cache switching, and contacts use judgments.default; participation uses classifier except on assistant, which clears that override and its guidance.
models:
default:
provider: openai
id: gpt-6.2-sol
fast:
provider: openai
id: gpt-6-luna
judgments:
default:
provider: llm
model: fast
classifier:
provider: typesafe
router:
model: fast
defaults:
participation:
judgment: classifier
instructions: "Reply only when you can add something useful."
mid_turn: {}
cold_cache: {}
agents:
assistant:
display_name: Assistant
rooms: [lobby]
cheap_model: fast
participation:
judgment: null
instructions: ""
helper:
display_name: Helper
rooms: [lobby]
cold_cache:
enabled: false
personal_agents:
companion:
agent:
display_name: Companion
contacts:
rules: ["Share only information the owner has approved for this contact."]
personal_rooms:
agent: companion
onboarding_rooms: [lobby]
Use Dashboard Settings → Judgments to edit the registry and agent-wide defaults. The agent editor previews inherited defaults before you override them.
Concurrency, Redaction, Logging & Hooks
- Concurrency: At most eight judgments run at once per MindRoom process, with at most one per owner (each agent, each trigger, one shared responder-selection router slot, and one shared ad hoc team-mode slot). A judgment that hits a limit fails immediately rather than queueing. Reranking uses a separate pool of eight slots.
- Inputs: Single-question judgment inputs are capped at 16,000 bytes before provider encoding; rerank batches are capped at 128,000 bytes (including the encoded batch request). MindRoom checks for credential-like text, skipping decisions with unsafe essential inputs and redacting sensitive values in rerank inputs. These checks are not a guarantee that ordinary message text or tool previews contain no private information; see each use site's context rules.
- Logs:
Judgment evaluatedrecords the backend, model, decision, latency, token usage when available, input size, and failure category, plus probability and threshold for TypeSafe and OpenAI Decisions. It does not log request text or credentials. Use-site logs such asParticipation judgedandMid-turn judgment skippedexplain local outcomes and fallbacks. - Hook:
judgment:completedruns in the background after an evaluation answers, abstains, fails, or is cancelled. Its summary includes the outcome and provider attempts, not the prompt, candidate text, or raw exceptions.