- Sign up for a Developer Edition account at developer.salesforce.com/signup.
- Once you have a DE org, enable the following features IN ORDER
- Knowledge (Setup > Knowledge > Knowledge Settings)
- Data Cloud (Setup > Data Cloud > Data Cloud Setup Home)

- Einstein (Setup > Einstein > Einstein Generative AI > Einstein Setup)
- Reload your browser tab after enabling Einstein so Agentforce becomes available in your Setup tree.
- Agentforce (Setup > Einstein > Einstein Generative AI > Agentforce Studio > Agentforce Agents)
- Clone this repo.
git clone https://github.com/VivekMChawla/afdx-pro-code-testdrive.git - Navigagte into the cloned Test Drive folder.
cd afdx-pro-code-testdrive - Authenticate the Salesforce CLI to your DE org.
sf org login web -s -a AFDX-Pro-Code-Testdrive - Deploy everything except agents.
sf project deploy start --manifest manifests/EverythingExceptAgents.package.xml - Deploy agents.
sf project deploy start --manifest manifests/Agents.package.xml - Deploy agent tests.
sf project deploy start --manifest manifests/AgentTests.package.xml - Open the Test Drive folder in VS Code.
code .
-
Get the ID of the Einstein Agent User profile in your org.
sf data query -q "SELECT Id FROM Profile WHERE Name='Einstein Agent User'" -
Create the AFDX TestDrive Agent user with the CLI.
sf data import tree --files data-import/User.json -
Assign permissions to the AFDX TestDrive Agent user with the CLI.
sf org assign permset -n AFDX_Service_Agent_Perms -b USERNAME_OF_YOUR_AFDX_TESTDRIVE_AGENT
-
Open the
Local_Info_Agent_NGA.agentfile, located inforce-app/main/default/aiAuthoringBundles/Local_Info_Agent_NGA. -
Go to Line 9 and replace the value for
default_agent_userwith the user you created in STEP THREE. -
Deploy the updated
Local_Info_Agent_NGAauthoring bundle.sf project deploy start -m AiAuthoringBundle:Local_Info_Agent_NGA
- Open the
Local_Info_Agentin Agent Builder.
sf org open agent --api-name Local_Info_Agent
-
Open the settings and set Agent User to your AFDX TestDrive Agent user.
-
Open the Connections tab and create a new API connection using the
Agent_PreviewConnected App. -
Activate the agent by clicking "Activate" near the top-right of Agent Builder. If prompted, you can safely ignore the configuration issues and proceed with activation.
- Edit the policies of the
Agent_PreviewConnected App to ensure that JWT-based access tokens are issued.
- Retrieve the
Agent_PreviewConnected App from your org.sf project retrieve start -m ConnectedApp:Agent_Preview - Copy the
consumerKeyfrom line 8 ofAgent_Preview.connectedApp-meta.xml
- Link the
Agent_Previewconnected app to your authenticated user. IMPORTANT: When asked for the client secret, just press ENTER since it's not required.sf org login web --client-app AgentPreview --username YOUR_USERNAME --client-id PASTE_CONSUMER_KEY_FROM_AGENT_PREVIEW_CONNECTED_APP --scopes "sfap_api chatbot_api refresh_token api web" - Confirm everything was set up correctly by previewing the Local Info Agent from the CLI.
sf agent preview -c AgentPreview
sf agent generate agent-spec
sf agent generate agent-spec --spec specs/Local_Info_Agent-partialAgentSpec.yaml
sf agent generate authoring-bundle --name "My First NGA Agent"
sf project delete source -m Agent:My_First_NGA_Agent
sf agent test run --api-name Local_Info_Agent_Test --wait 5
sf agent generate test-spec --from-definition PATH/TO/YOUR/TEST.aiEvaluationDefinition-meta.xml





