Guardrails | WRITER Knowledge Base

Guardrails

Last updated 9 days ago

Who can use this feature

Guardrail overview

Ensure safe and compliant agent actions at scale, reducing reputational and financial risk. AI Studio is your central hub to create, manage, and enforce guardrails at the model and agent level, enabling granular enforcement and auditability. Integration with third parties, such as Amazon Bedrock, Azure Prompt Shield, and Azure Text Moderation, to support consistency with existing systems and centralized management. For full technical details about guardrails in AI Studio, see our dev docs here.

What are guardrails?

Guardrails are safety and compliance controls that monitor and filter AI agent inputs and outputs. They help you:

Guardrails run at different stages of the AI interaction and can be configured to block content, log violations, or both.

Why use guardrails?

Risk Mitigation: Automatically prevent data leaks, toxic outputs, and compliance violations before they reach users.

Centralized Control: Configure guardrails once and apply them across multiple agents and teams.

Compliance Enforcement: Meet regulatory requirements with automated content filtering and detailed audit logs.

Brand Protection: Ensure all AI outputs align with your organization's values and policies.

Adding guardrails

From AI Studio navigate to Models & Guardrails > Guardrails > +Add guardrail to get started.

Once you’ve launched the modal for adding a guardrail you will be taken through various steps where you will need to add credentials from your guardrail provider. Please take a look at our dev docs for more details here.

Understanding guardrail modes

Guardrails can run at different stages of the AI interaction. You can select multiple modes for comprehensive protection.

Pre-call mode

When it runs: Before the LLM processes the request

What it checks: User input only

Use cases:

Benefits:

Example:

User input: "My credit card number is 1234-5678-9012-3456"
→ Guardrail blocks before LLM sees it
→ User receives: "Please don't include sensitive financial information"

Post-call mode

When it runs: After the LLM generates a response

What it checks: LLM output only

Use cases:

Benefits:

Example:

LLM generates: "Sure, you can reach our CEO at 555-0123"
→ Guardrail detects phone number pattern
→ Response blocked or PII redacted
→ User receives safe version or error message

During-call mode

When it runs: In parallel with the LLM call

What it checks: Can monitor both input and output in real-time

Use cases:

Benefits:

Trade-offs:

Example:

While LLM processes request, guardrail analyzes input
→ Both complete simultaneously
→ Results combined before user sees response

Combining multiple modes

You can select multiple modes for comprehensive protection. Example:

Managing guardrails

Once you’ve completed the guardrail set up process you’ll be able to manage it from the list by selecting the three dot icon on the right. From here you can edit or delete the guardrail. To learn more please see our dev docs.

Deleting a guardrail

⚠ Warning: Deleting a guardrail removes it from all agents using it. Agents will continue to operate as designed, but without the guardrails.

To delete a guardrail:

  1. Click the three-dot menu
  2. Select Delete

Enabling/disabling guardrails

You can temporarily disable a guardrail if you’d like to remove it from your agents without having to recreate the configuration. Agents will continue to run without the guardrail check until it is re-enabled.

Best practices

Choosing the right guardrail mode

For customer-facing agents:

For internal agents:

For development/testing environments:

Recommended guardrail combinations

FAQs

What will agent users experience if they run into a guardrail?

The user experience differs by agent and guardrail type. The error shows the configured error message (configured in the third-party guardrail provider). WRITER no-code agents will surface it as an error. In the API, you’ll get an error message back with these details. In chat agents users will see a message in the dialog window explaining the error. Here is an example

What happens in streaming vs. non-streaming responses?

Can I use multiple guardrail providers at the same time?

Yes you can use all currently available providers: Amazon Bedrock, Azure Prompt Shield, and Azure Text Moderation.

Do I need to be a Bedrock or Azure customer in order to set up guardrails?

Yes, at this time guardrails are only available through Amazon Bedrock and Azure.

Do Bedrock guardrails only apply to Bedrock models or to Palmyra models as well?

Bedrock guardrails apply for any Bedrock models and Palmyra models, custom agents, and the API.

Can I apply different guardrails to different agents?

At this time guardrails are organization wide.

I don't see the Guardrails option in AI Studio

Possible causes:

Solutions:

  1. Check your role: You must be an Org admin or IT admin role
    • Contact your organization administrator to verify or update your permissions
  2. Check your plan: Guardrails are only available on Enterprise plans
    • Contact your account manager
  3. Browser cache: Try clearing your browser cache and logging in again
  4. Still not visible: Contact support@writer.com

Are guardrails applied retroactively to existing agents?

Guardrails are configured by admins in AI Studio and apply automatically. There's no opt-in mechanism for agents or API users.

When you create a new guardrail, it immediately applies to all agents within its scope. No agent reconfiguration needed.

What compliance standards do guardrails help meet?

Guardrails can help organizations meet various regulatory and compliance requirements:

Important: While guardrails are powerful compliance tools, they should be part of a comprehensive compliance program. Consult with your compliance and legal teams about your specific requirements.