|
1 | 1 | # summary |
2 | 2 |
|
3 | | -Generate an agent spec, which is the list of jobs that the agent performs. |
| 3 | +Generate an agent spec, which is a YAML file that captures what an agent can do. |
4 | 4 |
|
5 | 5 | # description |
6 | 6 |
|
7 | | -When using Salesforce CLI to create an agent in your org, you can choose to generate a YAML-formatted agent spec file with this command as a first step. |
| 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. |
8 | 8 |
|
9 | | -An agent spec is a list of jobs and descriptions that capture what the agent can do. Use flags such as --role and --company-description to provide details about your company and the role that the agent plays in your company; you can also enter the information interactively if you prefer. When you then execute this command, the large language model (LLM) associated with your org uses the information to generate the list of jobs that the agent most likely performs. We recommend that you provide good details for --role, --company-description, etc, so that the LLM can generate the best and most relevant list of jobs and descriptions. Once generated, you can edit the spec file; for example, you can remove jobs that don't apply to your agent. |
| 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. |
10 | 10 |
|
11 | | -When your agent spec is ready, you then create the agent in your org by specifying the agent spec file to the --job-spec flag of the "agent create" CLI command. |
| 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. |
| 12 | + |
| 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. |
| 14 | + |
| 15 | +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. |
12 | 16 |
|
13 | 17 | # flags.output-file.summary |
14 | 18 |
|
15 | | -Path for the generated agent spec file (yaml); can be an absolute or relative path. |
| 19 | +Path for the generated YAML agent spec file; can be an absolute or relative path. |
16 | 20 |
|
17 | 21 | # flags.max-topics.summary |
18 | 22 |
|
19 | | -Maximum number of agent job topics to generate in the spec; default is 10. |
| 23 | +Maximum number of topics to generate in the agent spec; default is 10. |
20 | 24 |
|
21 | 25 | # flags.prompt-template.summary |
22 | 26 |
|
23 | | -Developer name of a customized prompt template to use instead of the default. |
| 27 | +API name of a customized prompt template to use instead of the default prompt template. |
24 | 28 |
|
25 | 29 | # flags.grounding-context.summary |
26 | 30 |
|
27 | | -Context information to be used with the customized prompt template. |
| 31 | +Context information and personalization that's added to your prompts when using a custom prompt template. |
28 | 32 |
|
29 | 33 | # flags.spec.summary |
30 | 34 |
|
31 | | -Spec file (yaml) to use as input to the command. |
| 35 | +Agent spec file, in YAML format, to use as input to the command. |
32 | 36 |
|
33 | 37 | # examples |
34 | 38 |
|
35 | | -- Create an agent spec for your default org in the default location and use flags to specify the agent's role and your company details: |
| 39 | +- Generate an agent spec in the default location and use flags to specify the agent properties, such as its role and your company details; use your default org: |
| 40 | + |
| 41 | + <%= config.bin %> <%= command.id %> --type customer --role "Field customer complaints and manage employee schedules." --company-name "Coral Cloud Resorts" --company-description "Provide customers with exceptional destination activities, unforgettable experiences, and reservation services." |
| 42 | + |
| 43 | +- Generate an agent spec by being prompted for the required agent properties and generate a maxiumum of 5 topics; write the generated file to the "specs/resortManagerSpec.yaml" file and use the org with alias "my-org": |
36 | 44 |
|
37 | | - <%= config.bin %> <%= command.id %> --type customer --role "Assist users in navigating and managing bookings" --company-name "Coral Cloud" --company-description "Resort that manages guests and their reservations and experiences" |
| 45 | + <%= config.bin %> <%= command.id %> --max-topics 5 --output-file specs/resortManagerAgent.yaml --target-org my-org |
38 | 46 |
|
39 | | -- Create an agent spec by being prompted for role and company details interactively; write the generated file to the "specs" directory and use the org with alias "my-org": |
| 47 | +- 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: |
40 | 48 |
|
41 | | - <%= config.bin %> <%= command.id %> --output-dir specs --target-org my-org |
| 49 | + <%= 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 |
42 | 50 |
|
43 | 51 | # error.missingRequiredFlags |
44 | 52 |
|
|
0 commit comments