Set Up Agentforce for Developers
Agentforce for Developers is available in the VS Code and Open VSX marketplaces as a part of the Salesforce Expanded Pack. Agentforce for Developers is enabled by default. Any developer with access to a Salesforce org can use the extension to generate code from natural language instructions, get coding suggestions in Apex and LWC using inline autocomplete, or generate Apex unit tests to quickly accomplish required code coverage goals.
Available in: Developer, Enterprise, Partner Developer, Performance, and Unlimited Editions.
Inoperable in: Group, Professional, and Essentials Editions.
Not Available in: EU Operating Zone. EU Operating zone is a special paid offering that provides an enhanced level of data residency commitment. Agentforce for Developers is supported in orgs in the EU that aren’t part of EU OZ, per standard product terms and conditions.
VS Code releases a new version each month with new features and important bug fixes. You must be on VS Code Version 1.86.0 or higher to run the Agentforce for Developers extension. You can manually check for updates from Help > Check for Updates on Linux and Windows or Code > Check for Updates on macOS.
From Setup, enter Agentforce for Developers
in the Quick Find box, then select Agentforce for Developers.
If you don’t see Agentforce for Developers as an option under Setup in your org, it’s probably not available in that edition.
Disable Agentforce for Developers to prevent the extension from being used in VS Code when this org is the default org.
You can enable or disable Agentforce for Developers from within Visual Studio Code or Code Builder. Click the Agentforce icon in the status bar to open the command palette, then click enable or disable. The Agentforce for Developers status icon in the bottom panel of the Visual Studio Code window indicates whether Agentforce for Developers is enabled or disabled. When enabled, the background color of the icon matches the color of the status bar. When disabled, the background color of the icon is brown.
You can disable or uninstall the Agentforce for Developers extension at any time. Bring up the Extensions view by clicking the Extensions icon in the Activity Bar in VS Code or the View: Show Extensions command (⇧⌘X). Search for "Agentforce for Developers" in installed extensions list, and then select Disable or Uninstall.
Telemetry helps monitor and audit Salesforce Generative AI functionality. In Code Builder, you must enable telemetry to use the Agentforce for Developers extension. However, after you've enabled the extension, you can then disable telemetry if you want. To enable telemetry, follow these steps:
- Go to Settings and 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.
- Next, search for "telemetry", then choose all from the dropdown menu for the Telemetry
Level setting. - Open a terminal and run
sf config set disable-telemetry=false --global
to enable CLI telemetry. See Salesforce CLI Data Collection and Metrics for more information. - Run Developer: Reload Window.
By default, Agentforce for Developers is turned off in new Code Builder environments. To turn it on, first enable Salesforce telemetry. Then, click the Agentforce icon in the status bar and enable the extension. After you turn on the extension, you can turn telemetry back off if you prefer.
Agentforce for Developers is available in these scratch org editions that can author Apex:
- Developer Edition
- Enterprise Edition
It's enabled by default in scratch orgs created from Dev Hub orgs with Agentforce for Developers enabled.
To disable Agentforce for Developers in a scratch org:
Edit the config/project-scratch-def.json
file in your DX project and add:
Agentforce for Developers is then disabled in new scratch orgs.
Run Agentforce: Show Prompt History from the Command Palette to open the console. When opened, you can view a running history of your prompts and associated responses.
If you have multiple AI-enabled extensions installed in VS Code, you can run into some unexpected generated code outcomes. We recommend you disable all other AI-enabled extensions when working with Agentforce for Developers:
- Click the Extensions icon in the Activity Bar, then search for the extension to disable by name.
- Click Disable in the extension's marketplace page.
- Repeat for all installed AI-enabled extensions.
You can use the default keyboard shortcuts in Visual Studio Code when using Agentforce for Developers. You can rebind the shortcuts in the Keyboard Shortcuts editor using your preferred keyboard shortcuts for each specific command. For more information see Key Bindings for Visual Studio Code.
You can search for each keyboard shortcut by command name in the Keyboard Shortcuts editor.
Command | Key Binding |
---|---|
Accept | ⌘Enter |
Accept | Tab |
Clear | Escape |
Agentforce | ⇧⌘R |
Trigger Inline Suggestion | ⌥\ |
For information on using VS Code, and the Salesforce VS Code Extension Pack, see Salesforce Extensions for Visual Studio Code.