---
title: Bits Guardrails
description: >-
  Define which remediation actions Bits can take, where they apply, and who must
  approve them.
breadcrumbs: Docs > Bits AI > Bits Remediation > Bits Guardrails
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Bits Guardrails

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com

{% callout %}
##### Join the Preview!

Bits Guardrails are in Preview.Request Access
{% /callout %}

{% /callout %}

Guardrails let admins define which remediation actions Bits can take, where those actions apply, and who needs to approve them. For example, an Ask guardrail for `rollbackDeployment` scoped to `service:checkout` notifies predefined approvers before Bits rolls back a deployment for the checkout service.

Bits can take a remediation action only when a guardrail covers both the action and the resource it targets. If no guardrail covers an action, Bits can recommend the action but can't run it. For more information about how to enable Bits to take action on your infrastructure, see [Infrastructure Actions](https://docs.datadoghq.com/bits_ai/bits_remediation/infrastructure_actions.md).

Guardrails authorize actions through [Execution Policies](https://docs.datadoghq.com/actions/private_actions/execution_policies.md). When you create an Ask guardrail, Datadog automatically creates a matching `[Bits Guardrail]` execution policy.

## Requirements{% #requirements %}

- Creating guardrails requires the `guardrails_read` and `guardrails_write` permissions. Enable them in [Organization Settings > Roles](https://app.datadoghq.com/organization-settings/roles).
- To approve actions covered by guardrails, approvers need the `bits_investigations_write` and `guardrails_read` permissions in their role. Approvers must also be named on the Ask guardrail, as a user or through a team or role.

## Create a guardrail{% #create-a-guardrail %}

To create a guardrail:

1. Go to [Bits Guardrails](https://app.datadoghq.com/bits-ai/guardrails) and click Create guardrail.
1. Select the type of infrastructure to target.
1. Select one or more available actions for the guardrail to target. For example, for a Kubernetes integration, you can select actions such as rolling back deployments and patching or deleting Kubernetes objects.
1. Add tags that identify the resources the guardrail applies to, such as `service:checkout` or `kube_deployment:checkout`. The tags must match the target resource's tags in Datadog.
1. For the selected actions and scope, decide when Bits can take action:
   - Ask: Requires user approval before Bits executes actions. Choose at least one team, role, or individual who can approve.
   - Deny: Bits can recommend an action but cannot take it.
1. (Optional) For an Ask guardrail, turn on Notify when approval is needed, and select the Slack workspace and channel where Bits posts approval requests. This requires the [Slack integration](https://docs.datadoghq.com/integrations/slack.md). For a private channel, invite the Datadog app to the channel first. To approve from Slack, each approver must link their Slack account to Datadog.
1. In the review step, enter a name for the guardrail, then save it.
