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 Name | Required? | Equivalent agent generate agent-spec Flag Name | Description |
---|---|---|---|
agentType | Yes | --type | The type of agent you want to create. Valid values:
Example: agentType: customer |
companyName | Yes | --company-name | Name of your company. Example: companyName: Coral Cloud Resorts |
companyDescription | Yes | --company-description | Natural language description of your company. Example: companyDescription: Provides customers with exceptional destination activities and unforgettable experiences. |
role | Yes | --role | Natural 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. |
maxNumOfTopics | No. | --max-topics | Maximum number of topics that the LLM generates when you run agent generate agent-spec . The default value is 5. Example: maxTopics: 10 |
agentUser | No. | --agent-user | Username 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 |
enrichLogs | No. | --enrich-logs | Adds 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 |
tone | No. | --tone | Conversational 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 |
promptTemplateName | No. | --prompt-template | API 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 |
groundingContext | No. | --grounding-context | Context 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. |
topics | Yes. | None. | List of topics generated by the LLM based on the agent properties. Example: topics: |
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 Name | Required? | Description |
---|---|---|
name | Yes. | The name (label) of the test. Example: name: Resort Manager Tests |
description | No. | The purpose of the test. Example: description: Tests for the Resort Manager agent. |
subjectType | Yes. | The type of subject being tested. The only currently supported value is AGENT .Example: |
subjectName | Yes. | The API name of the agent, which you can find on the agent details page in Setup. Example: subjectName: Resort_Manager |
subjectVersion | No. | 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 |
testCases | Yes. | List of one or more test cases. Example: testCases: |
testCases.utterance | Yes. | Natural language statement, question, or command to test the agent. Example: - utterance: Who is working the front desk today at noon? |
testCases.expectedTopic | Yes. | 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.expectedActions | Yes. | The API name of one or more actions associated with the topic that you expect the agent to use. Example: expectedActions: |
testCases.expectedOutcome | Yes. | Natural language description of the expected outcome of the test case. Example: expectedOutcome: Anna is working the desk. |