@salesforce/cli 2.115.13 → 2.115.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -25,7 +25,7 @@ $ npm install -g @salesforce/cli
25
25
  $ sf COMMAND
26
26
  running command...
27
27
  $ sf (--version|-v)
28
- @salesforce/cli/2.115.13 linux-x64 node-v22.21.1
28
+ @salesforce/cli/2.115.14 linux-x64 node-v22.21.1
29
29
  $ sf --help [COMMAND]
30
30
  USAGE
31
31
  $ sf COMMAND
@@ -46,14 +46,17 @@ See [architecture page](ARCHITECTURE.md) for diagrams of the Salesforce CLI.
46
46
  - [`sf agent create`](#sf-agent-create)
47
47
  - [`sf agent deactivate`](#sf-agent-deactivate)
48
48
  - [`sf agent generate agent-spec`](#sf-agent-generate-agent-spec)
49
+ - [`sf agent generate authoring-bundle`](#sf-agent-generate-authoring-bundle)
49
50
  - [`sf agent generate template`](#sf-agent-generate-template)
50
51
  - [`sf agent generate test-spec`](#sf-agent-generate-test-spec)
51
52
  - [`sf agent preview`](#sf-agent-preview)
53
+ - [`sf agent publish authoring-bundle`](#sf-agent-publish-authoring-bundle)
52
54
  - [`sf agent test create`](#sf-agent-test-create)
53
55
  - [`sf agent test list`](#sf-agent-test-list)
54
56
  - [`sf agent test results`](#sf-agent-test-results)
55
57
  - [`sf agent test resume`](#sf-agent-test-resume)
56
58
  - [`sf agent test run`](#sf-agent-test-run)
59
+ - [`sf agent validate authoring-bundle`](#sf-agent-validate-authoring-bundle)
57
60
  - [`sf alias list`](#sf-alias-list)
58
61
  - [`sf alias set`](#sf-alias-set)
59
62
  - [`sf alias unset`](#sf-alias-unset)
@@ -244,7 +247,7 @@ EXAMPLES
244
247
  $ sf agent activate --api-name Resort_Manager --target-org my-org
245
248
  ```
246
249
 
247
- _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.24.35/src/commands/agent/activate.ts)_
250
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/activate.ts)_
248
251
 
249
252
  ## `sf agent create`
250
253
 
@@ -272,6 +275,11 @@ GLOBAL FLAGS
272
275
  DESCRIPTION
273
276
  Create an agent in your org using a local agent spec file.
274
277
 
278
+ NOTE: This command creates an agent that doesn't use Agent Script as its blueprint. We generally don't recommend you
279
+ use this workflow to create an agent. Rather, use the "agent generate|validate|publish authoring-bundle" commands to
280
+ author agents that use the Agent Script language. See "Author an Agent"
281
+ (https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-nga-author-agent.html) for details.
282
+
275
283
  To run this command, you must have an agent spec file, which is a YAML file that define the agent properties and
276
284
  contains a list of AI-generated topics. Topics define the range of jobs the agent can handle. Use the "agent generate
277
285
  agent-spec" CLI command to generate an agent spec file. Then specify the file to this command using the --spec flag,
@@ -306,7 +314,7 @@ EXAMPLES
306
314
  $ sf agent create --name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
307
315
  ```
308
316
 
309
- _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.24.35/src/commands/agent/create.ts)_
317
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/create.ts)_
310
318
 
311
319
  ## `sf agent deactivate`
312
320
 
@@ -346,7 +354,7 @@ EXAMPLES
346
354
  $ sf agent deactivate --api-name Resort_Manager --target-org my-org
347
355
  ```
348
356
 
349
- _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.24.35/src/commands/agent/deactivate.ts)_
357
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/deactivate.ts)_
350
358
 
351
359
  ## `sf agent generate agent-spec`
352
360
 
@@ -397,10 +405,9 @@ GLOBAL FLAGS
397
405
  DESCRIPTION
398
406
  Generate an agent spec, which is a YAML file that captures what an agent can do.
399
407
 
400
- The first step in creating an agent in your org with Salesforce CLI is to generate an agent spec using this command.
401
- An agent spec is a YAML-formatted file that contains information about the agent, such as its role and company
402
- description, and then an AI-generated list of topics based on this information. Topics define the range of jobs your
403
- agent can handle.
408
+ An agent spec is a YAML-formatted file that contains basic information about the agent, such as its role, company
409
+ description, and an AI-generated list of topics based on this information. Topics define the range of jobs your agent
410
+ can handle.
404
411
 
405
412
  Use flags, such as --role and --company-description, to provide details about your company and the role that the agent
406
413
  plays in your company. If you prefer, you can also be prompted for the basic information; use --full-interview to be
@@ -418,8 +425,11 @@ DESCRIPTION
418
425
  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
419
426
  agent.
420
427
 
421
- When your agent spec is ready, you then create the agent in your org by running the "agent create" CLI command and
422
- specifying the spec with the --spec flag.
428
+ When your agent spec is ready, generate an authoring bundle from it by passing the spec file to the --spec flag of the
429
+ "agent generate authoring-bundle" CLI command. An authoring bundle is a metadata type that contains an Agent Script
430
+ file, which is the blueprint for an agent. (While not recommended, you can also use the agent spec file to immediately
431
+ create an agent with the "agent create" command. We don't recommend this workflow because these types of agents don't
432
+ use Agent Script, and are thus less flexible and more difficult to maintain.)
423
433
 
424
434
  EXAMPLES
425
435
  Generate an agent spec in the default location and use flags to specify the agent properties, such as its role and
@@ -451,7 +461,73 @@ EXAMPLES
451
461
  $ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
452
462
  ```
453
463
 
454
- _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.24.35/src/commands/agent/generate/agent-spec.ts)_
464
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/generate/agent-spec.ts)_
465
+
466
+ ## `sf agent generate authoring-bundle`
467
+
468
+ Generate an authoring bundle from an existing agent spec YAML file.
469
+
470
+ ```
471
+ USAGE
472
+ $ sf agent generate authoring-bundle -o <value> [--json] [--flags-dir <value>] [--api-name <value>] [--api-version <value>] [-f
473
+ <value>] [-d <value>] [-n <value>]
474
+
475
+ FLAGS
476
+ -d, --output-dir=<value> Directory where the authoring bundle files are generated.
477
+ -f, --spec=<value> Path to the agent spec YAML file; if not specified, the command provides a list that you
478
+ can choose from.
479
+ -n, --name=<value> Name (label) of the authoring bundle; if not specified, you're prompted for the name.
480
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
481
+ configuration variable is already set.
482
+ --api-name=<value> API name of the new authoring bundle; if not specified, the API name is derived from the
483
+ authoring bundle name (label); the API name can't exist in the org.
484
+ --api-version=<value> Override the api version used for api requests made by this command
485
+
486
+ GLOBAL FLAGS
487
+ --flags-dir=<value> Import flag values from a directory.
488
+ --json Format output as json.
489
+
490
+ DESCRIPTION
491
+ Generate an authoring bundle from an existing agent spec YAML file.
492
+
493
+ Authoring bundles are metadata components that contain an agent's Agent Script file. The Agent Script file is the
494
+ agent's blueprint; it fully describes what the agent can do using the Agent Script language.
495
+
496
+ Use this command to generate a new authoring bundle based on an agent spec YAML file, which you create with the "agent
497
+ generate agent-spec" command. The agent spec YAML file is a high-level description of the agent; it describes its
498
+ essence rather than exactly what it can do.
499
+
500
+ The metadata type for authoring bundles is aiAuthoringBundle, which consist of a standard
501
+ "<bundle-api-name>.bundle-meta.xml" metadata file and the Agent Script file (with extension ".agent"). When you run
502
+ this command, the new authoring bundle is generated in the force-app/main/default/aiAuthoringBundles/<bundle-api-name>
503
+ directory. Use the --output-dir flag to generate them elsewhere.
504
+
505
+ After you generate the initial authoring bundle, code the Agent Script file so your agent behaves exactly as you want.
506
+ The Agent Script file generated by this command is just a first draft of your agent! Interactively test the agent by
507
+ conversing with it using the "agent preview" command. Then publish the agent to your org with the "agent publish
508
+ authoring-bundle" command.
509
+
510
+ This command requires an org because it uses it to access an LLM for generating the Agent Script file.
511
+
512
+ EXAMPLES
513
+ Generate an authoring bundle by being prompted for all required values, such as the agent spec YAML file, the bundle
514
+ name, and the API name; use your default org:
515
+
516
+ $ sf agent generate authoring-bundle
517
+
518
+ Generate an authoring bundle from the "specs/agentSpec.yaml" agent spec YAML file and give it the label "My
519
+ Authoring Bundle"; use your default org:
520
+
521
+ $ sf agent generate authoring-bundle --spec specs/agentSpec.yaml --name "My Authoring Bundle"
522
+
523
+ Similar to previous example, but generate the authoring bundle files in the "other-package-dir/main/default" package
524
+ directory; use the org with alias "my-dev-org":
525
+
526
+ $ sf agent generate authoring-bundle --spec specs/agentSpec.yaml --name "My Authoring Bundle" --output-dir \
527
+ other-package-dir/main/default --target-org my-dev-org
528
+ ```
529
+
530
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/generate/authoring-bundle.ts)_
455
531
 
456
532
  ## `sf agent generate template`
457
533
 
@@ -499,7 +575,7 @@ EXAMPLES
499
575
  force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1
500
576
  ```
501
577
 
502
- _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.24.35/src/commands/agent/generate/template.ts)_
578
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/generate/template.ts)_
503
579
 
504
580
  ## `sf agent generate test-spec`
505
581
 
@@ -560,71 +636,133 @@ EXAMPLES
560
636
  force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml
561
637
  ```
562
638
 
563
- _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.24.35/src/commands/agent/generate/test-spec.ts)_
639
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/generate/test-spec.ts)_
564
640
 
565
641
  ## `sf agent preview`
566
642
 
567
- Interact with an active agent to preview how the agent responds to your statements, questions, and commands (utterances).
643
+ Interact with an agent to preview how it responds to your statements, questions, and commands (utterances).
568
644
 
569
645
  ```
570
646
  USAGE
571
- $ sf agent preview (-c <value> -o <value>) [--flags-dir <value>] [--api-version <value>] [-n <value>] [-d
572
- <value>] [-x]
647
+ $ sf agent preview [--flags-dir <value>] [--api-version <value>] (-c <value> -o <value>) [-n <value>]
648
+ [--authoring-bundle <value>] [-d <value>] [-x] [--use-live-actions]
573
649
 
574
650
  FLAGS
575
- -c, --client-app=<value> (required) Name of the linked client app to use for the agent connection. You must have
576
- previously created this link with "org login web --client-app". Run "org display" to see
577
- the available linked client apps.
578
- -d, --output-dir=<value> Directory where conversation transcripts are saved.
579
- -n, --api-name=<value> API name of the agent you want to interact with.
580
- -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
581
- configuration variable is already set.
582
- -x, --apex-debug Enable Apex debug logging during the agent preview conversation.
583
- --api-version=<value> Override the api version used for api requests made by this command
651
+ -c, --client-app=<value> Name of the linked client app to use for the connection to the published and active
652
+ agent.
653
+ -d, --output-dir=<value> Directory where conversation transcripts are saved.
654
+ -n, --api-name=<value> API name of the published and active agent you want to interact with.
655
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
656
+ configuration variable is already set.
657
+ -x, --apex-debug Enable Apex debug logging during the agent preview conversation.
658
+ --api-version=<value> Override the api version used for api requests made by this command
659
+ --authoring-bundle=<value> API name of the authoring bundle metadata component that contains the agent's Agent
660
+ Script file.
661
+ --use-live-actions Use real actions in the org; if not specified, preview uses AI to simulate (mock)
662
+ actions.
584
663
 
585
664
  GLOBAL FLAGS
586
665
  --flags-dir=<value> Import flag values from a directory.
587
666
 
588
667
  DESCRIPTION
589
- Interact with an active agent to preview how the agent responds to your statements, questions, and commands
590
- (utterances).
668
+ Interact with an agent to preview how it responds to your statements, questions, and commands (utterances).
669
+
670
+ Use this command to have a natural language conversation with an agent while you code its Agent Script file.
671
+ Previewing an agent works like an initial test to make sure it responds to your utterances as you expect. For example,
672
+ you can test that the agent uses a particular topic when asked a question, and then whether it invokes the correct
673
+ action associated with that topic. This command is the CLI-equivalent of the Preview panel in your org's Agentforce
674
+ Builder UI.
591
675
 
592
- Use this command to have a natural language conversation with an active agent in your org, as if you were an actual
593
- user. The interface is simple: in the "Start typing..." prompt, enter a statement, question, or command; when you're
594
- done, enter Return. Your utterance is posted on the right along with a timestamp. The agent then responds on the left.
595
- To exit the conversation, hit ESC or Control+C.
676
+ This command uses the agent's local authoring bundle, which contains its Agent Script file. You can let the command
677
+ provide a list of authoring bundles (labeled "(Agent Script)") to choose from or use the --authoring-bundle flag to
678
+ specify a bundle's API name.
596
679
 
597
- This command is useful to test if the agent responds to your utterances as you expect. For example, you can test that
598
- the agent uses a particular topic when asked a question, and then whether it invokes the correct action associated
599
- with that topic. This command is the CLI-equivalent of the Conversation Preview panel in your org's Agent Builder UI.
680
+ You can use these two modes when previewing an agent from its Agent Script file:
681
+
682
+ - Simulated mode (Default): Uses only the Agent Script file to converse, and it simulates (mocks) all the actions. Use
683
+ this mode if none of the Apex classes, flows, and prompt templates that implement your actions are available yet. The
684
+ LLM uses the information about topics in the Agent Script file to simulate what the action does or how it responds.
685
+ - Live mode: Uses the actual Apex classes, flows, and prompt templates in your development org in the agent preview.
686
+ If you've changed the Apex classe, flows, or prompt templates in your local DX project, then you must deploy them to
687
+ your development org if you want to use them in your live preview. You can use the Apex Replay Debugger to debug your
688
+ Apex classes when using live mode.
689
+
690
+ The interface is simple: in the "Start typing..." prompt, enter a statement, question, or command; when you're done,
691
+ enter Return. Your utterance is posted on the right along with a timestamp. The agent then responds on the left. To
692
+ exit the conversation, hit ESC or Control+C.
600
693
 
601
694
  When the session concludes, the command asks if you want to save the API responses and chat transcripts. By default,
602
- the files are saved to the "./temp/agent-preview" directory. Specify a new default directory by setting the
603
- environment variable "SF_AGENT_PREVIEW_OUTPUT_DIR" to the directory. Or you can pass the directory to the --output-dir
695
+ the files are saved to the "./temp/agent-preview" directory. Specify a new default directory with the --output-dir
604
696
  flag.
605
697
 
606
- Find the agent's API name in its Agent Details page of your org's Agentforce Studio UI in Setup. If your agent is
607
- currently deactivated, use the "agent activate" CLI command to activate it.
698
+ NOTE: You can also use this command to connect to a published and active agent, which are labeled "(Published)" if you
699
+ let this command provide the list of agents to preview. That use case, however, requires additional security and
700
+ configuration in both your org and your DX project. The examples in this help are for previewing an agent from its
701
+ Agent Script file in your DX project and require only simple authorization of your org, such as with the "org login
702
+ web" command. The --client-app and --api-name flags are used only for previewing published and active agents, they
703
+ don't apply to Agent Script agents. See "Connect to a Published Agent" in the "Agentforce Developer Guide" for
704
+ complete documentation: https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-preview.html.
705
+
706
+ EXAMPLES
707
+ Preview an agent in simulated mode by choosing from a list of authoring bundles provided by the command; use the org
708
+ with alias "my-dev-org":
709
+
710
+ $ sf agent preview --target-org my-dev-org
711
+
712
+ Preview an agent in live mode by choosing from a list of authoring bundles. Save the conversation transcripts to the
713
+ "./transcripts/my-preview" directory, enable the Apex debug logs, and use your default org:
714
+
715
+ $ sf agent preview --use-live-actions --apex-debug --output-dir transcripts/my-preview
716
+ ```
717
+
718
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/preview.ts)_
719
+
720
+ ## `sf agent publish authoring-bundle`
721
+
722
+ Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.
723
+
724
+ ```
725
+ USAGE
726
+ $ sf agent publish authoring-bundle -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-n <value>]
608
727
 
609
- IMPORTANT: Before you use this command, you must complete a number of configuration steps in your org and your DX
610
- project. The examples in this help assume you've completed the steps. See "Preview an Agent" in the "Agentforce
611
- Developer Guide" for complete documentation:
612
- https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-preview.html.
728
+ FLAGS
729
+ -n, --api-name=<value> API name of the authoring bundle you want to publish; if not specified, the command
730
+ provides a list that you can choose from.
731
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
732
+ configuration variable is already set.
733
+ --api-version=<value> Override the api version used for api requests made by this command
734
+
735
+ GLOBAL FLAGS
736
+ --flags-dir=<value> Import flag values from a directory.
737
+ --json Format output as json.
738
+
739
+ DESCRIPTION
740
+ Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.
741
+
742
+ An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The
743
+ metadata type contains two files: the standard metatada XML file and an Agent Script file (extension ".agent") that
744
+ fully describes the agent using the Agent Script language.
745
+
746
+ When you publish an authoring bundle to your org, a number of things happen. First, this command validates that the
747
+ Agent Script file successfully compiles. If there are compilation errors, the command exits and you must fix the Agent
748
+ Script file to continue. Once the Agent Script file compiles, then it's published to the org, which in turn creates
749
+ new associated metadata (Bot, BotVersion, GenAiX), or new versions of the metadata if the agent already exists. The
750
+ new or updated metadata is retrieved back to your DX project, and then the authoring bundle metadata
751
+ (AiAuthoringBundle) is deployed to your org.
752
+
753
+ This command uses the API name of the authoring bundle.
613
754
 
614
755
  EXAMPLES
615
- Interact with an agent with API name Resort_Manager in the org with alias "my-org" and the linked "agent-app"
616
- connected app:
756
+ Publish an authoring bundle by being prompted for its API name; use your default org:
617
757
 
618
- $ sf agent preview --api-name Resort_Manager --target-org my-org --client-app agent-app
758
+ $ sf agent publish authoring-bundle
619
759
 
620
- Same as the preceding example, but this time save the conversation transcripts to the "./transcripts/my-preview"
621
- directory rather than the default "./temp/agent-preview":
760
+ Publish an authoring bundle with API name MyAuthoringBundle to the org with alias "my-dev-org":
622
761
 
623
- $ sf agent preview --api-name Resort_Manager --target-org my-org --client-app agent-app --output-dir \
624
- transcripts/my-preview
762
+ $ sf agent publish authoring-bundle --api-name MyAuthoringbundle --target-org my-dev-org
625
763
  ```
626
764
 
627
- _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.24.35/src/commands/agent/preview.ts)_
765
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/publish/authoring-bundle.ts)_
628
766
 
629
767
  ## `sf agent test create`
630
768
 
@@ -679,7 +817,7 @@ EXAMPLES
679
817
  $ sf agent test create --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview
680
818
  ```
681
819
 
682
- _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.24.35/src/commands/agent/test/create.ts)_
820
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/test/create.ts)_
683
821
 
684
822
  ## `sf agent test list`
685
823
 
@@ -714,7 +852,7 @@ EXAMPLES
714
852
  $ sf agent test list --target-org my-org
715
853
  ```
716
854
 
717
- _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.24.35/src/commands/agent/test/list.ts)_
855
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/test/list.ts)_
718
856
 
719
857
  ## `sf agent test results`
720
858
 
@@ -780,7 +918,7 @@ FLAG DESCRIPTIONS
780
918
  expression when using custom evaluations.
781
919
  ```
782
920
 
783
- _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.24.35/src/commands/agent/test/results.ts)_
921
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/test/results.ts)_
784
922
 
785
923
  ## `sf agent test resume`
786
924
 
@@ -853,7 +991,7 @@ FLAG DESCRIPTIONS
853
991
  expression when using custom evaluations.
854
992
  ```
855
993
 
856
- _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.24.35/src/commands/agent/test/resume.ts)_
994
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/test/resume.ts)_
857
995
 
858
996
  ## `sf agent test run`
859
997
 
@@ -927,7 +1065,54 @@ FLAG DESCRIPTIONS
927
1065
  expression when using custom evaluations.
928
1066
  ```
929
1067
 
930
- _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.24.35/src/commands/agent/test/run.ts)_
1068
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/test/run.ts)_
1069
+
1070
+ ## `sf agent validate authoring-bundle`
1071
+
1072
+ Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.
1073
+
1074
+ ```
1075
+ USAGE
1076
+ $ sf agent validate authoring-bundle -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-n <value>]
1077
+
1078
+ FLAGS
1079
+ -n, --api-name=<value> API name of the authoring bundle you want to validate; if not specified, the command
1080
+ provides a list that you can choose from.
1081
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
1082
+ configuration variable is already set.
1083
+ --api-version=<value> Override the api version used for api requests made by this command
1084
+
1085
+ GLOBAL FLAGS
1086
+ --flags-dir=<value> Import flag values from a directory.
1087
+ --json Format output as json.
1088
+
1089
+ DESCRIPTION
1090
+ Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an
1091
+ agent.
1092
+
1093
+ An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The
1094
+ metadata type contains two files: the standard metatada XML file and an Agent Script file (extension ".agent") that
1095
+ fully describes the agent using the Agent Script language.
1096
+
1097
+ This command validates that the Agent Script file in the authoring bundle compiles without errors so that you can
1098
+ later publish the bundle to your org. Use this command while you code the Agent Script file to ensure that it's valid.
1099
+ If the validation fails, the command outputs the list of syntax errors, a brief description of the error, and the
1100
+ location in the Agent Script file where the error occurred.
1101
+
1102
+ This command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the
1103
+ command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.
1104
+
1105
+ EXAMPLES
1106
+ Validate an authoring bundle by being prompted for its API name; use your default org:
1107
+
1108
+ $ sf agent validate authoring-bundle
1109
+
1110
+ Validate an authoring bundle with API name MyAuthoringBundle; use the org with alias "my-dev-org":
1111
+
1112
+ $ sf agent validate authoring-bundle --api-name MyAuthoringBundle --target-org my-dev-org
1113
+ ```
1114
+
1115
+ _See code: [@salesforce/plugin-agent](https://github.com/salesforcecli/plugin-agent/blob/1.25.1/src/commands/agent/validate/authoring-bundle.ts)_
931
1116
 
932
1117
  ## `sf alias list`
933
1118