Skip to main content

Guardrails

Guardrails define non-negotiable boundaries for how your Agent and Subagents behave.

They are critical for reliability, compliance, and user trust.


What Guardrails protect​

Guardrails help prevent:

  • unsafe or non-compliant responses,
  • hallucinated policy claims,
  • over-broad tool execution,
  • poor escalation decisions,
  • unintended data exposure.

Input Guardrail

Output Guardrail


Guardrail layers​

Apply constraints at multiple levels:

LayerScopeBest for
Agent-levelGlobal behaviorbrand voice, safety baseline
Subagent-levelWorkflow-specificdomain-specific constraints
Tool-levelAction boundariesinput/output execution limits

Layering gives stronger control than relying on one prompt block.


Core Guardrail categories​

CategoryObjectiveExample
BehavioralResponse scope/tone“Do not provide legal advice.”
DataRetrieval and privacy limits“Use only attached Drive context.”
ActionTool invocation constraints“Require confirmation before outbound call.”
EscalationHuman handoff policy“Escalate after two failed clarifications.”

Designing effective Guardrails​

Use rules that are:

  • explicit,
  • testable,
  • scenario-aware,
  • conflict-free.

Prefer clear constraints over vague wording.


Example policy patterns​

Safety-first response policy​

  • Refuse harmful requests
  • Offer safe alternatives
  • Keep refusal concise and respectful

Data minimization policy​

  • Avoid collecting sensitive data unless required
  • Request only fields needed for task completion
  • Mask or avoid repeating sensitive values

Escalation policy​

  • Ask clarifying question when uncertainty is moderate
  • Escalate when confidence is low and impact is high

Validation checklist​

Before deployment, verify:

  • Guardrails exist at appropriate layer(s)
  • High-risk prompts are tested
  • Tool constraints are aligned with business policy
  • Escalation paths are reachable and clear
  • Subagent-specific constraints do not conflict with global constraints

Monitoring and iteration​

After deployment, review:

  • Threads for policy misses,
  • Feedback for recurring trust issues,
  • Worklist/escalation for over-trigger or under-trigger patterns.

Guardrails are living controls; refine them with real usage evidence.