# Input and output guardrails

Input and output guardrails are the checks on either side of a model call. Input guardrails screen what goes in, output guardrails screen what comes back, and agents add a third check on tool calls.

## Input guardrails

They run before the model call, on the user's message and on anything else that goes into the prompt, such as retrieved documents and files. They look for:

- Unsafe requests ([content moderation](/glossary/content-moderation)).
- [Prompt injection](/glossary/prompt-injection) and jailbreak attempts.
- Personally identifiable information (PII) that should not reach the model ([PII redaction](/glossary/pii-redaction)).

A request blocked here never reaches the model.

## Output guardrails

They run after the model writes and before the reply reaches the user. They look for:

- Leaks: the system prompt, secrets, another user's data.
- Fabricated facts ([hallucination](/glossary/hallucination)).
- Unsafe content.

An input check cannot replace this one: a harmless prompt can still produce a harmful answer.

## Tool calls

An agent's output is often an action: a shell command, a piece of code, an API call. The call is checked with its arguments before it runs, because afterwards is too late. See [guardrails for tool calls](/glossary/tool-call-guardrails).

## With White Circle

[Control](/products/control) analyzes every input and output in real time, detects PII before the model call, and checks tool calls before they run.

