What are guardrails in AI?
Guardrails in AI (sometimes written "guard rails") are the rules and controls that keep an AI model or agent inside safe, approved boundaries. They check what goes in, such as prompt injection or sensitive data; limit what the AI can do, through action permissions; and filter what comes out, such as toxic or confidential content. In Agentforce they are set as topic restrictions, action permissions, escalation rules and output filters.
What it is
Guardrails in AI (also written "guard rails") are the controls placed around a model or agent so it behaves within policy. They work at three points: on the input, blocking prompt injection, off-topic requests and sensitive data; on actions, through permissions that limit what the agent may do; and on the output, filtering toxic, confidential or off-policy content. In Agentforce, guardrails are configured as topic restrictions (what the agent can and cannot discuss), action permissions (what operations it can perform), escalation rules (when to hand off to a human) and output filters (what it cannot say). The Atlas Reasoning Engine applies them before any action is taken, and the Einstein Trust Layer adds data masking and toxicity detection around the model.
Why it matters
Without guardrails, AI agents are unpredictable. With them, agents operate within defined boundaries — which is what enterprise buyers, compliance teams, and regulators require. Guardrails are not limitations; they are what make AI deployable in production.
Key components
- Topic restrictions
- Action permissions
- Escalation rules
- Output filters
- PII masking
How it connects
You configure guardrails in Agent Builder as part of topic and action definitions. The Trust Layer adds additional guardrails at the platform level.
Good to know
Guardrails should be tested with adversarial prompts — try to make the agent break its own rules. If you can break it in testing, customers will break it in production.
Frequently asked questions
What are AI guardrails primarily used for?
AI guardrails are primarily used to keep AI safe and on-task: stopping prompt injection and misuse, keeping sensitive data out of prompts and answers, limiting an agent to approved actions, handing hard or risky cases to a person, and blocking harmful, off-brand or non-compliant output. For a business, that is what makes an agent trustworthy enough to put in front of customers.
How are guardrails enforced in Agentforce?
Agentforce enforces guardrails in the platform, not in the prompt alone. The Atlas Reasoning Engine checks topic restrictions and action permissions before the agent acts, escalation rules route cases to a person, and the Einstein Trust Layer masks sensitive data and screens output for toxicity.
Related terms
Agentforce
Salesforce's AI agent platform that enables businesses to build, customize, and deploy autonomous AI agents across sales, service, marketing, and commerce.
Human-in-the-Loop (HITL)
A design pattern where AI systems require human approval or intervention at critical decision points before taking action.
Agent Governance
The policies, controls, and monitoring systems that ensure AI agents operate safely, compliantly, and within business-approved boundaries.
Trust Layer
Salesforce's AI trust and safety framework that ensures agents operate within compliance boundaries, prevent misuse, and maintain data security.
Guardrails in practice
Articles from the Funnelists Team that put this term to work.

Why Data Problems Stall Agentforce Pilots Before the First Workflow Ships
An Agentforce pilot often stalls before shipping the first workflow because data, scope, and governance foundations are missing. Learn the exact blockers and the sequence that gets the first workflow live.

Agentforce Governance and Security: Built-In Controls That Actually Work
Agentforce agents inherit Salesforce security and add dedicated controls for autonomous use. Learn how the Trust Layer, execution contexts, Gateway policies, and observability keep agents safe without extra tools.

What controls do you need to keep Salesforce AI data sovereign?
Learn the essential controls for Salesforce AI data sovereignty, including BYO Key for models, Trust Layer, regional deployment, Shield encryption, and Data 360 governance.

What Should You Ask a Salesforce Consultant's References Before Hiring One?
The questions to ask a Salesforce or Agentforce consultant's references, and how to tell a polite yes from a useful answer.

