Skip to content

Commit acf0e2b

Browse files
Merge pull request #243 from salesforcecli/wr/nga
Wr/nga @W-19852996@
2 parents a007559 + 574a3dc commit acf0e2b

File tree

6 files changed

+120
-79
lines changed

6 files changed

+120
-79
lines changed

README.md

Lines changed: 72 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ EXAMPLES
112112
$ sf agent activate --api-name Resort_Manager --target-org my-org
113113
```
114114

115-
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/activate.ts)_
115+
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/activate.ts)_
116116

117117
## `sf agent create`
118118

@@ -174,7 +174,7 @@ EXAMPLES
174174
$ sf agent create --name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
175175
```
176176

177-
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/create.ts)_
177+
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/create.ts)_
178178

179179
## `sf agent deactivate`
180180

@@ -214,7 +214,7 @@ EXAMPLES
214214
$ sf agent deactivate --api-name Resort_Manager --target-org my-org
215215
```
216216

217-
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/deactivate.ts)_
217+
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/deactivate.ts)_
218218

219219
## `sf agent generate agent-spec`
220220

@@ -319,48 +319,55 @@ EXAMPLES
319319
$ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
320320
```
321321

322-
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/generate/agent-spec.ts)_
322+
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/generate/agent-spec.ts)_
323323

324324
## `sf agent generate authoring-bundle`
325325

326-
Generate an authoring bundle from an agent specification.
326+
Generate a local authoring bundle from an existing agent spec YAML file.
327327

328328
```
329329
USAGE
330330
$ sf agent generate authoring-bundle -o <value> [--json] [--flags-dir <value>] [--api-name <value>] [--api-version <value>] [-f
331331
<value>] [-d <value>] [-n <value>]
332332
333333
FLAGS
334-
-d, --output-dir=<value> Directory where the authoring bundle files will be generated.
335-
-f, --spec=<value> Path to the agent specification file.
334+
-d, --output-dir=<value> Directory where the authoring bundle files are generated.
335+
-f, --spec=<value> Path to the agent spec YAML file.
336336
-n, --name=<value> Name (label) of the authoring bundle.
337337
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
338338
configuration variable is already set.
339339
--api-name=<value> API name of the new authoring bundle; if not specified, the API name is derived from the
340-
authoring bundle name (label); the API name must not exist in the org.
340+
authoring bundle name (label); the API name can't exist in the org.
341341
--api-version=<value> Override the api version used for api requests made by this command
342342
343343
GLOBAL FLAGS
344344
--flags-dir=<value> Import flag values from a directory.
345345
--json Format output as json.
346346
347347
DESCRIPTION
348-
Generate an authoring bundle from an agent specification.
348+
Generate a local authoring bundle from an existing agent spec YAML file.
349349
350-
Generates an authoring bundle containing Agent and its meta.xml file from an agent specification file.
350+
Authoring bundles are metadata types that represent the next-gen Salesforce agents. Their exact metadata name is
351+
AiAuthoringBundle and they consist of a standard "\*-meta.xml" metadata file and an agent file (with extension
352+
".agent") that fully describes the next-gen agent. Use this command to generate an authoring bundle based on an agent
353+
spec YAML file, which you create with the "agent create agent-spec" command.
354+
355+
By default, authoring bundles are generated in the force-app/main/default/aiAuthoringBundles/<api-name> directory. Use
356+
the --output-dir to generate them elsewhere.
351357
352358
EXAMPLES
353-
Generate an authoring bundle from a specification file:
359+
Generate an authoring bundle from the "specs/agentSpec.yaml" agent spec YAML file and give it the label "My
360+
Authoring Bundle":
354361
355-
$ sf agent generate authoring-bundle --spec-file path/to/spec.yaml --name "My Authoring Bundle"
362+
$ sf agent generate authoring-bundle --spec-file specs/agentSpec.yaml --name "My Authoring Bundle"
356363
357-
Generate an authoring bundle with a custom output directory:
364+
Same as previous example, but generate the files in the other-package-dir/main/default/aiAuthoringBundles directory:
358365
359-
$ sf agent generate authoring-bundle --spec-file path/to/spec.yaml --name "My Authoring Bundle" --output-dir \
360-
path/to/output
366+
$ sf agent generate authoring-bundle --spec-file specs/agentSpec.yaml --name "My Authoring Bundle" --output-dir \
367+
other-package-dir/main/default/aiAuthoringBundles
361368
```
362369

