Loading...

As Salesforce continues to move toward AI-assisted development, Agentforce is emerging as a powerful tool that helps developers interact with their org metadata, objects, and configurations using intelligent prompts. When combined with Visual Studio Code (VS Code) and the Salesforce CLI, Agentforce enables a faster, more context-aware way to explore and build on the Salesforce platform.

This guide walks you through how to set up Agentforce in VS Code step by step, using the recommended Sandbox environment for safe experimentation. From installing VS Code and Salesforce Extension Pack to authorizing your org, enabling telemetry, and activating the Salesforce DX MCP server, this tutorial covers everything required to get Agentforce Vibes up and running smoothly.

Whether you’re a Salesforce developer, admin, or architect, learning to configure Agentforce in VS Code can significantly improve how you query metadata, validate objects and fields, and interact with your Salesforce org using AI-driven prompts; all without leaving your development environment.

Prerequisite

It is advisable to use Agentforce Vibe within the Sandbox environment.

Step-by-Step Guide to Set Up Agentforce in VS Code

Step 1: Download and install  VS Code.

Step 2: Install the CLI from Salesforce CLI.

Step 3: Launch Visual Studio Code.

image1

Step 4: On the left toolbar, click the Extensions icon.

Step 5: Search for Salesforce Extension Pack and click Install.

image2 10

Step 6: In Visual Studio Code, open the Command Palette by pressing Ctrl+Shift+P (Windows) or Cmd+Shift+P (macOS).

image6 1

Step 7: Type and select SFDX: Create Project With Manifest.

image4

Step 8: Press Enter to accept the standard option.

image10 1

Step 9: Enter the project name and press Enter.

image10 1

Step 10: Select a folder to store the project.

image13 1

Step 11: Click Create Project. You should see something like this as your base setup.

image1 10

Step 12: In Visual Studio Code, open the Command Palette by pressing Ctrl+Shift+P (Windows) or Cmd+Shift+P (macOS).

Step 13: Type and select SFDX: Authorize an Org.

image8 1

Step 14: Press Enter to accept the Project Default login URL option.

image19 1

Step 15: Press Enter to accept the default alias.

image24 1

This opens the Salesforce login in a separate browser window.

image9 1

Step 16: Log in using your Org credentials. If prompted to allow access, click Allow.

image17 1

image15 1

After you authenticate in the browser, the CLI remembers your credentials. Just follow these steps in VS Code or the Agentforce Vibes IDE.

Step 17: Select File > Preferences > Settings (Windows or Linux) or Code > Settings > Settings (macOS).

image22 1

image12 1

Step 18: Search for salesforcedx-vscode-core.telemetry.enabled to confirm that this Salesforce telemetry setting is on in your workspace. If the setting isn’t on, select the checkbox to enable telemetry.

image26 1

Step 19: Next, search for telemetry, then choose ‘all’ from the dropdown menu for the Telemetry: Telemetry Level setting.

image23 1

Step 20: Open a terminal and run sf config set disable-telemetry=false –global to enable CLI telemetry.

image21 1

image25 1

image27 1

Step 21: Press Command+Shift+P on Mac or Ctrl+Shift+P in Windows to open the Command Palette, and run Developer: Reload Window.

image14 1

By default, Agentforce Vibes extension is enabled in the desktop application and can be launched from your Salesforce org from the Set Up menu. Click the icon in the status bar to turn off Agentforce Vibes at any time.

image11 1

MCP in Salesforce lets Agentforce connect directly to your Salesforce org, tools, and metadata.

Think of it as a live bridge that helps AI understand your org and build the right code every time.

Step 22: Enable the Salesforce DX MCP server.

image28 1

Step 23: Enter Prompt.For Example:-

“Check whether Mask__c is a custom field on Account.”

image7 1

image3 1

“Does the object Invoice__c exist in this Salesforce org?”

image29 1

image20 1

Step 24: Validate Agentforce MCP Connection and Prompt Response

After entering your prompt in Agentforce Vibes, verify that Agentforce successfully connects to your Salesforce org via the MCP server. 

  • Confirm that Agentforce returns a valid response based on your org’s metadata
  • For example:
    • If the field exists, Agentforce should confirm the object and field details
    • If it does not exist, Agentforce should clearly indicate that the metadata was not found
  • Ensure there are no authentication or MCP connection errors in the VS Code output or terminal logs

