An AI agent that can read data and take actions needs limits. Guardrails are those limits. No single guardrail is enough; they work in layers, from what goes in to what comes out and what the agent is allowed to do.
Layer 1: Inputs
- Check requests for attempts to make the agent ignore its instructions.
- Remove or mask personal data the agent does not need.
- Limit the documents and data the agent can retrieve to what the user is allowed to see.
Layer 2: Reasoning and outputs
- Require answers to be based on approved sources, with citations.
- Allow, and encourage, the agent to say it does not know.
- Check outputs for prohibited content, unapproved promises or policy breaches before they reach a customer.
Layer 3: Actions
- Give the agent only the system permissions it needs, nothing more.
- Set hard limits on values, volumes and types of action.
- Require human approval for actions above defined limits.
- Route every action through a gateway that logs it.
Layer 4: Monitoring
- Track volumes, error rates, overrides and complaints.
- Alert when behaviour changes suddenly.
- Make it easy to pause the agent quickly.
Test the guardrails
Guardrails should be tested like any other feature. Include deliberate attempts to break them in your evaluation set: requests for data the user should not see, attempts to trigger large actions, and questions outside the agent's scope.
The takeaway
Think of guardrails as the design of the system, not an add-on. An agent with clear, layered limits can safely be given more responsibility over time.