363-
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/generate/authoring-bundle.ts)_
370+
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/generate/authoring-bundle.ts)_
364371

365372
## `sf agent generate template`
366373

@@ -408,7 +415,7 @@ EXAMPLES
408415
force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1
409416
```
410417

411-
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/generate/template.ts)_
418+
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/generate/template.ts)_
412419

413420
## `sf agent generate test-spec`
414421

@@ -469,7 +476,7 @@ EXAMPLES
469476
force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml
470477
```
471478

472-
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/generate/test-spec.ts)_
479+
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/generate/test-spec.ts)_
473480

474481
## `sf agent preview`
475482

@@ -481,16 +488,15 @@ USAGE
481488
[--authoring-bundle <value>] [-d <value>] [-x]
482489
483490
FLAGS
484-
-c, --client-app=<value> Name of the linked client app to use for the agent connection. You must have
485-
previously created this link with "org login web --client-app". Run "org display" to
486-
see the available linked client apps.
491+
-c, --client-app=<value> Name of the linked client app to use for the agent connection.
487492
-d, --output-dir=<value> Directory where conversation transcripts are saved.
488493
-n, --api-name=<value> API name of the agent you want to interact with.
489494
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
490495
configuration variable is already set.
491496
-x, --apex-debug Enable Apex debug logging during the agent preview conversation.
492497
--api-version=<value> Override the api version used for api requests made by this command
493-
--authoring-bundle=<value> Preview an ephemeral agent by specifying the API name of the Authoring Bundle metadata
498+
--authoring-bundle=<value> Preview a next-gen agent by specifying the API name of the authoring bundle metadata
499+
component that implements it.
494500
495501
GLOBAL FLAGS
496502
--flags-dir=<value> Import flag values from a directory.
@@ -517,8 +523,9 @@ DESCRIPTION
517523
currently deactivated, use the "agent activate" CLI command to activate it.
518524
519525
IMPORTANT: Before you use this command, you must complete a number of configuration steps in your org and your DX
520-
project. The examples in this help assume you've completed the steps. See "Preview an Agent" in the "Agentforce
521-
Developer Guide" for complete documentation:
526+
project. For example, you must first create the link to a client connected app using the "org login web --client-app"
527+
CLI command to then get the value of the --client-app flag of this command. The examples in this help assume you've
528+
completed the steps. See "Preview an Agent" in the "Agentforce Developer Guide" for complete documentation:
522529
https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-preview.html.
523530
524531
EXAMPLES
@@ -534,18 +541,18 @@ EXAMPLES
534541
transcripts/my-preview
535542
```
536543

537-
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/preview.ts)_
544+
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/preview.ts)_
538545

539546
## `sf agent publish authoring-bundle`
540547

541-
Publish an Agent Authoring Bundle as a new agent
548+
Publish an authoring bundle to your org, which results in a new next-gen agent.
542549

543550
```
544551
USAGE
545552
$ sf agent publish authoring-bundle -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-n <value>]
546553
547554
FLAGS
548-
-n, --api-name=<value> API name of the Agent Authoring Bundle to publish.
555+
-n, --api-name=<value> API name of the authoring bundle you want to publish.
549556
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
550557
configuration variable is already set.
551558
--api-version=<value> Override the api version used for api requests made by this command
@@ -555,18 +562,29 @@ GLOBAL FLAGS
555562
--json Format output as json.
556563
557564
DESCRIPTION
558-
Publish an Agent Authoring Bundle as a new agent
565+
Publish an authoring bundle to your org, which results in a new next-gen agent.
566+
567+
When you publish an authoring bundle to your org, a number of things happen. First, this command validates that the
568+
agent file (with extension ".agent") successfully compiles. Then the authoring bundle metadata component is deployed
569+
to the org, and all associated metadata components, such as the Bot, BotVersion, and GenAiXXX components, are either
570+
created or updated. The org then creates a new next-gen agent based on the deployed authoring bundle and associated
571+
metadata. Finally, all the metadata associated with the new agent is retrieved back to your local DX project.
572+
573+
Authoring bundles are metadata types that represent the next-gen Salesforce agents. Their exact metadata name is
574+
AiAuthoringBundle and they consist of a standard "\*-meta.xml" metadata file and an agent file (with extension
575+
".agent") that fully describes the next-gen agent.
559576
560-
Publishes an Agent Authoring Bundle by compiling the .agent file and creating a new agent in your org.
577+
This command requires the API name of the authoring bundle; if you don't provide it with the --api-name flag, the
578+
command prompts you for it.
561579
562580
EXAMPLES
563-
Publish an Agent Authoring Bundle:
581+
Publish an authoring bundle with API name MyAuthoringBundle to the org with alias "my-org", resulting in a new agent
582+
named "My Fab Agent"::
564583
565-
$ sf agent publish authoring-bundle --api-name path/to/bundle --agent-name "My New Agent" --target-org \
566-
myorg@example.com
584+
$ sf agent publish authoring-bundle --api-name MyAuthoringbundle --agent-name "My Fab Agent" --target-org my-org
567585
```
568586

569-
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/publish/authoring-bundle.ts)_
587+
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/publish/authoring-bundle.ts)_
570588

571589
## `sf agent test create`
572590

@@ -621,7 +639,7 @@ EXAMPLES
621639
$ sf agent test create --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview
622640
```
623641