If the response is accurate, your Agentforce setup in VS Code is complete and ready for use.

You can now use Agentforce Vibes in VS Code to query metadata, validate objects and fields, and assist with Salesforce development tasks using AI-powered prompts directly within your development environment.

Demo Video

 

 

Conclusion

Setting up Agentforce in VS Code is a foundational step toward embracing AI-powered development within the Salesforce ecosystem. By completing this setup, from installing the Salesforce CLI and Extension Pack to enabling telemetry and configuring the MCP server, you create a direct, intelligent bridge between Agentforce and your Salesforce org.

Using Agentforce Vibes in a Sandbox environment ensures you can safely explore org metadata, validate custom objects and fields, and test AI-assisted queries without impacting production data. With prompts like checking whether a custom field exists or verifying an object in your org, Agentforce streamlines tasks that traditionally required manual navigation or complex queries. You can also create a custom Agentforce agent.

As Salesforce continues to expand Agentforce capabilities, mastering this setup in VS Code positions you ahead of the curve, allowing you to work smarter, reduce context switching, and build with greater confidence. Once configured, Agentforce becomes more than a tool; it becomes a reliable development companion for modern Salesforce teams. 

Transform your processes with tailored Salesforce services. Let our experts help you scale smarter and faster.

No Data Found.

Related Articles
Orchestrator vs. Traditional Flows

Businesses use Salesforce automation to reduce manual work, improve efficiency, and automate repetitive business processes. Two commonly used automation approaches inside Salesforce are Traditional Flows and Flow Orchestrator. Traditional Flows are mainly used for simple automation tasks such as updating records, sending notifications, creating tasks, and automating business logic. Flow Orchestrator is designed for more […]

Read More
The Rise of Agentic Government_ What Salesforce’s 2026 Insights Mean for the Future of Public Sector AI

Government technology has often been seen as slower to evolve than the private sector. But Salesforce’s latest research challenges that idea in a big way. In fact, the new findings suggest that public sector organizations may now be moving faster than many businesses when it comes to adopting AI agents and preparing for a more […]

Read More
How To Use Email Service in APEX

Managing approvals, updates, and record changes directly from email can significantly improve efficiency within Salesforce workflows. Instead of logging in, navigating records, and manually updating fields, users can simply respond to emails and trigger automated updates using Email Service in APEX. This approach is especially useful for businesses leveraging Salesforce automation and looking to enhance […]

Read More
Design and Implementation of Salesforce Jira Task Integration 1 1

Businesses have been using Salesforce for CRM operations and Jira for Agile project tracking. However, without integration, teams manually update both systems, leading to data inconsistency and inefficiency.This mechanism establishes a real-time integration between Salesforce and Jira, allowing seamless synchronization of tasks and agile board statuses.  A custom Salesforce dashboard was developed that replicates Jira-style […]

Read More
Dark Mode in Salesforce Enabling It and Creating Theme Ready Lightning Web Components with SLDS 2.0 1 1

With the Winter ’26 release, Salesforce introduced Dark Mode in Lightning Experience. Dark Mode has been introduced as a beta feature in Winter ’26, and at first it was available only for Starter Edition orgs. It is now rolling out further with Spring ’26 to Professional, Enterprise, and Developer editions. To use Dark Mode, Salesforce […]

Read More
How to Merge and Brand PDF Files in Salesforce Using LWC Visualforce PDF LIB 1

Salesforce developers frequently encounter document automation requirements that go beyond standard Apex-based PDF generation. From merging multiple ContentVersion files to dynamically applying branding like watermarks and headers, traditional server-side approaches often hit Salesforce heap size limits (6MB/12MB), creating performance and scalability challenges. This guide presents a heap-limit-safe PDF merging architecture in Salesforce using Lightning Web […]

Read More
Our Location worldwide
Indian Flag India
3rd Floor, A-10, Pegasus Tower, Sector 68, Noida, Uttar Pradesh 201301 +91-1203239658
United States of America Flag USA
333 West Brown Deer Road Unit G – 366 Milwaukee WI, USA 53217 +1(262) 310-7818
United Kingdom Flag UK
7 Bell Yard, London, WC2A 2JR +44 20 3239 9428
Canada Canada
HIC Global Solutions INC
6D - 7398 Yonge St #1124 Thornhill, ON L4J 8J2 Canada +1(262) 310-7818