Guardrails

Guardrails are reusable prompt policy sets. When an agent includes a guardrail set, the guardrail prompts are added to the final LLM prompt as invisible prompt adaptations so the policy applies without cluttering user-visible instructions.

Guardrails

Create versioned guardrail sets and attach them to agents as hidden prompt adaptations.

Guardrail model

A guardrail set contains one or more prompts. Default sets are read-only and available to all users; custom sets can be created, versioned, published, attached to agents, and removed through the SDK or API.

Use guardrails for safety policies, compliance rules, brand voice, escalation paths, and output contracts.
Attach guardrails to agents instead of pasting the same invisible instructions into every agent.
Publish guardrail versions before attaching them to production agents.
Default sets are read-only; custom sets are editable and versioned.

Create and attach guardrails

Use the guardrails manager to create sets and the agent guardrail methods to attach them. The execution path consumes attached guardrails as hidden prompt adaptations.

JavaScript exposes client.guardrails and client.agents guardrail helpers.
Python exposes client.guardrails and client.agents guardrail helpers.
Direct HTTP uses /v1/guardrails and /v1/agents/{agentId}/guardrails.
Create and attach a guardrail
Loading...
Guardrails over HTTP
Loading...