Skip to main content
A Decision model answers bounded classification questions, such as whether an agent should engage, whether a request creates a commitment, or how complex a turn is. It chooses among explicit options; the agent’s primary model still writes replies and performs the work. The Decision role is configured for the installation. Each agent’s primary, fast, and heartbeat models remain separate settings. Enabling a Decision model does not by itself enable automatic answer-model selection, commitments, or dreaming.

Configure the role

Open Settings → Models → Decision model. Turn on Use a decision model and choose a source, or turn it off to use supported text-model classifiers. These are the defaults declared by Mesh, not a list of the provider’s latest available models. Explicit TypeSafe and OpenRouter sources allow a model override; blank uses the provider default. Automatic resolves its own model. The settings page reports the effective route and billing source for each agent. The optional text classification model override must be usable through each agent’s own provider. It affects classification when native decisions are off; drafting and extraction retain their normal model roles. Changing the Decision source preserves the other source’s stored key. Keys pay for model usage and do not change the agent’s identity or connected accounts. Test saved connection sends synthetic text to the saved explicit native account. Automatic mode has no single account to test. A successful test checks connectivity and protocol behavior, not predictive accuracy.

Where decisions are used

Current native consumers include:
  • Engagement and conversational consent classification.
  • Memory sensitivity and dreaming relevance selection.
  • Commitment proposal assent, incoming-task capture, task association, human answers, and suitable semantic completion checks.
  • Tool preselection and request-complexity classification for automatic model selection.
  • Other bounded runtime choices, such as the topic of a completion reaction.
The tool preselection decision narrows the set of capabilities offered for a turn; it does not grant new accounts or tool permissions. Task completion still needs actual artifacts or observations, not a worker’s unsupported assertion.

Uncertainty and failure

Native calls have bounded input and response bodies, no tools, and normally a four-second deadline; individual consumers can use a tighter bound. Their acceptance thresholds compare the selected option’s probability, not an entropy-based confidence score. Thresholds vary by task: model routing uses 0.50, dreaming relevance uses 0.80, commitment assent uses 0.90, and the default incoming commitment threshold is 0.95. An abstention or low probability follows that feature’s conservative path. For example, uncertain sensitivity cannot grant sharing, uncertain incoming-task capture leaves the message to the serving model as an ordinary turn, and uncertain routing retains an eligible fallback. Provider errors are not negative classifications. Malformed probabilities, missing answers, and invalid choices are errors. Mesh does not retry native calls or silently switch providers after a native Decision failure. Using a text classifier when no native route is configured is a separate configuration path, not error fallback. Automatic model selection is an exception to the general text-classifier path: without native decisions it keeps its conservative answer-model fallback. Classification quality depends on the selected model and the workload. Protocol and integration tests do not establish real-world accuracy. Use shadow capture or routing where available, review disagreements, and evaluate representative requests before relying on a new classifier for consequential decisions.

Audit and retention

Production native calls record their exact request before inference and finalize the response, model/provider identity, probability distribution, outcome, latency, and reported usage afterward. Audit failures prevent use of the result. Interrupted calls are marked failed by maintenance. Some text classifiers also record their calls on this ledger. Request and response bodies can contain private conversation evidence. They are stored in PostgreSQL under agent-scoped operator access, rather than copied to public logs. An operator can inspect:
  • GET /api/agents/{slug}/decision-calls for paginated summaries.
  • GET /api/agents/{slug}/decision-calls/{id} for an individual call and its body.
The Decision settings’ body_retention_days accepts 0 to retain bodies indefinitely, or 1–3650 to prune expired bodies. Attribution, outcomes, and usage metadata survive pruning. Native Decision usage is recorded separately from the primary turn’s token total. Synthetic connection diagnostics contain no conversation data and do not create agent invocation records. See the operator API for configuration, credential handling, and read permissions. Source routing is centralized in internal/model/providers/providers.go; the native protocol and audit logic live in internal/decision.