Guardrails
Guardrails are checks and limits around an AI system that keep its inputs, outputs, and actions within allowed bounds.
Guardrails are rules that constrain what an AI system accepts, produces, or does. They sit around the model rather than inside it. Some check the input before it reaches the model, and others check the output before it reaches a user or a tool. For agents, guardrails also limit which actions the agent may take and with what arguments.
Guardrails take many forms. Simple ones are filters and validators, such as a check that an output matches a schema or contains no personal data. Others use a second model to classify content, or require a person to approve certain actions. Agent harnesses often implement guardrails as permission rules and hooks that run before each tool call.
No single guardrail is complete, so systems combine several. Limits on the environment are among the strongest, because they hold even when a check is missed. A sandbox restricts what an agent's actions can reach, such as the files, network, and credentials available to it. Guardrails on the model and limits on the environment work together.
Related terms