An agent guardrail is a programmatic check inserted into the agent loop that inspects proposed actions or outputs before they are executed or returned. Unlike model-level safety filters that operate on token generation, agent guardrails enforce application-specific policies — such as preventing file deletion without approval, blocking API calls to unauthorized endpoints, or validating that generated SQL won't mutate production data. Guardrails are typically implemented as middleware in the agent harness and can reject, modify, or escalate actions.