624-
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/test/create.ts)_
642+
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/test/create.ts)_
625643

626644
## `sf agent test list`
627645

@@ -656,7 +674,7 @@ EXAMPLES
656674
$ sf agent test list --target-org my-org
657675
```
658676

659-
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/test/list.ts)_
677+
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/test/list.ts)_
660678

661679
## `sf agent test results`
662680

@@ -722,7 +740,7 @@ FLAG DESCRIPTIONS
722740
expression when using custom evaluations.
723741
```
724742

725-
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/test/results.ts)_
743+
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/test/results.ts)_
726744

727745
## `sf agent test resume`
728746

@@ -795,7 +813,7 @@ FLAG DESCRIPTIONS
795813
expression when using custom evaluations.
796814
```
797815

798-
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/test/resume.ts)_
816+
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/test/resume.ts)_
799817

800818
## `sf agent test run`
801819

@@ -869,18 +887,18 @@ FLAG DESCRIPTIONS
869887
expression when using custom evaluations.
870888
```
871889

872-
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/test/run.ts)_
890+
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/test/run.ts)_
873891

874892
## `sf agent validate authoring-bundle`
875893

876-
Validate an Agent Authoring Bundle
894+
Validate a local authoring bundle to ensure it compiles successfully and can be used to create a next-gen agent.
877895

878896
```
879897
USAGE
880898
$ sf agent validate authoring-bundle -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-n <value>]
881899
882900
FLAGS
883-
-n, --api-name=<value> API name of the Agent Authoring Bundle to validate.
901+
-n, --api-name=<value> API name of the authoring bundle you want to validate.
884902
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
885903
configuration variable is already set.
886904
--api-version=<value> Override the api version used for api requests made by this command
@@ -890,16 +908,25 @@ GLOBAL FLAGS
890908
--json Format output as json.
891909
892910
DESCRIPTION
893-
Validate an Agent Authoring Bundle
911+
Validate a local authoring bundle to ensure it compiles successfully and can be used to create a next-gen agent.
912+
913+
Authoring bundles are metadata types that represent the next-gen Salesforce agents. Their exact metadata name is
914+
AiAuthoringBundle and they consist of a standard "\*-meta.xml" metadata file and an agent file (with extension
915+
".agent") that fully describes the next-gen agent. Generate a local authoring bundle with the "agent generate
916+
authoring-bundle" command.
917+
918+
This command validates that the agent file (with extension ".agent") that's part of the authoring bundle compiles
919+
without errors and can later be used to successfully create a next-gen agent.
894920
895-
Validates an Agent Authoring Bundle by compiling the .agent file and checking for errors.
921+
This command requires the API name of the authoring bundle; if you don't provide it with the --api-name flag, the
922+
command prompts you for it.
896923
897924
EXAMPLES
898-
Validate an Agent Authoring Bundle:
925+
Validate a local authoring bundle with API name MyAuthoringBundle:
899926
900-
$ sf agent validate authoring-bundle --api-name path/to/bundle
927+
$ sf agent validate authoring-bundle --api-name MyAuthoringBundle
901928
```
902929

