Skip to content

Commit 7cbb644

Browse files
Merge pull request #278 from salesforcecli/jshackell-sfdc-patch-1
W-20424458: edit NGA cli command help
2 parents 3c49abf + 9f4dd40 commit 7cbb644

File tree

4 files changed

+47
-30
lines changed

4 files changed

+47
-30
lines changed

messages/agent.generate.authoring-bundle.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ Authoring bundles are metadata components that contain an agent's Agent Script f
88

99
Use this command to generate a new authoring bundle based on an agent spec YAML file, which you create with the "agent generate agent-spec" command. The agent spec YAML file is a high-level description of the agent; it describes its essence rather than exactly what it can do.
1010

11-
The metadata type for authoring bundles is aiAuthoringBundle, which consist of a standard "<bundle-name>.bundle-meta.xml" metadata file and the Agent Script file (with extension ".agent"). When you run this command, the new authoring bundle is generated in the force-app/main/default/aiAuthoringBundles/<bundle-name> directory. Use the --output-dir flag to generate them elsewhere.
11+
The metadata type for authoring bundles is aiAuthoringBundle, which consist of a standard "<bundle-api-name>.bundle-meta.xml" metadata file and the Agent Script file (with extension ".agent"). When you run this command, the new authoring bundle is generated in the force-app/main/default/aiAuthoringBundles/<bundle-api-name> directory. Use the --output-dir flag to generate them elsewhere.
1212

13-
After you generate the initial authoring bundle, vibe code (modify using natural language) the Agent Script file so your agent behaves exactly as you want. The generated Agent Script file is just a first draft of your agent! Then publish the agent to your org with the "agent publish authoring-bundle" command.
13+
After you generate the initial authoring bundle, code the Agent Script file so your agent behaves exactly as you want. The Agent Script file generated by this command is just a first draft of your agent! Interactively test the agent by conversing with it using the "agent preview" command. Then publish the agent to your org with the "agent publish authoring-bundle" command.
1414

1515
This command requires an org because it uses it to access an LLM for generating the Agent Script file.
1616

1717
# flags.spec.summary
1818

19-
Path to the agent spec YAML file.
19+
Path to the agent spec YAML file; if not specified, the command provides a list that you can choose from.
2020

2121
# flags.output-dir.summary
2222

2323
Directory where the authoring bundle files are generated.
2424

2525
# flags.name.summary
2626

27-
Name (label) of the authoring bundle.
27+
Name (label) of the authoring bundle; if not specified, you're prompted for the name.
2828

2929
# flags.api-name.summary
3030

@@ -36,11 +36,15 @@ API name of the new authoring bundle
3636

3737
# examples
3838

39+
- Generate an authoring bundle by being prompted for all required values, such as the agent spec YAML file, the bundle name, and the API name; use your default org:
40+
41+
<%= config.bin %> <%= command.id %>
42+
3943
- Generate an authoring bundle from the "specs/agentSpec.yaml" agent spec YAML file and give it the label "My Authoring Bundle"; use your default org:
4044

4145
<%= config.bin %> <%= command.id %> --spec specs/agentSpec.yaml --name "My Authoring Bundle"
4246

43-
- Same as previous example, but generate the files in the "other-package-dir/main/default" package directory; use the org with alias "my-dev-org":
47+
- Similar to previous example, but generate the authoring bundle files in the "other-package-dir/main/default" package directory; use the org with alias "my-dev-org":
4448

4549
<%= config.bin %> <%= command.id %> --spec specs/agentSpec.yaml --name "My Authoring Bundle" --output-dir other-package-dir/main/default --target-org my-dev-org
4650

messages/agent.preview.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,54 @@
11
# summary
22

3-
Interact with an active agent to preview how the agent responds to your statements, questions, and commands (utterances).
3+
Interact with an agent to preview how it responds to your statements, questions, and commands (utterances).
44

55
# description
66

7-
Use this command to have a natural language conversation with an active agent in your org, as if you were an actual user. The interface is simple: in the "Start typing..." prompt, enter a statement, question, or command; when you're done, enter Return. Your utterance is posted on the right along with a timestamp. The agent then responds on the left. To exit the conversation, hit ESC or Control+C.
7+
Use this command to have a natural language conversation with an agent while you code its Agent Script file. Previewing an agent works like an initial test to make sure it responds to your utterances as you expect. For example, you can test that the agent uses a particular topic when asked a question, and then whether it invokes the correct action associated with that topic. This command is the CLI-equivalent of the Preview panel in your org's Agentforce Builder UI.
88

