Agentforce DX Reference

Reference information for Agentforce DX YAML files.

This table lists all the properties you can include in the agent spec YAML file. You use this YAML file to create an agent with the agent create command. See Agent Spec File Example for a full example.

Property NameRequired?Equivalent agent generate agent-spec Flag NameDescription
agentTypeYes--typeThe type of agent you want to create. Valid values:
  • customer: The agent interacts with your customers.
  • internal: The agent interacts with your employees.

Example:

agentType: customer
companyNameYes--company-nameName of your company.

Example:

companyName: Coral Cloud Resorts
companyDescriptionYes--company-descriptionNatural language description of your company.

Example:

companyDescription: Provides customers with exceptional destination activities and unforgettable experiences.
roleYes--roleNatural language description of the role that the agent plays in your company and what tasks it can perform.

Example:

role: Fields customer complaints, manages employee schedules, and generally makes sure everything is working smoothly.
maxNumOfTopicsNo.--max-topicsMaximum number of topics that the LLM generates when you run agent generate agent-spec. The default value is 5.

Example:

maxTopics: 10
agentUserNo.--agent-userUsername of a user in your org to which to assign your agent; determines what your agent can access and do. Be sure you provide the required permissions to this user. The username must exist in your org.

To learn more about permissions, start with Give Users Access to the Default Agentforce Agent.

Example:

agentUser: managerrole@salesforce.com
enrichLogsNo.--enrich-logsAdds agent conversation data to event logs so you can view all agent session activity in one place. The default value is false.

Example:

enrichLogs: true
toneNo.--toneConversational style of the agent, such as how it expresses your brand personality in its messages through word choice, punctuation, and sentence structure. Possible values are casual (default), formal, and neutral.

See Language Settings for more information.

Example:

tone: formal
promptTemplateNameNo.--prompt-templateAPI name of a customized prompt template that the agent uses instead of the default template. Prompt templates are reusable, detailed prompts that help the LLM generate a high-quality response when a user uses your agent. Can include placeholders for information that changes, such as customer names, contact information, and product prices.

To find the API name of your prompt template, navigate to Prompt Builder in your org, click on the template name, and open its Settings.

See Get to Know Prompt Builder for more information.

Example:

promptTemplateName: einstein_gpt__answerWithKnowledge
groundingContextNo.--grounding-contextContext information and personalization that's added to your agent’s prompts when using a custom prompt template.

See Ground Prompt Templates with Salesforce Resources for Salesforce-specific examples of grounding contexts.

Example:

groundingContext: You are a resort manager and you need to create a schedule for the {!$Input:User.Name} employee.
topicsYes.None.List of topics generated by the LLM based on the agent properties.

Example:
 topics:
- name: Customer Complaint Resolution
description: Automate customer complaints.
- name: Employee Schedule Management
description: Optimize employee scheduling.

This table lists all the properties you can include in the agent test spec YAML file. You use this YAML file to create an agent test with the agent test create command. See Generate a Test Spec File for a full example.

Property NameRequired?Description
nameYes.The name (label) of the test.

Example:

name: Resort Manager Tests
descriptionNo.The purpose of the test.

Example:

description: Tests for the Resort Manager agent.
subjectTypeYes.The type of subject being tested. The only currently supported value is AGENT.

Example:

subjectNameYes.The API name of the agent, which you can find on the agent details page in Setup.

Example:

subjectName: Resort_Manager
subjectVersionNo.The agent version to test. If not provided, the latest active version is used by default. You can find the version in the BotVersion metadata type.

Example:

subjectVersion: v1
testCasesYes.List of one or more test cases.

Example:
testCases:
- utterance: Who is working the front desk today at noon?
expectedTopic: p_16jQP0000000PEX_Employee_Sched_Manage
expectedActions:
- EmployeeCopilot__CreateAToDo
expectedOutcome: Anna is working the desk.
testCases.utteranceYes.Natural language statement, question, or command to test the agent.

Example:

- utterance: Who is working the front desk today at noon?
testCases.expectedTopicYes.The API name of the topic that you expect the agent to use when it responds to the utterance.

Example:

expectedTopic: p_16jQP0000000PEX_Employee_Sched_Manage
testCases.expectedActionsYes.The API name of one or more actions associated with the topic that you expect the agent to use.

Example:
 expectedActions:
- EmployeeCopilotCreateAToDo
- EmployeeCopilot
UpdateSchedule
testCases.expectedOutcomeYes.Natural language description of the expected outcome of the test case.

Example:

expectedOutcome: Anna is working the desk.