> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tavily.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Salesforce Agentforce

> Give Agentforce Employee Agents web search, extraction, mapping, crawling, and research with Tavily.

[Tavily on AgentExchange](https://appexchange.salesforce.com/appxListingDetail?listingId=c982e5f1-9b05-485f-8e38-0ae38b34f39c) brings live web information to Salesforce Agentforce. Use it to research companies, read web pages, and prepare briefs directly in an **Employee Agent**. Each user connects their own Tavily account through OAuth.

## Prerequisites

* An Agentforce-enabled Salesforce org and access to an Employee Agent. The listing supports **Enterprise** and **Developer** editions.
* A Salesforce administrator to install the package, configure OAuth, and grant access.
* A [Tavily account](https://app.tavily.com) with available [credits](https://docs.tavily.com/documentation/api-credits.md) for each user.

## Set up Tavily

An administrator completes the org setup once. If your admin has already set up Tavily, go straight to **Connect your account**.

> [tab] Admin setup
>
> **1. Install the managed package**
>
> Open [Tavily on AgentExchange](https://appexchange.salesforce.com/appxListingDetail?listingId=c982e5f1-9b05-485f-8e38-0ae38b34f39c), click **Get It Now**, and follow the installation prompts for your org. If prompted for an installation key, contact [Tavily support](mailto:support@tavily.com).
>
> The package includes the Tavily MCP connection and the **Tavily MCP User** permission set. You configure the OAuth client, tool actions, and Employee Agent after installation.
>
> **2. Configure OAuth for your org**
>
> Register a client using the installed provider's exact callback URL, then save the client ID in Salesforce. This is a one-time admin step; end users do not need an API key.
>
> > [accordion] OAuth client configuration
> >
> > **1. Read your callback URL.** In Salesforce, open **Developer Console → Debug → Open Execute Anonymous Window**. Run this Apex and find the callback URL in the debug log:
> >
> > ```apex theme={null}
> > System.debug(ConnectApi.NamedCredentials
> >     .getExternalAuthIdentityProvider('tavily__Tavily_MCP_Auth')
> >     .callbackUrl);
> > ```
> >
> > Use the returned URL exactly. It can differ between orgs; do not construct it from your Salesforce domain.
> >
> > **2. Register the client.** In a terminal, replace `YOUR_SALESFORCE_CALLBACK_URL` with that URL and run:
> >
> > ```bash theme={null}
> > curl --fail-with-body https://mcp.tavily.com/register \
> >   --header 'Content-Type: application/json' \
> >   --data '{
> >     "client_name": "Salesforce MCP Integration",
> >     "redirect_uris": ["YOUR_SALESFORCE_CALLBACK_URL"],
> >     "grant_types": ["authorization_code", "refresh_token"],
> >     "response_types": ["code"],
> >     "token_endpoint_auth_method": "none",
> >     "scope": "openid offline_access"
> >   }'
> > ```
> >
> > Copy the `client_id` from the response. Register a separate client for each Salesforce org.
> >
> > **3. Save the client ID.** Back in **Execute Anonymous**, replace `YOUR_CLIENT_ID` and run:
> >
> > ```apex theme={null}
> > String provider = 'tavily__Tavily_MCP_Auth';
> > ConnectApi.ExternalAuthIdentityProviderCredentialInput clientId =
> >     new ConnectApi.ExternalAuthIdentityProviderCredentialInput();
> > clientId.credentialName = 'clientId';
> > clientId.credentialValue = 'YOUR_CLIENT_ID';
> >
> > ConnectApi.ExternalAuthIdentityProviderCredentialInput clientSecret =
> >     new ConnectApi.ExternalAuthIdentityProviderCredentialInput();
> > clientSecret.credentialName = 'clientSecret';
> > clientSecret.credentialValue = 'unused-public-client';
> >
> > ConnectApi.ExternalAuthIdentityProviderCredentialsInput input =
> >     new ConnectApi.ExternalAuthIdentityProviderCredentialsInput();
> > input.credentials =
> >     new List<ConnectApi.ExternalAuthIdentityProviderCredentialInput>{
> >         clientId, clientSecret
> >     };
> >
> > ConnectApi.ExternalAuthIdentityProvider existing =
> >     ConnectApi.NamedCredentials.getExternalAuthIdentityProvider(provider);
> > if (existing.credentials == null || existing.credentials.isEmpty()) {
> >     ConnectApi.NamedCredentials.createExternalAuthIdentityProviderCredentials(
> >         provider, input);
> > } else {
> >     ConnectApi.NamedCredentials.updateExternalAuthIdentityProviderCredentials(
> >         provider, input);
> > }
> > ```
> >
> > `unused-public-client` is a compatibility placeholder required by this package's Salesforce configuration, not a Tavily-issued secret. Tavily registers a public OAuth client and uses PKCE for user authorization.
>
> **3. Grant access**
>
> In **Setup → Permission Sets → Tavily MCP User → Manage Assignments**, assign the permission set to yourself and the employees who will use Tavily.
>
> In a separate permission set that you manage, open **Object Settings → User External Credentials** and grant **Read, Create, Edit, and Delete**. Assign it to those users as well. The packaged permission set does not include these object permissions after installation. See [Salesforce's per-user credential permissions](https://help.salesforce.com/s/articleView?id=xcloud.nc_user_external_credentials_permissions.htm\&type=5).
>
> Also assign **Tavily MCP User** and **Read** access to **User External Credentials** to the **Platform Integration User**. Employees need access to Lightning Experience and to the Employee Agent you configure below.
>
> **4. Connect and activate the tools**
>
> Connect your own Tavily account using the **Connect your account** tab in this guide before discovering tools.
>
> 1. In **Setup → Named Credentials**, open **TavilyMCP** and confirm **Enabled for Callouts** is enabled.
> 2. Open **Setup → Agentforce Registry → MCP Servers → TavilyMCP**.
> 3. Open **Tools** and refresh discovery if prompted. Click **Manage Tools**, select the tools you want to use, and save.
> 4. Confirm the generated tool actions appear in **Setup → Agentforce Assets → Actions**.
>
> ![Agentforce Registry showing TavilyMCP connected, the Manage Tools button, and Tavily Search, Extract, Map, Crawl, and Research](https://mintcdn.com/tavilyai/ZTUMBmI6XTwwxSWa/images/agentforce-tools.png?fit=max\&auto=format\&n=ZTUMBmI6XTwwxSWa\&q=85\&s=f10e3d7f56cc5d7177755a8701590832)
>
> The Tavily MCP connection with all five tools selected.
>
> **5. Add Tavily to an Employee Agent**
>
> Open your **Employee Agent** in Agentforce Builder. Add the generated Tavily actions from the asset library to the topic that handles web research. For example, start with `tavily_search` and `tavily_extract`.
>
> Give the topic instructions such as:
>
> > Use Tavily Search to find current information on the web. Use Tavily Extract to read a specific page. Base your answer on the tool results and explain when a request fails.
>
> Test the agent in preview with the example below, then activate the agent version and grant employees access. See [Salesforce's MCP setup guide](https://help.salesforce.com/s/articleView?id=ai.agent_mcp_connect_register.htm\&type=5) for tool-action and user-authorization details.

> [tab] Connect your account
>
> Your Salesforce admin must complete **Admin setup** first. Each employee authorizes their own Tavily connection.
>
> **1. Authorize Tavily**
>
> In Salesforce, open your personal **Settings → External Credentials** under **My Personal Information**. Find **Tavily MCP** and click **Allow Access**.
>
> Sign in to Tavily, choose the personal account or organization you want to use, and authorize access. Usage applies to the selected Tavily account. See [choosing an account for OAuth](https://docs.tavily.com/documentation/mcp.md#oauth-authentication).
>
> **2. Confirm the connection**
>
> Return to Salesforce. **Tavily MCP** should show **Configured**. Open the Employee Agent your admin enabled and start a new conversation.
>
> ![Personal External Credentials settings showing Tavily MCP as Configured with a Revoke Access button](https://mintcdn.com/tavilyai/ZTUMBmI6XTwwxSWa/images/agentforce-connection.png?fit=max\&auto=format\&n=ZTUMBmI6XTwwxSWa\&q=85\&s=6a0e56ac7748e89dee3191283f412f9b)
>
> A user's Tavily connection after authorization.
>
> > [!TIP]
> >
> > If Agentforce asks you to authorize during a Builder preview, finish authorization and type **Done** in the conversation to continue.

## Try it

Ask your connected Employee Agent:

> Use tavily\_search to research Nebius. Summarize its business, main products, and target customers in three concise sections.

![Agentforce conversation answering a Tavily Search request with a company summary, main products, and target customers](https://mintcdn.com/tavilyai/ZTUMBmI6XTwwxSWa/images/agentforce-research.png?fit=max\&auto=format\&n=ZTUMBmI6XTwwxSWa\&q=85\&s=9187ddca67cb263ed1b7bb9505272cfb)

An example company research response in Agentforce. Results vary with the query and available sources.

Follow up with a page to read:

> Use tavily\_extract to read [https://docs.tavily.com](https://docs.tavily.com/index.md) and summarize what I can build with Tavily.

In Builder preview, inspect the action result to confirm that the agent called Tavily and returned results.

## Available tools

Your agent can use the tools your admin activates and adds to it.

| Tool | Use it to |
| - | - |
| `tavily_search` | Find current web information, snippets, and source URLs. |
| `tavily_extract` | Read content from specific web pages. |
| `tavily_map` | Discover URLs on a website. |
| `tavily_crawl` | Collect content from multiple pages on a website. |
| `tavily_research` | Research a question across multiple sources. |

## Troubleshooting

> [accordion] Tavily is missing or authorization fails
>
> Ask your admin to check the **Tavily MCP User** assignment and **User External Credentials** permissions. For an OAuth callback error, verify that the client was registered with the exact callback returned by the installed provider.

> [accordion] The agent does not use Tavily
>
> Confirm the connection is active, the tool is selected under **Manage Tools**, and its generated action is added to the agent's topic. Verify that you are using the intended agent version and that your own Tavily connection shows **Configured**.

> [accordion] A tool reports a rate or usage limit
>
> Check the selected account's usage and limits in the [Tavily dashboard](https://app.tavily.com). Resolve the limit before retrying. See [rate limits](https://docs.tavily.com/documentation/rate-limits.md) and [credits](https://docs.tavily.com/documentation/api-credits.md).

> [accordion] Source links appear as URL\_Redacted
>
> Salesforce can redact URLs in agent responses. Ask your admin to review the org's Trusted URL settings. These settings are separate from the Tavily package; allowing one domain does not enable links to every web source.

## Resources

* [Tavily on AgentExchange](https://appexchange.salesforce.com/appxListingDetail?listingId=c982e5f1-9b05-485f-8e38-0ae38b34f39c)
* [Tavily MCP server](https://docs.tavily.com/documentation/mcp.md)
* [Salesforce MCP setup and authorization](https://help.salesforce.com/s/articleView?id=ai.agent_mcp_connect_register.htm\&type=5)
* [Tavily support](mailto:support@tavily.com)