9-
This command is useful to test if the agent responds to your utterances as you expect. For example, you can test that the agent uses a particular topic when asked a question, and then whether it invokes the correct action associated with that topic. This command is the CLI-equivalent of the Conversation Preview panel in your org's Agent Builder UI.
9+
This command uses the agent's local authoring bundle, which contains its Agent Script file. You can let the command provide a list of authoring bundles (labeled "(Agent Script)") to choose from or use the --authoring-bundle flag to specify a bundle's API name.
1010

11-
When the session concludes, the command asks if you want to save the API responses and chat transcripts. By default, the files are saved to the "./temp/agent-preview" directory. Specify a new default directory by setting the environment variable "SF_AGENT_PREVIEW_OUTPUT_DIR" to the directory. Or you can pass the directory to the --output-dir flag.
11+
You can use these two modes when previewing an agent from its Agent Script file:
1212

13-
Find the agent's API name in its Agent Details page of your org's Agentforce Studio UI in Setup. If your agent is currently deactivated, use the "agent activate" CLI command to activate it.
13+
- Simulated mode (Default): Uses only the Agent Script file to converse, and it simulates (mocks) all the actions. Use this mode if none of the Apex classes, flows, and prompt templates that implement your actions are available yet. The LLM uses the information about topics in the Agent Script file to simulate what the action does or how it responds.
14+
- Live mode: Uses the actual Apex classes, flows, and prompt templates in your development org in the agent preview. If you've changed the Apex classe, flows, or prompt templates in your local DX project, then you must deploy them to your development org if you want to use them in your live preview. You can use the Apex Replay Debugger to debug your Apex classes when using live mode.
1415

15-
IMPORTANT: Before you use this command, you must complete a number of configuration steps in your org and your DX project. For example, you must first create the link to a client connected app using the "org login web --client-app" CLI command to then get the value of the --client-app flag of this command. The examples in this help assume you've completed the steps. See "Preview an Agent" in the "Agentforce Developer Guide" for complete documentation: https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-preview.html.
16+
The interface is simple: in the "Start typing..." prompt, enter a statement, question, or command; when you're done, enter Return. Your utterance is posted on the right along with a timestamp. The agent then responds on the left. To exit the conversation, hit ESC or Control+C.
17+
18+
When the session concludes, the command asks if you want to save the API responses and chat transcripts. By default, the files are saved to the "./temp/agent-preview" directory. Specify a new default directory with the --output-dir flag.
19+
20+
NOTE: You can also use this command to connect to a published and active agent, which are labeled "(Published)" if you let this command provide the list of agents to preview. That use case, however, requires additional security and configuration in both your org and your DX project. The examples in this help are for previewing an agent from its Agent Script file in your DX project and require only simple authorization of your org, such as with the "org login web" command. The --client-app and --api-name flags are used only for previewing published and active agents, they don't apply to Agent Script agents. See "Connect to a Published Agent" in the "Agentforce Developer Guide" for complete documentation: https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-preview.html.
1621

1722
# flags.api-name.summary
1823

19-
API name of the agent you want to interact with.
24+
API name of the published and active agent you want to interact with.
2025

2126
# flags.authoring-bundle.summary
2227

23-
Preview a next-gen agent by specifying the API name of the authoring bundle metadata component that implements it.
28+
API name of the authoring bundle metadata component that contains the agent's Agent Script file.
2429

2530
# flags.client-app.summary
2631

27-
Name of the linked client app to use for the agent connection.
32+
Name of the linked client app to use for the connection to the published and active agent.
2833

2934
# flags.output-dir.summary
3035

3136
Directory where conversation transcripts are saved.
3237

3338
# flags.use-live-actions.summary
3439

35-
Use real actions in the org; if not specified, preview uses AI to mock actions.
40+
Use real actions in the org; if not specified, preview uses AI to simulate (mock) actions.
3641

3742
# flags.apex-debug.summary
3843

3944
Enable Apex debug logging during the agent preview conversation.
4045

4146
# examples
4247

43-
- Interact with an agent with API name Resort_Manager in the org with alias "my-org" and the linked "agent-app" connected app:
48+
- Preview an agent in simulated mode by choosing from a list of authoring bundles provided by the command; use the org with alias "my-dev-org":
4449

45-
<%= config.bin %> <%= command.id %> --api-name Resort_Manager --target-org my-org --client-app agent-app
50+
<%= config.bin %> <%= command.id %> --target-org my-dev-org
4651

