---
schema_version: "1"
id: 7c8d0318db882f921b5bcc23aec405e0ab0c105eb2110b756a33e1b9f302e970
title: Apply Policies by Agent
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agentforce_gateway_apply_policies_by_agent.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agentforce_gateway_apply_policies_by_agent.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 663bf0bd38b9b245300c31618abb64b0be556d77bf8c352803ed11a23b062dac
description: Target which agents a policy applies to for API connections and MCP server connections. Without this configuration, a policy that protects a connection applies to all agents that call it.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Apply Policies by Agent

Target which agents a policy applies to for API connections and MCP server connections. Without this configuration, a policy that protects a connection applies to all agents that call it.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">See <a href="https://help.salesforce.com/s/articleView?id=ai.agentforce_gateway_policies.htm&amp;release=264.0.0&amp;type=5" title="Use Agentforce gateway policies to protect connections to your external APIs and Model Context Protocol (MCP) servers. Control access, set usage limits, and ensure compliance.">Agentforce Gateway</a> for supported editions and required permissions.</td></tr></tbody></table>

When you add a list of agents, or specify matching criteria that select agents, only those agents are subject to the policy. This action focuses the scope of protection so you can selectively apply specific limits or criteria to different sets of agents.

In Policy Builder, configure which agents a policy applies to.

- **Quota Type by Agent:** On the Policy Definition tab, for Quota Management policies, set whether the quota is **Shared** across all target agents or **Per agent**. This configuration applies to the agents that you select the **Agents** tab.
- **Agents tab:** Select the agents to which the policy applies: all available agents, or specific agents selected manually or by matching criteria.

After you configure the agents to which a policy applies, check the target agents on the Policy Details page on the **Target Agents** tab.

## Configure Target Agents for a Gateway Policy

Use the Agents tab in Policy Builder to define the Agentforce agents to which the policy applies.

1. From **Setup**, in the Quick Find box, enter Policies, then select **Policies**.
2. On the Agentforce Gateway Policies page, select the **APIs** or **MCP Servers** tab and select a policy.
3. On the policy details page, click **Open in Policy Builder**.
4. From the sidebar, select the **Agents** tab.
5. Select which agents the policy applies to.
    
    - **All available agents:** The policy applies to all current and future agents that meet the matching criteria, for example, all agents in the org. Use this option if you want one policy to cover every agent that uses the protected connections.
    - **Specific agents:** Select individual agents from the list of all available agents. The policy applies only to the agents that you select.
6. Click **Save**.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_important.png)

Important To enforce the policy, select at least one agent when using **Specific agents**. The policy doesn't apply until you add agents.

## View Target Agents for a Gateway Policy

From the Policy Details page, view the agents that a policy targets.

1. From **Setup**, in the Quick Find box, enter Policies, then select **Policies**.
2. On the Agentforce Gateway Policies page, select the **APIs** or **MCP Servers** tab.
3. Select a policy to open the policy details page.
4. Open the **Target Agents** tab.

The tab lists the agents to which the policy applies. Agent names link to the Agentforce agent details page. The list reflects your manual selection or matching criteria. If you change a policy or new agents match the criteria, the list updates when you manually refresh it or when it periodically refreshes.