---
schema_version: "1"
id: c4ba3830c2085fb1713dd29c1fbbacaec33588e4cd85150232962c30d5027573
title: Create an Agentforce Gateway Policy
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agentforce_gateway_create_policy.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agentforce_gateway_create_policy.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2b5fb7177cbdafc58647c84cee59e41771e16da513742d8dd349f6d8c349662c
description: Create a policy from a prebuilt template and follow a few simple steps to build a new policy that fits your governance needs. You can apply the policy immediately or save it and apply it later.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Create an Agentforce Gateway Policy

Create a policy from a prebuilt template and follow a few simple steps to build a new policy that fits your governance needs. You can apply the policy immediately or save it and apply it later.

### 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>

Different templates are available depending on whether you're protecting API connections or MCP server connections. See [Agentforce Gateway Policy Templates](https://help.salesforce.com/s/articleView?id=ai.agentforce_gateway_policy_templates.htm&release=264.0.0&type=5 "To create a policy, start from a template. Available templates depend on whether you protect API or MCP server connections.").

1. From **Setup**, in the Quick Find box, enter Policies, and then select **Policies**.
2. On the Agentforce Gateway Policies page, select **New**.
3. In Policy Builder, select the **APIs** tab for API connections, or the **MCP Servers** tab for MCP server connections.
4. Select a policy template.
5. Select **Continue**.
6. On the Policy Definition page, enter the required policy information.
7. To save and apply later, click **Save**.
8. To apply immediately, from the sidebar, select **Target Entities** ![Selection for Target Entities in Policy Builder.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/rules_gray.png), then complete the steps in [Apply an Agentforce Gateway Policy](https://help.salesforce.com/s/articleView?id=ai.agentforce_gateway_apply_policies.htm&release=264.0.0&type=5 "Apply a policy either manually or automatically by defining matching criteria.").

- **[Agentforce Gateway Policy Templates](https://help.salesforce.com/s/articleView?id=ai.agentforce_gateway_policy_templates.htm&release=264.0.0&type=5)**  
    To create a policy, start from a template. Available templates depend on whether you protect API or MCP server connections.