47-
- Same as the preceding example, but this time save the conversation transcripts to the "./transcripts/my-preview" directory rather than the default "./temp/agent-preview":
52+
- Preview an agent in live mode by choosing from a list of authoring bundles. Save the conversation transcripts to the "./transcripts/my-preview" directory, enable the Apex debug logs, and use your default org:
4853

49-
<%= config.bin %> <%= command.id %> --api-name Resort_Manager --target-org my-org --client-app agent-app --output-dir transcripts/my-preview
54+
<%= config.bin %> <%= command.id %> --use-live-actions --apex-debug --output-dir transcripts/my-preview

messages/agent.publish.authoring-bundle.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
# summary
22

3-
Publish an authoring bundle to your org, which results in a new or updated agent.
3+
Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.
44

55
# description
66

77
An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension ".agent") that fully describes the agent using the Agent Script language.
88

9-
When you publish an authoring bundle to your org, a number of things happen. First, this command validates that the Agent Script file successfully compiles. If there are compilation errors, the command exits and you must fix the Agent Script file to continue. Once the Agent Script file compiles, then the authoring bundle metadata component is deployed to the org, and all associated agent metadata components, such as the Bot, BotVersion, and GenAiXXX components, are either created or updated. The org then either creates a new agent based on the deployed authoring bundle, or creates a new version of the agent if it already existed. Finally, all the new or changed metadata components associated with the new agent are retrieved back to your local DX project.
9+
When you publish an authoring bundle to your org, a number of things happen. First, this command validates that the Agent Script file successfully compiles. If there are compilation errors, the command exits and you must fix the Agent Script file to continue. Once the Agent Script file compiles, then the authoring bundle metadata component is deployed to the org. All associated agent metadata components, such as the Bot, BotVersion, and GenAiXXX components, are either created or updated in the org. Finally, all the new or changed metadata components associated with the new agent are retrieved back to your local DX project.
1010

11-
This command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.
11+
This command uses the API name of the authoring bundle.
1212

1313
# examples
1414

15-
- Publish an authoring bundle with API name MyAuthoringBundle to the org with alias "my-org":
15+
- Publish an authoring bundle by being prompted for its API name; use your default org:
1616

17-
<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --target-org my-org
17+
<%= config.bin %> <%= command.id %>
18+
19+
- Publish an authoring bundle with API name MyAuthoringBundle to the org with alias "my-dev-org":
20+
21+
<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --target-org my-dev-org
1822

1923
# flags.api-name.summary
2024

21-
API name of the authoring bundle you want to publish.
25+
API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.
2226

2327
# flags.api-name.prompt
2428

@@ -30,7 +34,7 @@ Required flag(s) missing: %s.
3034

3135
# error.invalidBundlePath
3236

33-
Invalid bundle path. Provide a valid directory path to an authoring bundle.
37+
Invalid authoring bundle path. Provide a valid directory path to an authoring bundle.
3438

3539
# error.publishFailed
3640

messages/agent.validate.authoring-bundle.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,23 @@ Validate an authoring bundle to ensure its Agent Script file compiles successful
66

77
An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension ".agent") that fully describes the agent using the Agent Script language.
88

9-
This command validates that the Agent Script file in the authoring bundle compiles without errors so that you can later publish the bundle to your org. Use this command while you vibe code (modify with natural language) the Agent Script file to ensure that it's always valid. If the validation fails, the command outputs the list of syntax errors, a brief description of the error, and the location in the Agent Script file where the error occurred.
9+
This command validates that the Agent Script file in the authoring bundle compiles without errors so that you can later publish the bundle to your org. Use this command while you code the Agent Script file to ensure that it's valid. If the validation fails, the command outputs the list of syntax errors, a brief description of the error, and the location in the Agent Script file where the error occurred.
1010

1111
This command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.
1212

1313
# examples
1414

15-
- Validate an authoring bundle with API name MyAuthoringBundle:
15+
- Validate an authoring bundle by being prompted for its API name; use your default org:
1616

17-
<%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle
17+
<%= config.bin %> <%= command.id %>
18+
19+
- Validate an authoring bundle with API name MyAuthoringBundle; use the org with alias "my-dev-org":
20+
21+
<%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle --target-org my-dev-org
1822

1923
# flags.api-name.summary
2024

21-
API name of the authoring bundle you want to validate.
25+
API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.
2226

2327
# flags.api-name.prompt
2428

0 commit comments

Comments
 (0)