Guide to Quickly Building Agentforce Agents in VS Code
281 views
May 29, 2025
Agentforce DX VS Code extension help us to quickly create, test and also preview Agentforce Agents from the IDE. Blog Post: https://www.infallibletechie.com/2025/05/guide-to-quickly-building-agentforce-agents-in-vs-code.html
View Video Transcript
0:04
hello everyone In this video we are
0:07
going to see how to quickly create agent
0:10
force
0:12
agent and deploy it to a
0:17
sandbox Here I'm going to make use of
0:20
Salesforce developer edition org to
0:22
create the agent force agent Once it is
0:25
created in the developer edition or I'm
0:27
going to deploy that to my sandbox
0:31
or the first step is
0:34
install VS code in your uh PC Next
0:38
install Salesforce uh extension
0:42
pack After
0:44
that use this
0:48
command in your VS
0:51
code terminal Before using that we have
0:55
to connect our developer edition org to
0:59
VS code So this is my developer edition
1:04
org Let's see how to connect it here So
1:07
I'm going to use
1:09
uh control shiftp I'm going to create
1:12
sfdx create project with manifest I'm
1:15
going to select
1:17
standard Since it is my agent force uh
1:20
developer edition or I'm giving the name
1:21
as agent
1:23
forcede I'm going to store it in
1:28
my PC So it is done Next is we have to
1:33
authorize it You can use
1:37
uh sfdx authorize and it will open uh
1:41
the login screen in your default browser
1:44
You have to enter your username and
1:45
password the VS code will be authorized
1:48
I have already done that So I'm going to
1:51
select
1:52
my agent force developer edition
1:56
or the next step is go to terminal here
2:00
and run this SF update command We are
2:02
running this command to update
2:04
Salesforce CLA which is installed in
2:07
your PC Once this is done it is a
2:10
one-time update You can keep doing it so
2:13
that your Salesforce CLA is up to date
2:15
Next is we have to install agent force
2:18
DXVS code extension Go to this uh link
2:23
and install it Let's say you are using
2:25
code builder and not the regular VS code
2:28
Then you have to go to this link and get
2:30
the agent for agent force DX VS code
2:35
extension The next step is we are going
2:37
to create the agent specification
2:40
In order to do that we have to run this
2:44
command I'm going to run this command
2:48
here We are not creating the agent We
2:49
are just um creating the specification
2:53
for it It is asking me whether it should
2:55
be customer or internal I'm going to say
2:58
internal It is asking me the name I'm
3:01
going to
3:03
use infallible techy as the name It is
3:06
asking the description of my company
3:09
I'm going to give this
3:12
information Please don't use any random
3:15
information This information will be
3:17
sent to the LLM to build the agent force
3:19
agent for you Next I'm going to give
3:22
this will be the role of an
3:25
agent So now it is creating the
3:28
specification and not the agent We have
3:30
to go to specs folder doubleclick the
3:33
YAML file and confirm whether everything
3:36
is looking good Once this is done we
3:39
have to run
3:40
this command to create the agent force
3:44
agent So I'm going to run this SF agent
3:48
create It is asking me which YAML I have
3:51
to use If you want you can create your
3:53
own YAML file and then you should be
3:55
able to have it under specs folder so
3:57
that it can look for it I'm going I'm
3:59
having only one so I'm selecting that
4:01
one Now it is asking me the label for
4:04
the new agent I'm going to give the name
4:06
as in my agent
4:10
17 I'm going to make use of the default
4:12
API
4:13
name Now it is creating the agent force
4:16
agent in my developer edition or so So
4:20
this is my developer edition or I have
4:21
only two
4:26
agents Okay previously it was creating
4:30
it in around uh 18 seconds So now also
4:34
it created it within 18 seconds So now
4:38
the agent force agent is
4:41
created in my developer edition or you
4:44
can click this You can click the open
4:46
builder button and then you should be
4:48
able to activate it and test the um
4:51
agent force agent If you want to do it
4:53
with the code then you can run this
4:56
command So this is the example command I
4:58
have already set it up So we can run
5:02
this command in VS code Here I have said
5:06
it should open in Chrome If you want to
5:07
open it in Firefox instead of Chrome you
5:10
have to use the browser name like
5:12
Firefox You can give it so that it will
5:14
open it in Firefox If you want to open
5:16
it in Safari you have to give Safari So
5:20
if you want you can test it
5:25
So it created these topics for me and
5:29
then uh if you want you can activate it
5:31
also Now the agent creation in my
5:35
developer edition or is done So this is
5:38
in my developer edition or in my sandbox
5:42
or which is not tied to this developer
5:45
edition or because in developer edition
5:47
or we cannot create sandboxes So this is
5:49
my production from my production org I
5:51
created this full copy sandbox which is
5:54
not uh relevant to the developer edition
5:56
or here I have few agents but I don't
6:00
have the
6:02
agent my agent 17 let's see how to
6:05
deploy this to this
6:08
sandbox use this
6:11
uh one or you have to run this command
6:14
command shift
6:16
p authorize an org And then you should
6:20
be able to authorize an arc and have it
6:22
in your VS code Once that is done you
6:26
have to select that here So here I'm
6:28
going to select my full sandbox
6:32
authorization Now go to force app select
6:36
bots folder genai planner and genai
6:41
plugins Select these three folders Right
6:44
click and select deploy this
6:47
to source to or Once I do that it is
6:52
deploying the agent force agent which I
6:56
created it in my developer edition or
6:58
the deployment is also successful Now I
7:02
should see that agent force
7:05
agent in my full sandbox
7:11
So I was able to make use of developer
7:13
edition
7:15
or VS code to create an agent force
7:19
agent in my developer edition or and
7:22
with the help of VS code I was able to
7:24
quickly deploy it to my sandbox
7:30
or thank
#Enterprise Technology
#Internet Software
#Programming