Skip to content

Commit 1647af4

Browse files
authored
Merge pull request #74 from salesforcecli/js/edit-create-agent-messages
W-17684955: round 2 of edit of --help for agent create/generate spec commands
2 parents b385ac6 + 5e6bd82 commit 1647af4

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed

messages/agent.create.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ Create an agent in your org using a local agent spec file.
44

55
# description
66

7-
Before you run this command, you must first generate an agent spec file by running the "agent generate spec" CLI command, which outputs a YAML file with the agent properties and list of AI-generated topics. Topics define the range of jobs the agent can handle. Then specify the generated agent spec file to this command using the --spec flag, along with the name (label) of the new agent using the --agent-name flag.
7+
To run this comand, you must have an agent spec file, which is a YAML file that define the agent properties and contains a list of AI-generated topics. Topics define the range of jobs the agent can handle. Use the "agent generate agent-spec" CLI command to generate an agent spec file. Then specify the file to this command using the --spec flag, along with the name (label) of the new agent with the --agent-name flag. If you don't specify any of the required flags, the command prompts you.
88

9-
When this command finishes, your org contains the new agent, which you can then edit in the Agent Builder UI. The new agent's topics are the same as the ones listed in the agent spec file. The agent might also have some AI-generated actions. This command also retrieves all the metadata files associated with the new agent to your local Salesforce DX project.
9+
When this command completes, your org contains the new agent, which you can then edit and customize in the Agent Builder UI. The new agent's topics are the same as the ones listed in the agent spec file. The agent might also have some AI-generated actions, or you can add them. This command also retrieves all the metadata files associated with the new agent to your local Salesforce DX project.
1010

11-
Use the --preview flag to review what the agent looks like without actually saving it in your org. Rather, the command creates a JSON file with all the agent details in the current directory.
11+
Use the --preview flag to review what the agent looks like without actually saving it in your org. When previewing, the command creates a JSON file in the current directory with all the agent details.
1212

13-
To open the new agent in your org's Agent Builder UI, run this command: "sf org open agent --name <api-name-of-your-agent>".
13+
To open the new agent in your org's Agent Builder UI, run this command: "sf org open agent --name <agent-api-name>".
1414

1515
# flags.spec.summary
1616

@@ -42,14 +42,18 @@ Missing required flags: %s
4242

4343
# error.missingRequiredSpecProperties
4444

45-
Missing required spec file properties: %s
45+
Your agent spec file is missing these required properties: %s.
4646

4747
# examples
4848

49-
- Create an agent called "ResortManager" in an org with alias "my-org" using the specified agent spec file:
49+
- Create an agent by being prompted for the required information, such as the agent spec file, agent name, and agent API name and then create it in your default org:
5050

51-
<%= config.bin %> <%= command.id %> --agent-name ResortManager --spec specs/resortManagerAgent.yaml --target-org my-org
51+
<%= config.bin %> <%= command.id %>
5252

53-
- Preview the creation of an agent called "ResortManager" and use your default org:
53+
- Create an agent by specifying the agent name, API name, and spec file with flags; use the org with alias "my-org"; the command fails if the API name is already being used in your org:
5454

55-
<%= config.bin %> <%= command.id %> --agent-name ResortManager --spec specs/resortManagerAgent.yaml --preview
55+
<%= config.bin %> <%= command.id %> --agent-name "Resort Manager" --agent-api-name Resort_Manager --spec specs/resortManagerAgent.yaml --target-org my-org
56+
57+
- Preview the creation of an agent named "Resort Manager" and use your default org:
58+
59+
<%= config.bin %> <%= command.id %> --agent-name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview

messages/agent.generate.agent-spec.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ Generate an agent spec, which is a YAML file that captures what an agent can do.
44

55
# description
66

7-
Before you use Salesforce CLI to create an agent in your org, you must first generate an agent spec with this command. An agent spec is a YAML-formatted file that contains information about the agent, such as its role and company description, and then an AI-generated list of topics based on this information. Topics define the range of jobs your agent can handle.
7+
The first step in creating an agent in your org with Salesforce CLI is to generate an agent spec using this command. An agent spec is a YAML-formatted file that contains information about the agent, such as its role and company description, and then an AI-generated list of topics based on this information. Topics define the range of jobs your agent can handle.
88

