Coding With Agentforce for Developers: A Salesforce Architect’s Review : Wiola Balicka

Coding With Agentforce for Developers: A Salesforce Architect’s Review
by: Wiola Balicka
blow post content copied from  Salesforce News | Salesforce Ben
click here to view original post



**Summary of Agentforce for Developers:** Agentforce for Developers is an AI-powered tool by Salesforce, available as an extension for Visual Studio Code. It helps developers by generating Apex code from natural language prompts, suggesting code completions, and creating unit tests for Apex methods. Its main features include a Dev Assistant for coding help, a Command Palette for generating code suggestions, inline code completions, and test case generation. Paul Battisson, a Salesforce developer, shared his insights on the tool, stating that while it can be useful for basic coding tasks and saves time, it requires developers to have a clear understanding of their requirements and how to effectively prompt the AI. He noted that the tool is generally good for about 80% of the coding needs, but it may produce incorrect or generic responses without careful guidance. **Key Features of Agentforce for Developers:** - Generates Apex code from natural language queries - Offers inline code suggestions - Provides a Dev Assistant for coding tasks - Creates unit test cases for Apex methods **Limitations:** - May produce inaccurate or unhelpful code if not properly guided - Requires familiarity with Salesforce development concepts Overall, Agentforce for Developers is a valuable tool for developers familiar with Salesforce, but it works best when used as an assistant rather than a complete solution. **Relevant Context:** Salesforce is a major player in cloud computing and customer relationship management (CRM). The increasing integration of AI tools in such platforms signals a shift toward more automated and efficient coding processes, but it also highlights the need for developer expertise in guiding these tools effectively. **Hashtags for SEO:** #Salesforce #Agentforce #AIDevelopment #VisualStudioCode #CodingTools #SalesforceDevelopers #TechReview #AIinTech #SoftwareDevelopment #CodeGeneration #DeveloperTools #ApexCode #MachineLearning


AI tools are at the forefront of discussions within the Salesforce ecosystem at the moment, with the cloud giant’s own Agentforce suite very much the main event.

There has been talk of exactly how helpful these tools can be for developers – and even whether they can replace junior devs – so here’s a rundown of the Agentforce for Developers tool and whether, in one Technical Architect’s opinion, it is useful.

What Is Agentforce for Developers?

Salesforce describes Agentforce for Developers as an AI-powered tool, which you can install as a Visual Studio Code extension.

It was built using CodeGen and xGen-Code, and the extension is available in the VS Code and Open VSX marketplaces as a part of the Salesforce Expanded Pack, in the VS Code desktop application, and in Code Builder.

Agentforce for Developers generates Apex code from natural language prompts and automatically suggests code completions.

Its features include:

  • Dev Assistant: Salesforce says this helps you with code generation and Salesforce development by asking for assistance. Slash commands also allow you to target specific tasks like understanding unfamiliar code and improving code documentation.
  • Command Palette: You can use the Agentforce: Generate Code command in the VS Code Command Palette to ask a question about what you want to build, and the AI will provide Apex code suggestions.
  • Inline Code Completions: Agentforce for Developers can suggest code completions as you type, without interrupting workflow, according to Salesforce. This feature can be used in Apex and LWC (JavaScript, CSS, and HTML) files.
  • Test Case Generation for Apex: The AI can be used to create unit test cases for Apex methods.

Salesforce obviously talks a big game on Agentforce, so we asked Salesforce Developer, Paul Battisson, what he thought of how good it actually is.

Source: Salesforce

“You Need to Know Where You’re Going With It”

Founder and CEO of Groundwork Apps, Paul Battisson, told Salesforce Ben the main place he has used Agentforce is in VS Code.

He said: “So within Visual Studio Code, there is a place where you can ask it questions and get answers, and it can provide inline support and help as well. So, as you’re coding away, it’ll make suggestions.”

“My review of Agentforce for developers is: It’s useful enough to get the basics going, but as ever, you need to know where you’re going with it.”

He added that when you ask the AI to build something basic, just to get him up and running on a project, it typically performs “okay”, not really being particularly good or bad.

Paul said: “The problem I think I find with it is that it’s easy for me to kind of look at the code and go, ‘it’s not the worst, it’s okay,’ and know where I need to tweak it. In my mind at the moment, a lot of these tools will get you kind of 80% of the way there, and then it’s up to you to kind of tweak it.”

Paul said that he had used another AI tool, Claude, to help build a UI. He gave it a rough overview of what he was looking for, with a lot of background information on the project.

“It put something out. Was it exactly what I wanted? No. But of the – say it wrote me 200 lines of code, because a lot of it was CSS styling that is just boring boilerplate stuff – yeah, do you know what? It meant I spent 10 minutes, and at the end of it, I actually had what I was looking for, rather than spending three hours thinking, ‘All right, which CSS class do I have to add here, and what’s the order of it?’ So, they’re real time-savers on that front, but you need to know how to prompt it and what you’re asking for in specific detail.”

“I think using them as an assistant – where you can provide a detailed prompt for them that conveys what you’re looking for in a way it will understand – means that you will get 80% of your requirement done, and you can then tweak the rest as needed. However, it requires you to have that understanding.”

Paul also mentioned that a few personalities on social media have been testing out Agentforce by asking it about the current release of some software or the current day of the week – and it got it wrong.

Paul asked it to help him design a solution for a fake problem, asking if someone wanted to store the first name, last name, company, and email address of an inbound inquiry for a product, how would one go about doing that in Salesforce.

He said: “The correct answer is to use the lead object. The incorrect answer, which it gave, was to create a custom object called “inbound inquiry” and create these custom fields. I went through a series of prompts trying to nudge it towards the right answer – even asking, “Can you use a standard object to do this?” etc.”

“At one point, it just spat out a bunch of HTML at me in JavaScript. It had nothing to do with the answer at all. And so, I think the usefulness of these things is to understand that they are there to work with you to get some boilerplate stuff.”

Salesforce points out that Agentforce for Developers uses generative AI, which can “produce inaccurate or harmful responses”.

The company writes on its Developer Portal: “The output generated by AI is often nondeterministic. Before using the generated output, review it for accuracy and safety. You assume responsibility for how the outcomes are applied to your organization.”

Final Thoughts

Paul put it succinctly when he described Agentforce for Developers as being “useful enough to get the basics going”, but, as is often the case with AI tools, an experienced hand is often needed to know the proper prompts to give it – and to check its work.

Any thoughts? Leave them in the comments below!

The post Coding With Agentforce for Developers: A Salesforce Architect’s Review appeared first on Salesforce Ben.


February 17, 2025 at 07:00PM
Click here for more details...

=============================
The original post is available in Salesforce News | Salesforce Ben by Wiola Balicka
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================

Salesforce