# How to Attach, Edit, Duplicate, and Destroy Agent Guardrails on DigitalOcean Gradient™ AI Platform DigitalOcean Gradient™ AI Platform lets you build fully-managed AI agents with knowledge bases for retrieval-augmented generation, multi-agent routing, guardrails, and more, or use serverless inference to make direct requests to popular foundation models. 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). **Note**: For agents you build and deploy using Agent Development Kit, guardrails offered by DigitalOcean are not available. You can attach guardrails to agents, customize their behavior, duplicate them for different use cases, and 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. If your agent handles sensitive data, you can review our [data privacy page](https://docs.digitalocean.com/products/gradient-ai-platform/details/data-privacy/index.html.md) to learn how we manage your data. ## 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](https://cloud.digitalocean.com), click **Agent Platform** in the left menu, then in the **Agent Workspaces** tab, select the workspace that contains the agent you want to attach guardrails to. From the workspace’s **Agents** tab, click the agent, then on its **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](https://docs.digitalocean.com/products/gradient-ai-platform/details/pricing/index.html.md#guardrails). 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 **Agent 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](https://cloud.digitalocean.com), in the left-hand menu, select **Agent 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](https://docs.digitalocean.com/products/gradient-ai-platform/details/pricing/index.html.md#guardrails). To edit your guardrails, go to the [DigitalOcean Control Panel](https://cloud.digitalocean.com), in the left menu, select **Agent Platform**, and then click the **Guardrails** tab. Under the **Guardrails** page, find the guardrail you want to edit, click **…**, and 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. ## Click to view the global and country-specific sensitive data categories that we detect. ### Global | Data Type | Description | Example | |---|---|---| | Credit card number | 12 to 19 digits. | `4111 1111 1111 1111` | | Cryptocurrency wallet address | Bitcoin addresses only. | `1BoatSLRHtKNngkdXEeobR76b53LETtpyT` | | Date or time | Specific dates, times, or durations. | `2025-04-24`, `3 hours ago` | | Email address | Email inbox address. | `user@example.com` | | International Bank Account Number (IBAN) | International bank account number. | `GB29 NWBK 6016 1331 9268 19` | | Internet Protocol (IP) address | IPv4 and IPv6. | `192.168.1.1`, `2001:0db8:85a3::8a2e:0370:7334` | | Nationality, religion, or political affiliation | Affiliation group. | `Canadian`, `Buddhist`, `Liberal` | | Location | Geographical or political location. | `Toronto`, `Bavaria` | | Person | Names and initials. | `John D. Smith` | | Phone number | Telephone number. | `+1-202-555-0143` | | Medical license number | Standard license identifiers. | `ME123456` | | Uniform Resource Locator (URL) | Web address. | `https://example.com` | ### United States (US) | Data Type | Description | Example | |---|---|---| | US bank account number | 8 to 17 digits. | `12345678901234567` | | US driver license number | A US driver license number. | `D1234567` | | Individual Taxpayer Identification Number (ITIN) | 9 digits, starts with 9, 7 or 8 as 4th digit. | `912-78-1234` | | US passport number | 9-digit US passport number. | `123456789` | | Social Security Number (SSN) | 9-digit SSN. | `123-45-6789` | ### United Kingdom (UK) | Data Type | Description | Example | |---|---|---| | National Health Service (NHS) number | UK National Health Service number. | `943 476 5919` | ### Spain | Data Type | Description | Example | |---|---|---| | Número de Identificación Fiscal (NIF) | Spanish personal tax ID. | `12345678Z` | | Número de Identidad de Extranjero (NIE) | Foreigners ID card. | `X1234567T` | ### Italy | Data Type | Description | Example | |---|---|---| | Fiscal code | Personal identification code. | `RSSMRA85M01H501U` | | Italian driver license number | Italian driver license number. | `AB1234567` | | Value Added Tax (VAT) code | Italian VAT code. | `12345678901` | | Italian passport number | Italian passport number. | `YA1234567` | | Italian identity card number | Italian identity card number. | `CA1234567` | ### Poland | Data Type | Description | Example | |---|---|---| | Universal Electronic System for Registration of the Population (PESEL) | Polish ID number. | `44051401359` | ### Singapore | Data Type | Description | Example | |---|---|---| | National Registration Identity Card (NRIC) / Foreign Identification Number (FIN) | National ID card. | `S1234567D` | | Unique Entity Number (UEN) | Unique Entity Number. | `201234567W` | ### Australia | Data Type | Description | Example | |---|---|---| | Australian Business Number (ABN) | 11-digit business identifier. | `51824753556` | | Australian Company Number (ACN) | 9-digit company number. | `004085616` | | Tax File Number (TFN) | Tax file number. | `123456782` | | Medicare number | Health system ID. | `2345 67890 1` | ### India | Data Type | Description | Example | |---|---|---| | Permanent Account Number (PAN) | 12-character tax ID. | `ABCDE1234F` | | Aadhaar number | 12-digit national ID. | `1234 5678 9012` | | Vehicle registration number | Vehicle registration number. | `DL5C1234` | | Voter ID number | 10-digit alphanumeric voter ID. | `ABC1234567` | | Indian passport number | Indian passport number. | `K1234567` | ### Finland | Data Type | Description | Example | |---|---|---| | Personal Identity Code | 11-character ID. | `131052-308T` | 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](https://cloud.digitalocean.com), in the left menu, select **Agent Platform**, and then click the **Guardrails** tab. On the **Guardrails** page, find the guardrail you want to duplicate, click the **…** menu, and 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](https://cloud.digitalocean.com), in the left-hand menu, select **Agent 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**.