How to Attach, Edit, Duplicate, and Destroy Guardrailspublic
Validated on 25 Apr 2025 • Last edited on 4 Jun 2025
The DigitalOcean GenAI Platform lets you work with popular foundation models and build GPU-powered AI agents with fully-managed deployment, or send direct requests using serverless inference. Create agents that incorporate guardrails, functions, agent routing, and retrieval-augmented generation (RAG) pipelines with knowledge bases.
Use guardrails to manage how your agent responds to sensitive, inappropriate, or unsafe content. A guardrail overrides the agent’s output when it detects issues in the input or response (for example, blocking login credentials or credit card numbers).
You can attach guardrails to agents, customize their behavior, duplicate them for different use cases, or destroy ones you no longer need.
We support three types of guardrails:
-
Sensitive Data: Identifies and anonymizes various categories of sensitive information, including credit card numbers, personally identifiable information, and location data.
-
Jailbreak: Helps your agent maintain proper functionality by preventing malicious inputs.
-
Content Moderation: Controls agent output by filtering responses related to inappropriate content categories, including violence and hate, sexual content, weapons, regulated substances, self-harm, and illegal activities.
Attach Guardrails
Attach guardrails to your agent to filter out sensitive or harmful content before it reaches users. You can add one or more guardrails based on your use case.
To attach guardrails to an agent from the DigitalOcean Control Panel, in the left-hand menu, select GenAI Platform, then click the Agents tab.
On the Agents page, click the agent you want to update. On the agent’s overview page, click the Resources tab.
On the Resources page, under the GUARDRAILS section, click Add guardrails to open the Add guardrails window, then select the guardrails you want to attach. Either click Select All to add all available guardrails, or choose specific ones based on your specific needs.
Under the Guardrail token cost section, review your price summary. Guardrail usage is tracked per agent and billed based on usage. For guardrail pricing details, see our pricing page.
Afterwards, click Save to attach the selected guardrails.
To view or manage your agent’s guardrails from the agent’s overview page, go to the Resources tab and look under GUARDRAILS. You can also manage all guardrails from the GenAI Platform page under the Guardrails tab.
Attach or Detach Guardrails for Multiple Agents
To attach or detach multiple agents to a guardrail, go to the DigitalOcean Control Panel, in the left-hand menu, select GenAI Platform, then click the Guardrails tab.
Under the Guardrails page, find the guardrail you want to update, click the … menu, then click Attach Agents to open the Manage Agents window.
In the Manage Agents window, select the agents you want to attach or detach, then click Update to save your changes.
Edit Guardrails
Edit a guardrail to update its name, default response, detection settings, or to attach it to agents. Editing a guardrail doesn’t change its price.
To edit your guardrails, go to the DigitalOcean Control Panel, in the left-hand menu, select GenAI Platform, then click the Guardrails tab.
Under the Guardrails page, find the guardrail you want to edit, click …, then click Edit Guardrail to open the editing page.
On the guardrail’s editing page, under the Guardrail details section, edit the Default agent response. This is the message the agent sends when the guardrail is triggered and it can’t answer the user’s input. The default response is:
“I’m not able to respond to that request, but I can answer other questions. How can I help you with something else?”
For the sensitive data guardrail, customize which types of sensitive data it detects. By default, it detects all categories. You can detect sensitive data globally or by country. Either select all available categories or choose only the specific categories you want the guardrail to detect.
We detect the following categories:
To customize detection, click Customize categories, then select the categories you want the guardrail to detect.
Under the Attach Agents (Optional) section, optionally select agents to attach to the guardrail.
Under the Guardrail token cost section, review the updated price, then click Update Guardrail to update your guardrail.
Duplicate Guardrails
Duplicate a guardrail to create a custom version for specific agents. This lets you reuse the same base rules with different names, responses, or detection settings. You can only duplicate original guardrails, not ones that have already been duplicated.
To duplicate a guardrail, go to the DigitalOcean Control Panel, in the left-hand menu, select GenAI Platform, then click the Guardrails tab.
On the Guardrails page, find the guardrail you want to duplicate, click the … menu, then click Duplicate Guardrail to open the duplication page.
On the duplication page, under the Guardrail details section, edit the Guardrail name and Guardrail description. You can either provide your own or use the auto-generated versions from the original guardrail.
After editing the name and description, edit your duplicated guardrail similarly to editing an original. You can update the agent response, customize sensitive data categories, attach agents, and review the token cost.
When you’re done, click Duplicate Guardrail to create your guardrail duplicate.
Destroy Duplicated Guardrails
Destroy a guardrail when you no longer need it. You can only destroy duplicated guardrails, not originals. Destroying a guardrail permanently deletes its settings and detaches it from any agents it’s attached to. To stop using an original guardrail, detach it from your agents.
To destroy a duplicated guardrail, go to the DigitalOcean Control Panel, in the left-hand menu, select GenAI Platform, then click the Guardrails tab.
Under the Guardrails page, find the duplicated guardrail you want to destroy, click the … menu, then click Destroy to open the Destroy guardrail window.
In the Destroy guardrail window, type the guardrail name into the textbox to confirm, then click Destroy.