Set Up Dev Agent
Dev Agent is part of Agentforce for Developers, which is included in the Salesforce Extension Pack. Dev Agent provides agentic AI capabilities that enable tool execution and workflow automation through natural language interactions. Dev Agent is currently behind a feature flag that you must enable.
Enabling Dev Agent involves installing the Salesforce Extension Pack (if not already installed), ensuring your Salesforce org supports Agentforce for Developers, and enabling the Dev Agent feature flag in your VS Code settings.
Before using Dev Agent, ensure you have the following:
For VS Code Desktop:
** Salesforce CLI Version**
- Install Salesforce CLI version V2.91.5 or higher.
For Code Builder:
- Access to Salesforce Code Builder.
- Enable Agentforce for Developers in your environment.
Project Requirements:
- A Salesforce DX project with a valid sfdx-project.json file.
- At least one authorized Salesforce org.
- Appropriate permissions for your intended development tasks.
Dev Agent's agentic capabilities are in Developer Preview, and currently behind a feature flag. To activate:
-
From the command palette, run Preferences: Open User Settings (JSON) to open your
settings.json
file. -
Update your settings:
-
Save your settings.
-
If you're working in Code Builder, enable Telemetry.
Enable Salesforce Telemetry
-
Go to Settings and search for
salesforcedx-vscode-core.telemetry.enabled
. -
Enable this setting if not already on.
Set Telemetry Level
-
Search for "telemetry" in settings.
-
Set Telemetry: Telemetry Level to
all
.Enable CLI Telemetry
-
-
From the command palette, run Developer: Reload Window.
Access logs through Developer: Toggle Developer Tools in the Command Palette.
We're now ready to use Dev Agent:
-
Click Agentforce Icon: Look for the Agentforce icon ([
]) in the Activity Bar.
-
Switch to Act Mode
- In the chat interface, locate the mode selector.
- Switch from standard chat, and toggle from Plan to Act mode. See Dev Agent Plan and Act Modes.
-
Install and Enable MCP Servers Click "Enable MCP Servers" to install and enable the Salesforce DX server. Toggle Salesforce DX MCP server on.
The Salesforce DX MCP server is installed and enabled by default in Code Builder.
Check that your MCP server is connected:
- 🟢 Green indicator: Server connected and functioning.
- 🟡 Yellow indicator: Connected with warnings (check configuration).
- 🔴 Red indicator: Connection failed (requires troubleshooting).
If you're working with more than one MCP server, control which servers are active by clicking the server icon, opening Manage MCP Servers, and then toggling servers off and on.
For local VSCode users, MCP servers are disabled by default. You’ll need to enable them.
Try these prompts to verify your setup:
-
Test Org Connection
-
Test Tool Execution
-
Test Project Context