9-
Use flags, such as --role and --company-description, to provide details about your company and the role that the agent plays in your company. If you prefer, you can also be prompted for the information. Upon command execution, the large language model (LLM) associated with your org uses the information you provided to generate a list of topics for the agent. Because the LLM uses the company and role information to generate the topics, we recommend that you provide accurate and specific details so the LLM generates the best and most relevant topics. Once generated, you can edit the spec file; for example, you can remove topics that don't apply to your agent or change the description of a particular topic.
9+
Use flags, such as --role and --company-description, to provide details about your company and the role that the agent plays in your company. If you prefer, you can also be prompted for the basic information; use --full-interview to be prompted for all required and optional properties. Upon command execution, the large language model (LLM) associated with your org uses the provided information to generate a list of topics for the agent. Because the LLM uses the company and role information to generate the topics, we recommend that you provide accurate, complete, and specific details so the LLM generates the best and most relevant topics. Once generated, you can edit the spec file; for example, you can remove topics that don't apply or change a topic's description.
1010

11-
You can iterate the spec generation process by using the --spec flag to pass an existing agent spec file to this command, and then using the --role, --company-description, etc, flags to refine your agent properties. Iteratively improving the description of your agent allows the LLM to generate progressively better topics.
11+
You can also iterate the spec generation process by using the --spec flag to pass an existing agent spec file to this command, and then using the --role, --company-description, etc, flags to refine your agent properties. Iteratively improving the description of your agent allows the LLM to generate progressively better topics.
1212

13-
You can also specify a custom prompt template that the agent uses, and ground the prompt template to add context and personalization to the agent's prompts.
13+
You can also specify other agent properties, such as a custom prompt template, how to ground the prompt template to add context to the agent's prompts, the tone of the prompts, and the username of a user in the org to assign to the agent.
1414

1515
When your agent spec is ready, you then create the agent in your org by running the "agent create" CLI command and specifying the spec with the --spec flag.
1616

1717
# flags.type.summary
1818

19-
Type of agent to create.
19+
Type of agent to create. Internal types are copilots used internally by your company and customer types are the agents you create for your customers.
2020

2121
# flags.role.summary
2222

@@ -92,7 +92,7 @@ Language the agent uses in conversations.
9292

9393
# flags.no-prompt.summary
9494

95-
Don't prompt the user to confirm spec file overwrite.
95+
Don't prompt the user to confirm that an existing spec file will be overwritten.
9696

9797
# examples
9898

@@ -104,9 +104,17 @@ Don't prompt the user to confirm spec file overwrite.
104104

105105
<%= config.bin %> <%= command.id %> --max-topics 5 --output-file specs/resortManagerAgent.yaml --target-org my-org
106106

107+
- Be prompted for all required and optional agent properties; use your default org:
108+
109+
<%= config.bin %> <%= command.id %> --full-interview
110+
107111
- Specify an existing agent spec file called "specs/resortManagerAgent.yaml", and then overwrite it with a new version that contains newly AI-generated topics based on the updated role information passed in with the --role flag:
108112

109-
<%= config.bin %> <%= command.id %> --spec specs/resortManagerAgent.yaml --output-file specs/resortManagerAgent.yaml --role "Field customer complaints, manage employee schedules, and ensure all resort operations are running smoothly" --target-org my-org
113+
<%= config.bin %> <%= command.id %> --spec specs/resortManagerAgent.yaml --output-file specs/resortManagerAgent.yaml --role "Field customer complaints, manage employee schedules, and ensure all resort operations are running smoothly"
114+
115+
- Specify that the conversational tone of the agent is formal and to attach the "resortmanager@myorg.com" username to it; be prompted for the required properties and use your default org:
116+
117+
<%= config.bin %> <%= command.id %> --tone formal --agent-user resortmanager@myorg.com
110118

111119
# error.missingRequiredFlags
112120

0 commit comments

Comments
 (0)