Agentforce for Developers: What is it, Capabilities, and Step-by-Step Setup Guide?
Table of Contents
Think of having an assistant that guides you while you code—someone who can answer your development-related questions and suggest improvements. This is exactly what ‘Agentforce for Developers’ does. It is a suite of AI-powered tools that help you write Apex and LWC code effortlessly. This web extension seamlessly embeds in your coding interfaces, such as Visual Studio and Code Builder, combining the best of Agentforce and Salesforce capabilities. Once integrated, it assists you at every step of development—from answering your questions in real time, suggesting code optimization, to automatically enforcing safety and accuracy in your code.
Built using large language models, Agentforce for Developers leverages coding best practices that reduce errors and deliver a smooth development experience. But what exactly makes it so effective? Find out the answer in this blog!
Let’s get started!
LLMs Powering Agentforce for Developers
Agentforce for Developers is built using CodeGen and xGen Code language models.
CodeGen2.5 is referred to as a small but mighty model, as it demonstrates strong performance despite being small in size and using less computational power than other LLMs. It offers:
- Code completion support and infill capabilities while Salesforce developers write code. Not only at the end but also in between using the prefix and suffix context.
- Quick suggestions using the Flash Attention technique, which speeds up how the model thinks.
- High personalization and data privacy for sensitive and crucial codebases because it runs on local devices.
- Support for multiple programming languages and instruction-following abilities.
xGen-Code can process 8,000 tokens, which makes it effective at handling long sequences of code and tasks that require understanding extensive context. It offers:
- Writing or reviewing long code files
- Debugging and refactoring suggestions in code
- Assisting in multi-step software development workflows
- Summarizing technical documentation
- Providing contextual assistance across large codebases
Features of Agentforce for Developers

Dev Assist
Dev Assist is like a personal assistant in your coding interface who is ready to help you write Apex and LWC code. You can ask questions based on what you are working on, prompt it to explain, or test or document code using slash (/) commands.
Example prompts:
- /explain the code written
- What are the best practices to follow when writing Apex code?
- /test Generate a test for the getSimilarProducts() method
Inline Code Completions
Inline code completions provide coding suggestions. It uses AI-driven autocomplete techniques and context from the methods and objects declared within them.
For instance, to get product details against purchase information, you declare the customer account and contact ID as objects. In the return function, it can autocomplete your variable declarations.

(image source: https://developer.salesforce.com/docs/platform/einstein-for-devs/guide/einstein-inline.html)
To enable it:
- Go to File > Preferences > Settings > Agentforce for Developers and ‘Enable Auto Completions’.
- Also, enable the ‘Show an indicator’ option that indicates when an autocomplete request is made, using a sparkle icon.
Test Case Generation
You can generate unit tests on your LWC and Apex classes. It ensures code quality, reliability, and maintainability to meet Salesforce’s deployment standards.
Unit tests help in catching bugs, enable safer refactoring, and ensure that the code functions as intended.
How to do it?
- For Apex:
- Right-click on the method > select Agentforce: Generate An Apex Test
- Select Apex File, Apex Method, and Test File
- Click on Generate. Wait for the process to execute.
- Click on the generated test file, review it, and accordingly Accept, Decline, or Regenerate the test.
- For Lightning Web Component (LWC)
- Right-click on the JavaScript file > select Agentforce: Generate an LWC Test.
- Review the selected LWC component and click on Generate.
- The process will execute. Click on the generated result and review it.
- Accept, discard, or regenerate the result.
Command Palette
The Command Palette is a central hub for accessing various commands related to Salesforce development and leveraging Agentforce’s AI capabilities.
- Agentforce: Generate Command: This command allows you to enter a prompt describing what you want to build. Based on it, Agentforce will provide you with Apex code suggestions that you can utilize.
- Slash Commands:
- /test: Generates a test case
- /explain: Explains the code in the editor
- /document: Creates documentation for the given code block using the standard format for the programming language used in this file.
- Access various Salesforce CLI commands.
How to access the command palette?
- Press Ctrl+Shift+P for Windows or Linux
- ⇧⌘P for macOS
- Type SFDX in the command palette, and you will get a list of commands to use.
LWC Optimize
LWC Optimize uses Agentforce agents to enhance your Lightning Web Components by improving accessibility and code refinement. It offers two types of optimization:
#1. Accessibility
Uses an accessibility agent to create enhanced digital experiences. It checks your code against WCAG guidelines to ensure:
- Headings and labels are clear for navigating content.
- Matching visible labels with accessible names for elements that display text or images of text.
#2. Inline Todos
Inline todos agents parse inline comments like // TODO: Add input field.
They attempt to generate the corresponding code using best practices and Lightning Components. This boosts developers’ productivity by eliminating manual fixes.
How to do it?
- Open the Agentforce: Agents panel in VS Code.
- Go to LWC Optimize.
- Select your component and choose optimization options (Accessibility Agent or Inline Todos Agent).
- Click Optimize.
- Review changes and decide to Accept, Regenerate, or Discard suggestions.
Step-by-Step Guide to Get Started With Agentforce for Developers
Pre-requisites to follow
- Ensure you have VS Code Version 1.90.0 or higher
- Requires Salesforce CLI Integration extension 59.13.0 or higher.
- Requires Salesforce Apex extension version 59.8.0 or higher.
- Ensure your Salesforce Org is connected.
- You have a Salesforce DX project open.

Step 1. Install Agentforce for Developers
Log in to your VS Code and search for ‘Agentforce for Developers’ and install the package. You can also use the link: https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-einstein-gpt

Step 2. Enable Agentforce
- Click on the settings icon on the bottom left of your VS Code interface.
- Click on settings and paste the Telemetry link: salesforcedx-vscode-core.telemetry.enabled
- Enable the checkbox.

- Search ‘Telemetry’ > select ‘all’ from the dropdown for telemetry settings.
- Reload the window.
Congratulations! You have successfully installed Agentforce for Developers in your VS Code.

Agentforce for Developers Pricing
The Agentforce for Developers extension is freely available to use within Salesforce and VS Code. You only need to install the extension and perform the setup.
Conclusion
Agentforce for Developers is a powerful tool that streamlines your coding efforts by adhering to best coding practices and ensuring accurate results. It is widely available and subject to continuous updates and feature enhancements.
How Can We Help?
Smart IT Staff’s augmentation services can assist you in integrating top Salesforce talent into your team. Hire a Salesforce developer from us to leverage Agentforce’s capabilities in your Salesforce projects. We are here to help you enhance your AI-powered workflows.
Frequently Asked Questions
It is available in Developer, Enterprise, Partner Developer, Performance, and Unlimited Editions.
Agentforce complies with Salesforce’s security, including ISO 27001, GDPR, and SOC 2.
Agentforce’s core features focus on Salesforce-specific languages, including Apex and LWC. However, LLMs (CodeGen2.5 and xGen-Code) are capable of understanding and generating many common languages. In practice, only Apex and JavaScript/HTML for LWC receive full IDE integration and tooling.
Agentforce leverages pre-trained language models that run securely on your device. You cannot directly make changes to these models, but you can make them more personalized. You can do this by providing contextual prompts and using workspace settings to tailor suggestions to fit your project’s needs.