> ## Documentation Index
> Fetch the complete documentation index at: https://silmaril.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Modes and enforcement

> Choose how a verdict affects execution and how your application handles failed checks.

A classification evaluates an event. Your integration applies the result before the protected action or content is consumed.

## Read the decision

Check `prediction` and the optional `governance.action`. A malicious prediction or a governance action of `block` is a would-block decision. Governance can block an event whose prediction is `BENIGN`.

| Effective mode | Would-block decision | Allowed decision |
| - | - | - |
| Block | Stop the event | Continue |
| Warn | Report the finding and continue | Continue |
| Shadow | Record the finding and continue | Continue |

The returned score and threshold are diagnostic fields. Route on the verdict and applicable governance decision. Use [outcomes](https://silmaril.dev/docs/sdk/outcomes.md) for additional malicious-result detail.

## Apply the result

| Integration | Block behavior |
| - | - |
| TypeScript direct `classify()` | Returns the verdict. Your code stops the event |
| Python, Go, and Java direct calls | Raise or return a blocking error in effective Block mode |
| LangChain callbacks | Raise a blocking exception in effective Block mode |
| Deep Agents | Replace denied content with safe messages in effective Block mode |
| Vercel AI SDK | Input middleware can block. Classify generated text before returning it |
| LiteLLM | Uses the configured guardrail response behavior |

Choose Shadow or Warn explicitly when observing. Python and Go use a Block fallback when the response and local configuration omit a mode. Framework adapters resolve their own override first, then the client setting, then an optional response mode, then Block. Current classify responses omit `mode`. SDK results preserve explicit local choices. Java examples choose a mode explicitly.

## Handle a failed check

An API, network, timeout, or cancellation error leaves the event without a verdict. Choose whether that boundary stops or continues when classification fails.

Deep Agents allows execution on classification errors by default. Set `failOpen: false` in TypeScript or `fail_open: False` in Python when execution requires a completed check. The LiteLLM starter uses `unreachable_fallback: fail_open`. Check each [integration guide](https://silmaril.dev/docs/integrations/frameworks.md) for its error policy.

## Enable blocking

Start with observation and [verify connected boundaries](https://silmaril.dev/docs/start/verify.md). Review would-block findings, choose the error policy, then enable Block on the intended boundary. Repeat verification after changing the mode.

For streaming output, buffer and classify content before delivery when blocking must prevent exposure. Checks cover the paths connected to Silmaril. Route every protected operation through those paths.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.