We are thrilled to announce that Agentforce for Developers, formerly known as Einstein for Developers, is now generally available! This evolution to Agentforce reflects our vision for the product: initially enhancing developer productivity with assistive capabilities, and integrating more advanced automation features in the future. With generative AI capabilities, Agentforce reduces the time that developers need to spend on routine, boilerplate tasks, allowing them to concentrate on more complex and creative tasks. This marks a major milestone in Salesforce’s mission to accelerate innovation and deliver intelligent experiences at every stage of the development lifecycle.
Agentforce for Developers is a suite of AI-powered tools that help developers write Salesforce-specific code, like Apex and LWC. Whether you’re building Agentforce custom actions or applications, or optimizing existing code, Agentforce for Developers helps you quickly and safely generate high-quality code that’s embedded with best practices. Powered by Salesforce’s own LLMs, Agentforce for Developers simplifies complex development tasks, automates tedious work, and guides you through the process of building applications and agents faster than ever.
How Agentforce for Developers works
Agentforce for Developers uses the power of Salesforce AI Research’s proprietary large language models (LLMs), including CodeGen2.5 and xGen-Code. Launched in 2023, CodeGen2.5 is a compact model designed primarily for programmer-specific features such as ‘code completion’. It has been powering Agentforce for Developers, delivering enhanced coding precision and efficiency. Building on this foundation, Salesforce AI Research is now introducing xGen-Code, a robust model tailored for Salesforce Developer use cases, excelling in tasks that blend natural language processing (NLP) with programming capabilities. xGen-Code powers the latest feature, Dev Assistant, and stands out for its ability to handle complex, multi-turn interactions and dynamic chat functionalities, setting a new standard in both open and closed-source model performance. Crucially, these trusted models ensure that no customer code or content is ever used for model training. By leveraging in-house LLMs, we deliver a secure, easy-to-use, and highly customizable experience within the Agentforce for Developers platform. This approach keeps all customer data within the trusted company boundary, eliminating the need for third-party LLMs, and reinforcing both privacy and security.
What you can do with Agentforce for Developers
Engage in multi-turn chat with Dev Assistant
Introducing Dev Assistant, a new feature in Agentforce for Developers. This conversational AI coding assistant is built specifically for Salesforce Developers. It can assist with tasks like writing new code, explaining existing code, generating test cases, creating documentation, and more.
To engage with Dev Assistant, you click the Einstein icon in the Visual Studio Code Activity Bar. Once activated, it leverages Retrieval Augmented Generation (RAG) techniques, which enhance the relevance of responses by considering the current schema and metadata from the local project. This ensures that the tailored code suggestions you receive are not only aligned with your immediate coding needs, but are also contextually relevant to your Salesforce org.
To frame your query, you can either use slash commands — preconfigured prompt templates — or just rely on natural language. Once you receive a suggestion, you have the option to continue the dialogue with Einstein to refine the responses further, applying effective prompt writing techniques to ensure that they meet your specific requirements.
- Use the
/explain
command to explain the code in the active editor - Use
/tes
t to generate a test case - Use
/document
to create documentation for the specified code block, following the default documentation style for the current file’s programming language
Below is an example that shows how to use the multi-turn feature of Dev Assistant for interacting with code. Here, we are asking the agent to modify the code to add a few more fields to the existing component.
Generate Apex code using natural language prompts
You can also ask Dev Assistant to write code. In the example below, we ask Dev Assistant to create an Apex class called ExperienceController
with a new method getExperiences
. We also add logic in that method to query records with a filter.
Explain code
You can now ask Dev Assistant to explain the code for you. The screenshot below shows how to use the built-in command /explain
to generate code explanations.
Generate tests
You can ask Dev Assistant to generate Apex tests. In the example below, we ask Dev Assistant to generate a test based on the open file in our editor. Note that you can also highlight a method and generate a test scenario for the specific method. The screenshot below shows how to use the built in command /test
to create a test method.
Write docs
Dev Assistant can document code to improve maintainability. Check out the image below to see how to use the /document
command to get help with code documentation.
Inline code autocomplete
With inline autocomplete for Apex and LWC, you can see AI-powered code suggestions inline within your editor. The image below shows an example of inline autocomplete in action within an LWC Javascript file.
How to get started with Agentforce for Developers
Getting started with Agentforce for Developers is simple. All you need to do is install Einstein for Developers in VSCode for Desktop or within our web IDE Code Builder. It’s a two-step process: Agentforce for Developers is offered as an extension within Visual Studio Code and Code Builder via the Salesforce Extension Pack (Expanded).
Navigate to the Extensions menu in the Activity bar of your VSCode for Desktop or Code Builder and look for the Salesforce Extension Pack (Expanded) and install. The screenshot below shows where to find the Agentforce for Developers extension.
Please keep in mind that the name change will be reflected in the product and in our developer documentation as soon as possible, but you will see ‘Einstein for Developers’ until then.
Important considerations
- To keep your data secure, we don’t use customer data or code to train the models. We ensure that your code never leaves the Salesforce’s environment for a more trusted experience. In addition, we have a post-processing phase, where we mask sensitive information and also perform toxicity checks before generating the response to the user.
- We recommend having a code review process in place for all AI-generated code to ensure accuracy, security, and scalability.
- We’ll be doing further fine-tuning to support LWC and general Salesforce Q&A. Check out our public-facing roadmap to stay up to date with the latest & greatest!
Resources
- Explore in-depth details on Agentforce for Developers’ features and innovations in our documentation, and check out our public roadmap for what’s next
- For any feedback or issues, visit our issues repository
About the authors
Margot Tollefsen is a Product Marketing Manager on the Salesforce Platform team, where she leads Developer Experience and broader DevOps messaging and positioning. Alongside her role in product marketing, she is passionate about empowering Indigenous communities with digital tools and technology.
Mohith Shrivastava is a Principal Developer Advocate at Salesforce with a decade of experience building enterprise-scale products on the Salesforce Platform. Mohith is currently among the lead contributors on Salesforce Stack Exchange, a developer forum where Salesforce Developers can ask questions and share knowledge. You can follow him on LinkedIn.
Ananya Jha is a Sr. Product Manager at Salesforce with 5+ years of experience working as a developer and product manager on the Salesforce Developer Tools team. Most recently, Ananya has been focused on the Agentforce for Developers product with an eye towards improving developer productivity with the help of generative AI. In her spare time, she loves dancing and hiking in the San Francisco area. You can follow her on LinkedIn.