903-
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.7/src/commands/agent/validate/authoring-bundle.ts)_
930+
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.9/src/commands/agent/validate/authoring-bundle.ts)_
904931

905932
<!-- commandsstop -->
Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,51 @@
11
# summary
22

3-
Generate an authoring bundle from an agent specification.
3+
Generate a local authoring bundle from an existing agent spec YAML file.
44

55
# description
66

7-
Generates an authoring bundle containing Agent and its meta.xml file from an agent specification file.
7+
Authoring bundles are metadata types that represent the next-gen Salesforce agents. Their exact metadata name is AiAuthoringBundle and they consist of a standard "\*-meta.xml" metadata file and an agent file (with extension ".agent") that fully describes the next-gen agent. Use this command to generate an authoring bundle based on an agent spec YAML file, which you create with the "agent create agent-spec" command.
8+
9+
By default, authoring bundles are generated in the force-app/main/default/aiAuthoringBundles/<api-name> directory. Use the --output-dir to generate them elsewhere.
810

911
# flags.spec.summary
1012

11-
Path to the agent specification file.
13+
Path to the agent spec YAML file.
1214

1315
# flags.output-dir.summary
1416

15-
Directory where the authoring bundle files will be generated.
17+
Directory where the authoring bundle files are generated.
1618

1719
# flags.name.summary
1820

1921
Name (label) of the authoring bundle.
2022

2123
# flags.api-name.summary
2224

23-
API name of the new authoring bundle; if not specified, the API name is derived from the authoring bundle name (label); the API name must not exist in the org.
25+
API name of the new authoring bundle; if not specified, the API name is derived from the authoring bundle name (label); the API name can't exist in the org.
2426

2527
# flags.api-name.prompt
2628

2729
API name of the new authoring bundle
2830

2931
# examples
3032

31-
- Generate an authoring bundle from a specification file:
32-
<%= config.bin %> <%= command.id %> --spec-file path/to/spec.yaml --name "My Authoring Bundle"
33+
- Generate an authoring bundle from the "specs/agentSpec.yaml" agent spec YAML file and give it the label "My Authoring Bundle":
34+
35+
<%= config.bin %> <%= command.id %> --spec-file specs/agentSpec.yaml --name "My Authoring Bundle"
36+
37+
- Same as previous example, but generate the files in the other-package-dir/main/default/aiAuthoringBundles directory:
3338

34-
- Generate an authoring bundle with a custom output directory:
35-
<%= config.bin %> <%= command.id %> --spec-file path/to/spec.yaml --name "My Authoring Bundle" --output-dir path/to/output
39+
<%= config.bin %> <%= command.id %> --spec-file specs/agentSpec.yaml --name "My Authoring Bundle" --output-dir other-package-dir/main/default/aiAuthoringBundles
3640

3741
# error.no-spec-file
3842

39-
No agent specification file found at the specified path.
43+
No agent spec YAML file found at the specified path.
4044

4145
# error.invalid-spec-file
4246

43-
The specified file is not a valid agent specification file.
47+
The specified file is not a valid agent spec YAML file.
4448

4549
# error.failed-to-create-agent
4650

47-
Failed to create Agent from the agent specification.
51+
Failed to create a next-gen agent from the agent spec YAML file.

0 commit comments

Comments
 (0)