@salesforce/plugin-agent 2.2.3 → 2.3.0

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.
@@ -426,16 +426,14 @@
426
426
  "preview:agent"
427
427
  ]
428
428
  },
429
- "agent:generate:agent-spec": {
429
+ "agent:adl:create": {
430
430
  "aliases": [],
431
431
  "args": {},
432
- "description": "An agent spec is a YAML-formatted file that contains basic information about the agent, such as its role, company description, and an AI-generated list of topics based on this information. Topics define the range of jobs your agent can handle.\n\nUse 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.\n\nYou 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.\n\nYou 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.\n\nWhen your agent spec is ready, generate an authoring bundle from it by passing the spec file to the --spec flag of the \"agent generate authoring-bundle\" CLI command. An authoring bundle is a metadata type that contains an Agent Script file, which is the blueprint for an agent. (While not recommended, you can also use the agent spec file to immediately create an agent with the \"agent create\" command. We don't recommend this workflow because these types of agents don't use Agent Script, and are thus less flexible and more difficult to maintain.)",
432
+ "description": "Creates a new data library in the target org. The --source-type flag determines the type of library: SFDRIVE (file upload), KNOWLEDGE (Salesforce Knowledge articles), or RETRIEVER (existing active Custom Retriever).\n\nFor SFDRIVE libraries, creation provisions the full Data Cloud pipeline (DLO → DMO → SearchIndex → Retriever). Upload files with `sf agent adl upload` after creation.",
433
433
  "examples": [
434
- "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:\n<%= 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.\"",
435
- "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\":\n<%= config.bin %> <%= command.id %> --max-topics 5 --output-file specs/resortManagerAgent.yaml --target-org my-org",
436
- "Be prompted for all required and optional agent properties; use your default org:\n<%= config.bin %> <%= command.id %> --full-interview",
437
- "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:\n<%= 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\"",
438
- "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:\n<%= config.bin %> <%= command.id %> --tone formal --agent-user resortmanager@myorg.com"
434
+ "Create an SFDRIVE library:\n<%= config.bin %> <%= command.id %> --target-org myOrg --name \"My Docs\" --developer-name My_Docs --source-type sfdrive",
435
+ "Create a KNOWLEDGE library with index fields:\n<%= config.bin %> <%= command.id %> --target-org myOrg --name \"KB Library\" --developer-name KB_Library --source-type knowledge --primary-index-field1 Title --primary-index-field2 Summary",
436
+ "Create a RETRIEVER library:\n<%= config.bin %> <%= command.id %> --target-org myOrg --name \"Existing Retriever\" --developer-name Existing_Retriever --source-type retriever --retriever-id 0ppXX0000000001"
439
437
  ],
440
438
  "flags": {
441
439
  "json": {
@@ -470,164 +468,138 @@
470
468
  "multiple": false,
471
469
  "type": "option"
472
470
  },
473
- "type": {
474
- "name": "type",
475
- "summary": "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.",
476
- "hasDynamicHelp": false,
477
- "multiple": false,
478
- "options": [
479
- "customer",
480
- "internal"
481
- ],
482
- "type": "option"
483
- },
484
- "role": {
485
- "name": "role",
486
- "summary": "Role of the agent.",
471
+ "name": {
472
+ "char": "n",
473
+ "name": "name",
474
+ "required": true,
475
+ "summary": "Display name for the data library (max 80 characters).",
487
476
  "hasDynamicHelp": false,
488
477
  "multiple": false,
489
478
  "type": "option"
490
479
  },
491
- "company-name": {
492
- "name": "company-name",
493
- "summary": "Name of your company.",
480
+ "developer-name": {
481
+ "name": "developer-name",
482
+ "required": true,
483
+ "summary": "API name for the data library (max 80 characters, alphanumeric and underscores only, must start with a letter).",
494
484
  "hasDynamicHelp": false,
495
485
  "multiple": false,
496
486
  "type": "option"
497
487
  },
498
- "company-description": {
499
- "name": "company-description",
500
- "summary": "Description of your company.",
488
+ "source-type": {
489
+ "name": "source-type",
490
+ "required": true,
491
+ "summary": "Type of grounding source: sfdrive (file upload), knowledge (Salesforce Knowledge articles), or retriever (existing active Custom Retriever).",
501
492
  "hasDynamicHelp": false,
502
493
  "multiple": false,
494
+ "options": [
495
+ "sfdrive",
496
+ "knowledge",
497
+ "retriever"
498
+ ],
503
499
  "type": "option"
504
500
  },
505
- "company-website": {
506
- "name": "company-website",
507
- "summary": "Website URL of your company.",
501
+ "description": {
502
+ "name": "description",
503
+ "summary": "Description of the data library (max 255 characters).",
508
504
  "hasDynamicHelp": false,
509
505
  "multiple": false,
510
506
  "type": "option"
511
507
  },
512
- "max-topics": {
513
- "name": "max-topics",
514
- "summary": "Maximum number of topics to generate in the agent spec; default is 5.",
508
+ "index-mode": {
509
+ "name": "index-mode",
510
+ "summary": "Index mode for SFDRIVE libraries: basic or enhanced.",
515
511
  "hasDynamicHelp": false,
516
512
  "multiple": false,
513
+ "options": [
514
+ "basic",
515
+ "enhanced"
516
+ ],
517
517
  "type": "option"
518
518
  },
519
- "agent-user": {
520
- "name": "agent-user",
521
- "summary": "Username of a user in your org to assign to your agent; determines what your agent can access and do.",
519
+ "retriever-id": {
520
+ "name": "retriever-id",
521
+ "summary": "ID of an active Custom Retriever (required for RETRIEVER source type; retriever must be active).",
522
522
  "hasDynamicHelp": false,
523
523
  "multiple": false,
524
524
  "type": "option"
525
525
  },
526
- "enrich-logs": {
527
- "name": "enrich-logs",
528
- "summary": "Adds agent conversation data to event logs so you can view all agent session activity in one place.",
526
+ "primary-index-field1": {
527
+ "name": "primary-index-field1",
528
+ "summary": "Primary index field 1 for KNOWLEDGE libraries (required, immutable after creation).",
529
529
  "hasDynamicHelp": false,
530
530
  "multiple": false,
531
- "options": [
532
- "true",
533
- "false"
534
- ],
535
531
  "type": "option"
536
532
  },
537
- "tone": {
538
- "name": "tone",
539
- "summary": "Conversational style of the agent, such as how it expresses your brand personality in its messages through word choice, punctuation, and sentence structure.",
533
+ "primary-index-field2": {
534
+ "name": "primary-index-field2",
535
+ "summary": "Primary index field 2 for KNOWLEDGE libraries (required, immutable after creation).",
540
536
  "hasDynamicHelp": false,
541
537
  "multiple": false,
542
- "options": [
543
- "formal",
544
- "casual",
545
- "neutral"
546
- ],
547
538
  "type": "option"
548
539
  },
549
- "spec": {
550
- "name": "spec",
551
- "summary": "Agent spec file, in YAML format, to use as input to the command.",
540
+ "content-fields": {
541
+ "name": "content-fields",
542
+ "summary": "Comma-separated list of content fields for KNOWLEDGE libraries (optional, mutable after creation).",
552
543
  "hasDynamicHelp": false,
553
544
  "multiple": false,
554
545
  "type": "option"
555
546
  },
556
- "output-file": {
557
- "name": "output-file",
558
- "summary": "Path for the generated YAML agent spec file; can be an absolute or relative path.",
559
- "default": "specs/agentSpec.yaml",
547
+ "data-category-ids": {
548
+ "name": "data-category-ids",
549
+ "summary": "Comma-separated list of data category selection IDs for KNOWLEDGE libraries. Mutually exclusive with --data-category-names (provide one or the other, not both).",
560
550
  "hasDynamicHelp": false,
561
551
  "multiple": false,
562
552
  "type": "option"
563
553
  },
564
- "full-interview": {
565
- "name": "full-interview",
566
- "summary": "Prompt for both required and optional flags.",
567
- "allowNo": false,
568
- "type": "boolean"
569
- },
570
- "prompt-template": {
571
- "name": "prompt-template",
572
- "summary": "API name of a customized prompt template to use instead of the default prompt template.",
554
+ "data-category-names": {
555
+ "name": "data-category-names",
556
+ "summary": "Comma-separated list of data category names in qualified format (e.g., \"Group_API_Name.Category\"). Mutually exclusive with --data-category-ids (provide one or the other, not both).",
573
557
  "hasDynamicHelp": false,
574
558
  "multiple": false,
575
559
  "type": "option"
576
560
  },
577
- "grounding-context": {
578
- "dependsOn": [
579
- "prompt-template"
580
- ],
581
- "name": "grounding-context",
582
- "summary": "Context information and personalization that's added to your prompts when using a custom prompt template.",
583
- "hasDynamicHelp": false,
561
+ "wait": {
562
+ "char": "w",
563
+ "name": "wait",
564
+ "summary": "Wait N minutes for indexing to complete (KNOWLEDGE libraries). SFDRIVE libraries require upload before indexing; RETRIEVER libraries are ready immediately.",
565
+ "hasDynamicHelp": true,
584
566
  "multiple": false,
585
567
  "type": "option"
586
- },
587
- "force-overwrite": {
588
- "name": "force-overwrite",
589
- "summary": "Don't prompt the user to confirm that an existing spec file will be overwritten.",
590
- "allowNo": false,
591
- "type": "boolean"
592
568
  }
593
569
  },
594
570
  "hasDynamicHelp": true,
595
571
  "hiddenAliases": [],
596
- "id": "agent:generate:agent-spec",
572
+ "id": "agent:adl:create",
597
573
  "pluginAlias": "@salesforce/plugin-agent",
598
574
  "pluginName": "@salesforce/plugin-agent",
599
575
  "pluginType": "core",
600
576
  "strict": true,
601
- "summary": "Generate an agent spec, which is a YAML file that captures what an agent can do.",
577
+ "summary": "Create an Agentforce Data Library.",
602
578
  "enableJsonFlag": true,
603
- "requiresProject": true,
604
579
  "isESM": true,
605
580
  "relativePath": [
606
581
  "lib",
607
582
  "commands",
608
583
  "agent",
609
- "generate",
610
- "agent-spec.js"
584
+ "adl",
585
+ "create.js"
611
586
  ],
612
587
  "aliasPermutations": [],
613
588
  "permutations": [
614
- "agent:generate:agent-spec",
615
- "generate:agent:agent-spec",
616
- "generate:agent-spec:agent",
617
- "agent:agent-spec:generate",
618
- "agent-spec:agent:generate",
619
- "agent-spec:generate:agent"
589
+ "agent:adl:create",
590
+ "adl:agent:create",
591
+ "adl:create:agent",
592
+ "agent:create:adl",
593
+ "create:agent:adl",
594
+ "create:adl:agent"
620
595
  ]
621
596
  },
622
- "agent:generate:authoring-bundle": {
597
+ "agent:adl:delete": {
623
598
  "aliases": [],
624
599
  "args": {},
625
- "description": "Authoring bundles are metadata components that contain an agent's Agent Script file. The Agent Script file is the agent's blueprint; it fully describes what the agent can do using the Agent Script language.\n\nUse 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. The resulting Agent Script file is customized to reflect what's in the agent spec file. You can also create an authoring bundle without an agent spec file by specifying the \"--no-spec\" flag; in this case, the resulting Agent Script file is just the default boilerplate.\n\nThe 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.\n\nAfter 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.\n\nThis command requires an org because it uses it to access an LLM for generating the Agent Script file.",
600
+ "description": "Permanently deletes a data library and all associated files and indexing data.",
626
601
  "examples": [
627
- "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:\n<%= config.bin %> <%= command.id %>",
628
- "Generate an authoring bundle without using an agent spec file; give the bundle the label \"My Authoring Bundle\" and use your default org:\n<%= config.bin %> <%= command.id %> --no-spec --name \"My Authoring Bundle\"",
629
- "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:\n<%= config.bin %> <%= command.id %> --spec specs/agentSpec.yaml --name \"My Authoring Bundle\"",
630
- "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\":\n<%= config.bin %> <%= command.id %> --spec specs/agentSpec.yaml --name \"My Authoring Bundle\" --output-dir other-package-dir/main/default --target-org my-dev-org"
602
+ "Delete a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
631
603
  ],
632
604
  "flags": {
633
605
  "json": {
@@ -655,13 +627,6 @@
655
627
  "multiple": false,
656
628
  "type": "option"
657
629
  },
658
- "api-name": {
659
- "name": "api-name",
660
- "summary": "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.",
661
- "hasDynamicHelp": false,
662
- "multiple": false,
663
- "type": "option"
664
- },
665
630
  "api-version": {
666
631
  "description": "Override the api version used for api requests made by this command",
667
632
  "name": "api-version",
@@ -669,77 +634,49 @@
669
634
  "multiple": false,
670
635
  "type": "option"
671
636
  },
672
- "spec": {
673
- "char": "f",
674
- "name": "spec",
675
- "summary": "Path to the agent spec YAML file. If you don't specify the flag, the command provides a list that you can choose from. Use the --no-spec flag to skip using an agent spec entirely.",
676
- "hasDynamicHelp": false,
677
- "multiple": false,
678
- "type": "option"
679
- },
680
- "no-spec": {
681
- "name": "no-spec",
682
- "summary": "Skip prompting for an agent spec and use the default Agent Script boilerplate in the generated authoring bundle.",
683
- "allowNo": false,
684
- "type": "boolean"
685
- },
686
- "output-dir": {
687
- "char": "d",
688
- "name": "output-dir",
689
- "summary": "Directory where the authoring bundle files are generated.",
690
- "hasDynamicHelp": false,
691
- "multiple": false,
692
- "type": "option"
693
- },
694
- "name": {
695
- "char": "n",
696
- "name": "name",
697
- "summary": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
637
+ "library-id": {
638
+ "char": "i",
639
+ "name": "library-id",
640
+ "required": true,
641
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
698
642
  "hasDynamicHelp": false,
699
643
  "multiple": false,
700
644
  "type": "option"
701
- },
702
- "force-overwrite": {
703
- "name": "force-overwrite",
704
- "summary": "Overwrite the existing authoring bundle if one with the same API name already exists locally.",
705
- "allowNo": false,
706
- "type": "boolean"
707
645
  }
708
646
  },
709
647
  "hasDynamicHelp": true,
710
648
  "hiddenAliases": [],
711
- "id": "agent:generate:authoring-bundle",
649
+ "id": "agent:adl:delete",
712
650
  "pluginAlias": "@salesforce/plugin-agent",
713
651
  "pluginName": "@salesforce/plugin-agent",
714
652
  "pluginType": "core",
715
653
  "strict": true,
716
- "summary": "Generate an authoring bundle from an existing agent spec YAML file.",
654
+ "summary": "Delete an Agentforce Data Library.",
717
655
  "enableJsonFlag": true,
718
- "requiresProject": true,
719
656
  "isESM": true,
720
657
  "relativePath": [
721
658
  "lib",
722
659
  "commands",
723
660
  "agent",
724
- "generate",
725
- "authoring-bundle.js"
661
+ "adl",
662
+ "delete.js"
726
663
  ],
727
664
  "aliasPermutations": [],
728
665
  "permutations": [
729
- "agent:generate:authoring-bundle",
730
- "generate:agent:authoring-bundle",
731
- "generate:authoring-bundle:agent",
732
- "agent:authoring-bundle:generate",
733
- "authoring-bundle:agent:generate",
734
- "authoring-bundle:generate:agent"
666
+ "agent:adl:delete",
667
+ "adl:agent:delete",
668
+ "adl:delete:agent",
669
+ "agent:delete:adl",
670
+ "delete:agent:adl",
671
+ "delete:adl:agent"
735
672
  ]
736
673
  },
737
- "agent:generate:template": {
674
+ "agent:adl:get": {
738
675
  "aliases": [],
739
676
  "args": {},
740
- "description": "WARNING: This command doesn't work for agents that were created from an Agent Script file. In other words, you can't currently package an agent template for agents that use Agent Script.\n\nAt a high-level, agents are defined by the Bot, BotVersion, and GenAiPlannerBundle metadata types. The GenAiPlannerBundle type in turn defines the agent's topics and actions. This command uses the metadata files for these three types, located in your local DX project, to generate a BotTemplate metadata file for a specific agent (Bot). You then use the BotTemplate metadata file, along with the GenAiPlannerBundle metadata file that references the BotTemplate, to package the template in a managed package that you can share between orgs or on AppExchange.\n\nUse the --agent-file flag to specify the relative or full pathname of the Bot metadata file, such as force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml. A single Bot can have multiple BotVersions, so use the --agent-version flag to specify the version. The corresponding BotVersion metadata file must exist locally. For example, if you specify \"--agent-version 4\", then the file force-app/main/default/bots/My_Awesome_Agent/v4.botVersion-meta.xml must exist.\n\nThe new BotTemplate metadata file is generated in the \"botTemplates\" directory in the output directory specified with the --output-dir flag, and has the name <Agent_API_name>\\_v<Version>\\_Template.botTemplate-meta.xml, such as my-package/botTemplates/My_Awesome_Agent_v4_Template.botTemplate-meta.xml. The command displays the full pathname of the generated files when it completes.\n\nSee \"Develop and Package Agent Templates Using Scratch Orgs\" (https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/dev2gp_package_agent_templates.htm) for details about the complete process, which includes using a scratch org to create and test the agent, retrieving the agent metadata to your DX project, running this command to create the agent template, and then packaging the template.",
677
+ "description": "Returns the full detail of a data library including its grounding source configuration, status, and retriever ID.",
741
678
  "examples": [
742
- "Generate an agent template from the My_Awesome_Agent Bot metadata file in your DX project and save the BotTemplate and GenAiPlannerBundle to the specified directory; use version 1 of the agent. The agent that the template is based on is in the org with alias \"my-scratch-org\":\n<%= config.bin %> <%= command.id %> --agent-file force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1 --output-dir my-package --source-org my-scratch-org"
679
+ "Get details of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
743
680
  ],
744
681
  "flags": {
745
682
  "json": {
@@ -757,6 +694,16 @@
757
694
  "multiple": false,
758
695
  "type": "option"
759
696
  },
697
+ "target-org": {
698
+ "char": "o",
699
+ "name": "target-org",
700
+ "noCacheDefault": true,
701
+ "required": true,
702
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
703
+ "hasDynamicHelp": true,
704
+ "multiple": false,
705
+ "type": "option"
706
+ },
760
707
  "api-version": {
761
708
  "description": "Override the api version used for api requests made by this command",
762
709
  "name": "api-version",
@@ -764,37 +711,11 @@
764
711
  "multiple": false,
765
712
  "type": "option"
766
713
  },
767
- "source-org": {
768
- "char": "s",
769
- "name": "source-org",
770
- "noCacheDefault": true,
714
+ "library-id": {
715
+ "char": "i",
716
+ "name": "library-id",
771
717
  "required": true,
772
- "summary": "Username or alias of the namespaced scratch org that contains the agent which this template is based on.",
773
- "hasDynamicHelp": true,
774
- "multiple": false,
775
- "type": "option"
776
- },
777
- "agent-version": {
778
- "name": "agent-version",
779
- "required": true,
780
- "summary": "Version of the agent (BotVersion).",
781
- "hasDynamicHelp": false,
782
- "multiple": false,
783
- "type": "option"
784
- },
785
- "agent-file": {
786
- "char": "f",
787
- "name": "agent-file",
788
- "required": true,
789
- "summary": "Path to an agent (Bot) metadata file.",
790
- "hasDynamicHelp": false,
791
- "multiple": false,
792
- "type": "option"
793
- },
794
- "output-dir": {
795
- "char": "r",
796
- "name": "output-dir",
797
- "summary": "Directory where the generated BotTemplate and GenAiPlannerBundle files are saved.",
718
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
798
719
  "hasDynamicHelp": false,
799
720
  "multiple": false,
800
721
  "type": "option"
@@ -802,44 +723,47 @@
802
723
  },
803
724
  "hasDynamicHelp": true,
804
725
  "hiddenAliases": [],
805
- "id": "agent:generate:template",
726
+ "id": "agent:adl:get",
806
727
  "pluginAlias": "@salesforce/plugin-agent",
807
728
  "pluginName": "@salesforce/plugin-agent",
808
729
  "pluginType": "core",
809
730
  "strict": true,
810
- "summary": "Generate an agent template from an existing agent in your DX project so you can then package the template in a second-generation managed package.",
731
+ "summary": "Get details of an Agentforce Data Library.",
811
732
  "enableJsonFlag": true,
812
- "requiresProject": true,
813
733
  "isESM": true,
814
734
  "relativePath": [
815
735
  "lib",
816
736
  "commands",
817
737
  "agent",
818
- "generate",
819
- "template.js"
738
+ "adl",
739
+ "get.js"
820
740
  ],
821
741
  "aliasPermutations": [],
822
742
  "permutations": [
823
- "agent:generate:template",
824
- "generate:agent:template",
825
- "generate:template:agent",
826
- "agent:template:generate",
827
- "template:agent:generate",
828
- "template:generate:agent"
743
+ "agent:adl:get",
744
+ "adl:agent:get",
745
+ "adl:get:agent",
746
+ "agent:get:adl",
747
+ "get:agent:adl",
748
+ "get:adl:agent"
829
749
  ]
830
750
  },
831
- "agent:generate:test-spec": {
751
+ "agent:adl:list": {
832
752
  "aliases": [],
833
753
  "args": {},
834
- "description": "The first step when using Salesforce CLI to create an agent test in your org is to use this interactive command to generate a local YAML-formatted test spec file. The test spec YAML file contains information about the agent being tested, such as its API name, and then one or more test cases. This command uses the metadata components in your DX project when prompting for information, such as the agent API name; it doesn't look in your org.\n\nTo generate a specific agent test case, this command prompts you for this information; when possible, the command provides a list of options for you to choose from:\n\n- Utterance: Natural language statement, question, or command used to test the agent.\n- Expected topic: API name of the topic you expect the agent to use when responding to the utterance.\n- Expected actions: One or more API names of the expection actions the agent takes.\n- Expected outcome: Natural language description of the outcome you expect.\n- (Optional) Custom evaluation: Test an agent's response for specific strings or numbers.\n- (Optional) Conversation history: Boilerplate for additional context you can add to the test in the form of a conversation history.\n\nYou can manually add contextVariables to test cases in the generated YAML file to inject contextual data (such as CaseId or RoutableId) into agent sessions. This is useful for testing agent behavior with different contextual information.\n\nWhen your test spec is ready, you then run the \"agent test create\" command to actually create the test in your org and synchronize the metadata with your DX project. The metadata type for an agent test is `AiEvaluationDefinition` (legacy testing-center) or `AiTestingDefinition` (Agentforce Studio / NGT), selected via --test-runner.\n\nIf you have an existing AiEvaluationDefinition or AiTestingDefinition metadata XML file in your DX project, you can generate its equivalent YAML test spec file with the --from-definition flag. The runner is inferred from the file extension; pass --test-runner to override.",
754
+ "description": "Returns all data libraries in the target org, including their source type, status, and library ID.",
835
755
  "examples": [
836
- "Generate an agent test spec YAML file interactively:\n<%= config.bin %> <%= command.id %>",
837
- "Generate an Agentforce Studio (NGT) test spec YAML file interactively:\n<%= config.bin %> <%= command.id %> --test-runner agentforce-studio",
838
- "Generate an agent test spec YAML file and specify a name for the new file; if the file exists, overwrite it without confirmation:\n<%= config.bin %> <%= command.id %> --output-file specs/Resort_Manager-new-version-testSpec.yaml --force-overwrite",
839
- "Generate an agent test spec YAML file from an existing AiEvaluationDefinition metadata XML file in your DX project:\n<%= config.bin %> <%= command.id %> --from-definition force-app/main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml",
840
- "Generate an Agentforce Studio (NGT) test spec YAML file from an existing AiTestingDefinition metadata XML file:\n<%= config.bin %> <%= command.id %> --from-definition force-app/main/default/aiTestingDefinitions/Returns_Checkout_Tests.aiTestingDefinition-meta.xml"
756
+ "List all data libraries in the default target org:\n<%= config.bin %> <%= command.id %> --target-org myOrg",
757
+ "List data libraries and output as JSON:\n<%= config.bin %> <%= command.id %> --target-org myOrg --json"
841
758
  ],
842
759
  "flags": {
760
+ "json": {
761
+ "description": "Format output as json.",
762
+ "helpGroup": "GLOBAL",
763
+ "name": "json",
764
+ "allowNo": false,
765
+ "type": "boolean"
766
+ },
843
767
  "flags-dir": {
844
768
  "helpGroup": "GLOBAL",
845
769
  "name": "flags-dir",
@@ -848,76 +772,69 @@
848
772
  "multiple": false,
849
773
  "type": "option"
850
774
  },
851
- "from-definition": {
852
- "char": "d",
853
- "name": "from-definition",
854
- "summary": "Filepath to an AiEvaluationDefinition or AiTestingDefinition metadata XML file in your DX project that you want to convert to a test spec YAML file.",
855
- "hasDynamicHelp": false,
775
+ "target-org": {
776
+ "char": "o",
777
+ "name": "target-org",
778
+ "noCacheDefault": true,
779
+ "required": true,
780
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
781
+ "hasDynamicHelp": true,
856
782
  "multiple": false,
857
783
  "type": "option"
858
784
  },
859
- "force-overwrite": {
860
- "name": "force-overwrite",
861
- "summary": "Don't prompt for confirmation when overwriting an existing test spec YAML file.",
862
- "allowNo": false,
863
- "type": "boolean"
864
- },
865
- "output-file": {
866
- "char": "f",
867
- "name": "output-file",
868
- "summary": "Name of the generated test spec YAML file. Default value is \"specs/<AGENT_API_NAME>-testSpec.yaml\" (legacy) or \"specs/<AGENT_API_NAME>-ngtTestSpec.yaml\" (Agentforce Studio).",
785
+ "api-version": {
786
+ "description": "Override the api version used for api requests made by this command",
787
+ "name": "api-version",
869
788
  "hasDynamicHelp": false,
870
789
  "multiple": false,
871
790
  "type": "option"
872
791
  },
873
- "test-runner": {
874
- "description": "By default, the command automatically detects which test runner to use based on the test definition metadata type in your org. Use this flag to explicitly specify the runner type. 'agentforce-studio' uses AiTestingDefinition metadata. 'testing-center' uses AiEvaluationDefinition metadata.",
875
- "name": "test-runner",
876
- "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
792
+ "source-type": {
793
+ "name": "source-type",
794
+ "summary": "Filter by source type: sfdrive, knowledge, or retriever.",
877
795
  "hasDynamicHelp": false,
878
796
  "multiple": false,
879
797
  "options": [
880
- "agentforce-studio",
881
- "testing-center"
798
+ "sfdrive",
799
+ "knowledge",
800
+ "retriever"
882
801
  ],
883
802
  "type": "option"
884
803
  }
885
804
  },
886
- "hasDynamicHelp": false,
805
+ "hasDynamicHelp": true,
887
806
  "hiddenAliases": [],
888
- "id": "agent:generate:test-spec",
807
+ "id": "agent:adl:list",
889
808
  "pluginAlias": "@salesforce/plugin-agent",
890
809
  "pluginName": "@salesforce/plugin-agent",
891
810
  "pluginType": "core",
892
811
  "strict": true,
893
- "summary": "Generate an agent test spec, which is a YAML file that lists the test cases for testing a specific agent.",
894
- "enableJsonFlag": false,
812
+ "summary": "List Agentforce Data Libraries in an org.",
813
+ "enableJsonFlag": true,
895
814
  "isESM": true,
896
815
  "relativePath": [
897
816
  "lib",
898
817
  "commands",
899
818
  "agent",
900
- "generate",
901
- "test-spec.js"
819
+ "adl",
820
+ "list.js"
902
821
  ],
903
822
  "aliasPermutations": [],
904
823
  "permutations": [
905
- "agent:generate:test-spec",
906
- "generate:agent:test-spec",
907
- "generate:test-spec:agent",
908
- "agent:test-spec:generate",
909
- "test-spec:agent:generate",
910
- "test-spec:generate:agent"
824
+ "agent:adl:list",
825
+ "adl:agent:list",
826
+ "adl:list:agent",
827
+ "agent:list:adl",
828
+ "list:agent:adl",
829
+ "list:adl:agent"
911
830
  ]
912
831
  },
913
- "agent:adl:create": {
832
+ "agent:adl:status": {
914
833
  "aliases": [],
915
834
  "args": {},
916
- "description": "Creates a new data library in the target org. The --source-type flag determines the type of library: SFDRIVE (file upload), KNOWLEDGE (Salesforce Knowledge articles), or RETRIEVER (existing active Custom Retriever).\n\nFor SFDRIVE libraries, creation provisions the full Data Cloud pipeline (DLO → DMO → SearchIndex → Retriever). Upload files with `sf agent adl upload` after creation.",
835
+ "description": "Returns the current indexing status including stage details (DATA_STREAM, DATA_LAKE_OBJECT, DATA_MODEL_OBJECT, SEARCH_INDEX, RETRIEVER) and any errors.",
917
836
  "examples": [
918
- "Create an SFDRIVE library:\n<%= config.bin %> <%= command.id %> --target-org myOrg --name \"My Docs\" --developer-name My_Docs --source-type sfdrive",
919
- "Create a KNOWLEDGE library with index fields:\n<%= config.bin %> <%= command.id %> --target-org myOrg --name \"KB Library\" --developer-name KB_Library --source-type knowledge --primary-index-field1 Title --primary-index-field2 Summary",
920
- "Create a RETRIEVER library:\n<%= config.bin %> <%= command.id %> --target-org myOrg --name \"Existing Retriever\" --developer-name Existing_Retriever --source-type retriever --retriever-id 0ppXX0000000001"
837
+ "Get status of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
921
838
  ],
922
839
  "flags": {
923
840
  "json": {
@@ -952,113 +869,30 @@
952
869
  "multiple": false,
953
870
  "type": "option"
954
871
  },
955
- "name": {
956
- "char": "n",
957
- "name": "name",
958
- "required": true,
959
- "summary": "Display name for the data library (max 80 characters).",
960
- "hasDynamicHelp": false,
961
- "multiple": false,
962
- "type": "option"
963
- },
964
- "developer-name": {
965
- "name": "developer-name",
966
- "required": true,
967
- "summary": "API name for the data library (max 80 characters, alphanumeric and underscores only, must start with a letter).",
968
- "hasDynamicHelp": false,
969
- "multiple": false,
970
- "type": "option"
971
- },
972
- "source-type": {
973
- "name": "source-type",
872
+ "library-id": {
873
+ "char": "i",
874
+ "name": "library-id",
974
875
  "required": true,
975
- "summary": "Type of grounding source: sfdrive (file upload), knowledge (Salesforce Knowledge articles), or retriever (existing active Custom Retriever).",
976
- "hasDynamicHelp": false,
977
- "multiple": false,
978
- "options": [
979
- "sfdrive",
980
- "knowledge",
981
- "retriever"
982
- ],
983
- "type": "option"
984
- },
985
- "description": {
986
- "name": "description",
987
- "summary": "Description of the data library (max 255 characters).",
988
- "hasDynamicHelp": false,
989
- "multiple": false,
990
- "type": "option"
991
- },
992
- "index-mode": {
993
- "name": "index-mode",
994
- "summary": "Index mode for SFDRIVE libraries: basic or enhanced.",
995
- "hasDynamicHelp": false,
996
- "multiple": false,
997
- "options": [
998
- "basic",
999
- "enhanced"
1000
- ],
1001
- "type": "option"
1002
- },
1003
- "retriever-id": {
1004
- "name": "retriever-id",
1005
- "summary": "ID of an active Custom Retriever (required for RETRIEVER source type; retriever must be active).",
1006
- "hasDynamicHelp": false,
1007
- "multiple": false,
1008
- "type": "option"
1009
- },
1010
- "primary-index-field1": {
1011
- "name": "primary-index-field1",
1012
- "summary": "Primary index field 1 for KNOWLEDGE libraries (required, immutable after creation).",
1013
- "hasDynamicHelp": false,
1014
- "multiple": false,
1015
- "type": "option"
1016
- },
1017
- "primary-index-field2": {
1018
- "name": "primary-index-field2",
1019
- "summary": "Primary index field 2 for KNOWLEDGE libraries (required, immutable after creation).",
1020
- "hasDynamicHelp": false,
1021
- "multiple": false,
1022
- "type": "option"
1023
- },
1024
- "content-fields": {
1025
- "name": "content-fields",
1026
- "summary": "Comma-separated list of content fields for KNOWLEDGE libraries (optional, mutable after creation).",
1027
- "hasDynamicHelp": false,
1028
- "multiple": false,
1029
- "type": "option"
1030
- },
1031
- "data-category-ids": {
1032
- "name": "data-category-ids",
1033
- "summary": "Comma-separated list of data category selection IDs for KNOWLEDGE libraries. Mutually exclusive with --data-category-names (provide one or the other, not both).",
1034
- "hasDynamicHelp": false,
1035
- "multiple": false,
1036
- "type": "option"
1037
- },
1038
- "data-category-names": {
1039
- "name": "data-category-names",
1040
- "summary": "Comma-separated list of data category names in qualified format (e.g., \"Group_API_Name.Category\"). Mutually exclusive with --data-category-ids (provide one or the other, not both).",
876
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
1041
877
  "hasDynamicHelp": false,
1042
878
  "multiple": false,
1043
879
  "type": "option"
1044
880
  },
1045
- "wait": {
1046
- "char": "w",
1047
- "name": "wait",
1048
- "summary": "Wait N minutes for indexing to complete (KNOWLEDGE libraries). SFDRIVE libraries require upload before indexing; RETRIEVER libraries are ready immediately.",
1049
- "hasDynamicHelp": true,
1050
- "multiple": false,
1051
- "type": "option"
881
+ "include-artifacts": {
882
+ "name": "include-artifacts",
883
+ "summary": "Resolve DC asset artifacts (DataStream, DLO, DMO, SearchIndex, Retriever) with entity IDs and names on each stage. Slower — requires additional queries.",
884
+ "allowNo": false,
885
+ "type": "boolean"
1052
886
  }
1053
887
  },
1054
888
  "hasDynamicHelp": true,
1055
889
  "hiddenAliases": [],
1056
- "id": "agent:adl:create",
890
+ "id": "agent:adl:status",
1057
891
  "pluginAlias": "@salesforce/plugin-agent",
1058
892
  "pluginName": "@salesforce/plugin-agent",
1059
893
  "pluginType": "core",
1060
894
  "strict": true,
1061
- "summary": "Create an Agentforce Data Library.",
895
+ "summary": "Get indexing status of an Agentforce Data Library.",
1062
896
  "enableJsonFlag": true,
1063
897
  "isESM": true,
1064
898
  "relativePath": [
@@ -1066,24 +900,27 @@
1066
900
  "commands",
1067
901
  "agent",
1068
902
  "adl",
1069
- "create.js"
903
+ "status.js"
1070
904
  ],
1071
905
  "aliasPermutations": [],
1072
906
  "permutations": [
1073
- "agent:adl:create",
1074
- "adl:agent:create",
1075
- "adl:create:agent",
1076
- "agent:create:adl",
1077
- "create:agent:adl",
1078
- "create:adl:agent"
907
+ "agent:adl:status",
908
+ "adl:agent:status",
909
+ "adl:status:agent",
910
+ "agent:status:adl",
911
+ "status:agent:adl",
912
+ "status:adl:agent"
1079
913
  ]
1080
914
  },
1081
- "agent:adl:delete": {
915
+ "agent:adl:update": {
1082
916
  "aliases": [],
1083
917
  "args": {},
1084
- "description": "Permanently deletes a data library and all associated files and indexing data.",
918
+ "description": "Updates the label, description, or other mutable properties of an existing data library.",
1085
919
  "examples": [
1086
- "Delete a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
920
+ "Update the label of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --name \"New Name\" --target-org myOrg",
921
+ "Update the description:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --description \"Updated description\" --target-org myOrg",
922
+ "Update Knowledge library content fields (triggers re-indexing):\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --content-fields \"Answer**c,Summary**c\" --target-org myOrg",
923
+ "Restrict Knowledge library to public articles:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --restrict-to-public-articles --target-org myOrg"
1087
924
  ],
1088
925
  "flags": {
1089
926
  "json": {
@@ -1111,18 +948,59 @@
1111
948
  "multiple": false,
1112
949
  "type": "option"
1113
950
  },
1114
- "api-version": {
1115
- "description": "Override the api version used for api requests made by this command",
1116
- "name": "api-version",
951
+ "api-version": {
952
+ "description": "Override the api version used for api requests made by this command",
953
+ "name": "api-version",
954
+ "hasDynamicHelp": false,
955
+ "multiple": false,
956
+ "type": "option"
957
+ },
958
+ "library-id": {
959
+ "char": "i",
960
+ "name": "library-id",
961
+ "required": true,
962
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
963
+ "hasDynamicHelp": false,
964
+ "multiple": false,
965
+ "type": "option"
966
+ },
967
+ "name": {
968
+ "char": "n",
969
+ "name": "name",
970
+ "summary": "New display name for the data library (max 80 characters).",
971
+ "hasDynamicHelp": false,
972
+ "multiple": false,
973
+ "type": "option"
974
+ },
975
+ "description": {
976
+ "name": "description",
977
+ "summary": "New description for the data library (max 255 characters).",
978
+ "hasDynamicHelp": false,
979
+ "multiple": false,
980
+ "type": "option"
981
+ },
982
+ "content-fields": {
983
+ "name": "content-fields",
984
+ "summary": "Comma-separated list of content fields for KNOWLEDGE libraries (triggers re-indexing).",
1117
985
  "hasDynamicHelp": false,
1118
986
  "multiple": false,
1119
987
  "type": "option"
1120
988
  },
1121
- "library-id": {
1122
- "char": "i",
1123
- "name": "library-id",
1124
- "required": true,
1125
- "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
989
+ "restrict-to-public-articles": {
990
+ "name": "restrict-to-public-articles",
991
+ "summary": "Restrict to public Knowledge articles only (KNOWLEDGE libraries, triggers re-indexing).",
992
+ "allowNo": true,
993
+ "type": "boolean"
994
+ },
995
+ "data-category-rule": {
996
+ "name": "data-category-rule",
997
+ "summary": "Enable or disable data category filtering for KNOWLEDGE libraries. Use --no-data-category-rule to disable.",
998
+ "allowNo": true,
999
+ "type": "boolean"
1000
+ },
1001
+ "retriever-id": {
1002
+ "name": "retriever-id",
1003
+ "summary": "Swap the retriever for a RETRIEVER library (must be an active Custom Retriever ID).",
1126
1004
  "hasDynamicHelp": false,
1127
1005
  "multiple": false,
1128
1006
  "type": "option"
@@ -1130,12 +1008,12 @@
1130
1008
  },
1131
1009
  "hasDynamicHelp": true,
1132
1010
  "hiddenAliases": [],
1133
- "id": "agent:adl:delete",
1011
+ "id": "agent:adl:update",
1134
1012
  "pluginAlias": "@salesforce/plugin-agent",
1135
1013
  "pluginName": "@salesforce/plugin-agent",
1136
1014
  "pluginType": "core",
1137
1015
  "strict": true,
1138
- "summary": "Delete an Agentforce Data Library.",
1016
+ "summary": "Update an Agentforce Data Library.",
1139
1017
  "enableJsonFlag": true,
1140
1018
  "isESM": true,
1141
1019
  "relativePath": [
@@ -1143,24 +1021,25 @@
1143
1021
  "commands",
1144
1022
  "agent",
1145
1023
  "adl",
1146
- "delete.js"
1024
+ "update.js"
1147
1025
  ],
1148
1026
  "aliasPermutations": [],
1149
1027
  "permutations": [
1150
- "agent:adl:delete",
1151
- "adl:agent:delete",
1152
- "adl:delete:agent",
1153
- "agent:delete:adl",
1154
- "delete:agent:adl",
1155
- "delete:adl:agent"
1028
+ "agent:adl:update",
1029
+ "adl:agent:update",
1030
+ "adl:update:agent",
1031
+ "agent:update:adl",
1032
+ "update:agent:adl",
1033
+ "update:adl:agent"
1156
1034
  ]
1157
1035
  },
1158
- "agent:adl:get": {
1036
+ "agent:adl:upload": {
1159
1037
  "aliases": [],
1160
1038
  "args": {},
1161
- "description": "Returns the full detail of a data library including its grounding source configuration, status, and retriever ID.",
1039
+ "description": "Performs the multi-step upload workflow: checks upload readiness, obtains a pre-signed S3 URL, uploads the file, triggers indexing, and optionally polls until the library is ready (retrieverId is populated).\n\nUpload triggers the full Data Cloud provisioning pipeline, creating all downstream assets (DLO, DMO, SearchIndex, Retriever). Use `sf agent adl status` to monitor progress. For adding files to an already-provisioned library, use `sf agent adl file add` instead.\n\nThis command only works with SFDRIVE libraries. KNOWLEDGE libraries index automatically after creation, and RETRIEVER libraries require no file upload.",
1162
1040
  "examples": [
1163
- "Get details of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
1041
+ "Upload a file and wait for indexing to complete:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg --wait 10",
1042
+ "Upload a file without waiting:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg"
1164
1043
  ],
1165
1044
  "flags": {
1166
1045
  "json": {
@@ -1203,16 +1082,33 @@
1203
1082
  "hasDynamicHelp": false,
1204
1083
  "multiple": false,
1205
1084
  "type": "option"
1085
+ },
1086
+ "file": {
1087
+ "char": "f",
1088
+ "name": "file",
1089
+ "required": true,
1090
+ "summary": "Path to the file to upload.",
1091
+ "hasDynamicHelp": false,
1092
+ "multiple": true,
1093
+ "type": "option"
1094
+ },
1095
+ "wait": {
1096
+ "char": "w",
1097
+ "name": "wait",
1098
+ "summary": "Number of minutes to wait for indexing to complete. If not specified, returns after triggering indexing.",
1099
+ "hasDynamicHelp": true,
1100
+ "multiple": false,
1101
+ "type": "option"
1206
1102
  }
1207
1103
  },
1208
1104
  "hasDynamicHelp": true,
1209
1105
  "hiddenAliases": [],
1210
- "id": "agent:adl:get",
1106
+ "id": "agent:adl:upload",
1211
1107
  "pluginAlias": "@salesforce/plugin-agent",
1212
1108
  "pluginName": "@salesforce/plugin-agent",
1213
1109
  "pluginType": "core",
1214
1110
  "strict": true,
1215
- "summary": "Get details of an Agentforce Data Library.",
1111
+ "summary": "Upload a file to an SFDRIVE Agentforce Data Library.",
1216
1112
  "enableJsonFlag": true,
1217
1113
  "isESM": true,
1218
1114
  "relativePath": [
@@ -1220,25 +1116,28 @@
1220
1116
  "commands",
1221
1117
  "agent",
1222
1118
  "adl",
1223
- "get.js"
1119
+ "upload.js"
1224
1120
  ],
1225
1121
  "aliasPermutations": [],
1226
1122
  "permutations": [
1227
- "agent:adl:get",
1228
- "adl:agent:get",
1229
- "adl:get:agent",
1230
- "agent:get:adl",
1231
- "get:agent:adl",
1232
- "get:adl:agent"
1123
+ "agent:adl:upload",
1124
+ "adl:agent:upload",
1125
+ "adl:upload:agent",
1126
+ "agent:upload:adl",
1127
+ "upload:agent:adl",
1128
+ "upload:adl:agent"
1233
1129
  ]
1234
1130
  },
1235
- "agent:adl:list": {
1131
+ "agent:generate:agent-spec": {
1236
1132
  "aliases": [],
1237
1133
  "args": {},
1238
- "description": "Returns all data libraries in the target org, including their source type, status, and library ID.",
1134
+ "description": "An agent spec is a YAML-formatted file that contains basic information about the agent, such as its role, company description, and an AI-generated list of topics based on this information. Topics define the range of jobs your agent can handle.\n\nUse 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.\n\nYou 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.\n\nYou 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.\n\nWhen your agent spec is ready, generate an authoring bundle from it by passing the spec file to the --spec flag of the \"agent generate authoring-bundle\" CLI command. An authoring bundle is a metadata type that contains an Agent Script file, which is the blueprint for an agent. (While not recommended, you can also use the agent spec file to immediately create an agent with the \"agent create\" command. We don't recommend this workflow because these types of agents don't use Agent Script, and are thus less flexible and more difficult to maintain.)",
1239
1135
  "examples": [
1240
- "List all data libraries in the default target org:\n<%= config.bin %> <%= command.id %> --target-org myOrg",
1241
- "List data libraries and output as JSON:\n<%= config.bin %> <%= command.id %> --target-org myOrg --json"
1136
+ "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:\n<%= 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.\"",
1137
+ "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\":\n<%= config.bin %> <%= command.id %> --max-topics 5 --output-file specs/resortManagerAgent.yaml --target-org my-org",
1138
+ "Be prompted for all required and optional agent properties; use your default org:\n<%= config.bin %> <%= command.id %> --full-interview",
1139
+ "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:\n<%= 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\"",
1140
+ "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:\n<%= config.bin %> <%= command.id %> --tone formal --agent-user resortmanager@myorg.com"
1242
1141
  ],
1243
1142
  "flags": {
1244
1143
  "json": {
@@ -1273,52 +1172,164 @@
1273
1172
  "multiple": false,
1274
1173
  "type": "option"
1275
1174
  },
1276
- "source-type": {
1277
- "name": "source-type",
1278
- "summary": "Filter by source type: sfdrive, knowledge, or retriever.",
1175
+ "type": {
1176
+ "name": "type",
1177
+ "summary": "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.",
1279
1178
  "hasDynamicHelp": false,
1280
1179
  "multiple": false,
1281
1180
  "options": [
1282
- "sfdrive",
1283
- "knowledge",
1284
- "retriever"
1181
+ "customer",
1182
+ "internal"
1183
+ ],
1184
+ "type": "option"
1185
+ },
1186
+ "role": {
1187
+ "name": "role",
1188
+ "summary": "Role of the agent.",
1189
+ "hasDynamicHelp": false,
1190
+ "multiple": false,
1191
+ "type": "option"
1192
+ },
1193
+ "company-name": {
1194
+ "name": "company-name",
1195
+ "summary": "Name of your company.",
1196
+ "hasDynamicHelp": false,
1197
+ "multiple": false,
1198
+ "type": "option"
1199
+ },
1200
+ "company-description": {
1201
+ "name": "company-description",
1202
+ "summary": "Description of your company.",
1203
+ "hasDynamicHelp": false,
1204
+ "multiple": false,
1205
+ "type": "option"
1206
+ },
1207
+ "company-website": {
1208
+ "name": "company-website",
1209
+ "summary": "Website URL of your company.",
1210
+ "hasDynamicHelp": false,
1211
+ "multiple": false,
1212
+ "type": "option"
1213
+ },
1214
+ "max-topics": {
1215
+ "name": "max-topics",
1216
+ "summary": "Maximum number of topics to generate in the agent spec; default is 5.",
1217
+ "hasDynamicHelp": false,
1218
+ "multiple": false,
1219
+ "type": "option"
1220
+ },
1221
+ "agent-user": {
1222
+ "name": "agent-user",
1223
+ "summary": "Username of a user in your org to assign to your agent; determines what your agent can access and do.",
1224
+ "hasDynamicHelp": false,
1225
+ "multiple": false,
1226
+ "type": "option"
1227
+ },
1228
+ "enrich-logs": {
1229
+ "name": "enrich-logs",
1230
+ "summary": "Adds agent conversation data to event logs so you can view all agent session activity in one place.",
1231
+ "hasDynamicHelp": false,
1232
+ "multiple": false,
1233
+ "options": [
1234
+ "true",
1235
+ "false"
1236
+ ],
1237
+ "type": "option"
1238
+ },
1239
+ "tone": {
1240
+ "name": "tone",
1241
+ "summary": "Conversational style of the agent, such as how it expresses your brand personality in its messages through word choice, punctuation, and sentence structure.",
1242
+ "hasDynamicHelp": false,
1243
+ "multiple": false,
1244
+ "options": [
1245
+ "formal",
1246
+ "casual",
1247
+ "neutral"
1248
+ ],
1249
+ "type": "option"
1250
+ },
1251
+ "spec": {
1252
+ "name": "spec",
1253
+ "summary": "Agent spec file, in YAML format, to use as input to the command.",
1254
+ "hasDynamicHelp": false,
1255
+ "multiple": false,
1256
+ "type": "option"
1257
+ },
1258
+ "output-file": {
1259
+ "name": "output-file",
1260
+ "summary": "Path for the generated YAML agent spec file; can be an absolute or relative path.",
1261
+ "default": "specs/agentSpec.yaml",
1262
+ "hasDynamicHelp": false,
1263
+ "multiple": false,
1264
+ "type": "option"
1265
+ },
1266
+ "full-interview": {
1267
+ "name": "full-interview",
1268
+ "summary": "Prompt for both required and optional flags.",
1269
+ "allowNo": false,
1270
+ "type": "boolean"
1271
+ },
1272
+ "prompt-template": {
1273
+ "name": "prompt-template",
1274
+ "summary": "API name of a customized prompt template to use instead of the default prompt template.",
1275
+ "hasDynamicHelp": false,
1276
+ "multiple": false,
1277
+ "type": "option"
1278
+ },
1279
+ "grounding-context": {
1280
+ "dependsOn": [
1281
+ "prompt-template"
1285
1282
  ],
1283
+ "name": "grounding-context",
1284
+ "summary": "Context information and personalization that's added to your prompts when using a custom prompt template.",
1285
+ "hasDynamicHelp": false,
1286
+ "multiple": false,
1286
1287
  "type": "option"
1288
+ },
1289
+ "force-overwrite": {
1290
+ "name": "force-overwrite",
1291
+ "summary": "Don't prompt the user to confirm that an existing spec file will be overwritten.",
1292
+ "allowNo": false,
1293
+ "type": "boolean"
1287
1294
  }
1288
1295
  },
1289
1296
  "hasDynamicHelp": true,
1290
1297
  "hiddenAliases": [],
1291
- "id": "agent:adl:list",
1298
+ "id": "agent:generate:agent-spec",
1292
1299
  "pluginAlias": "@salesforce/plugin-agent",
1293
1300
  "pluginName": "@salesforce/plugin-agent",
1294
1301
  "pluginType": "core",
1295
1302
  "strict": true,
1296
- "summary": "List Agentforce Data Libraries in an org.",
1303
+ "summary": "Generate an agent spec, which is a YAML file that captures what an agent can do.",
1297
1304
  "enableJsonFlag": true,
1305
+ "requiresProject": true,
1298
1306
  "isESM": true,
1299
1307
  "relativePath": [
1300
1308
  "lib",
1301
1309
  "commands",
1302
1310
  "agent",
1303
- "adl",
1304
- "list.js"
1311
+ "generate",
1312
+ "agent-spec.js"
1305
1313
  ],
1306
1314
  "aliasPermutations": [],
1307
1315
  "permutations": [
1308
- "agent:adl:list",
1309
- "adl:agent:list",
1310
- "adl:list:agent",
1311
- "agent:list:adl",
1312
- "list:agent:adl",
1313
- "list:adl:agent"
1316
+ "agent:generate:agent-spec",
1317
+ "generate:agent:agent-spec",
1318
+ "generate:agent-spec:agent",
1319
+ "agent:agent-spec:generate",
1320
+ "agent-spec:agent:generate",
1321
+ "agent-spec:generate:agent"
1314
1322
  ]
1315
1323
  },
1316
- "agent:adl:status": {
1324
+ "agent:generate:authoring-bundle": {
1317
1325
  "aliases": [],
1318
1326
  "args": {},
1319
- "description": "Returns the current indexing status including stage details (DATA_STREAM, DATA_LAKE_OBJECT, DATA_MODEL_OBJECT, SEARCH_INDEX, RETRIEVER) and any errors.",
1327
+ "description": "Authoring bundles are metadata components that contain an agent's Agent Script file. The Agent Script file is the agent's blueprint; it fully describes what the agent can do using the Agent Script language.\n\nUse 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. The resulting Agent Script file is customized to reflect what's in the agent spec file. You can also create an authoring bundle without an agent spec file by specifying the \"--no-spec\" flag; in this case, the resulting Agent Script file is just the default boilerplate.\n\nThe 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.\n\nAfter 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.\n\nThis command requires an org because it uses it to access an LLM for generating the Agent Script file.",
1320
1328
  "examples": [
1321
- "Get status of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
1329
+ "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:\n<%= config.bin %> <%= command.id %>",
1330
+ "Generate an authoring bundle without using an agent spec file; give the bundle the label \"My Authoring Bundle\" and use your default org:\n<%= config.bin %> <%= command.id %> --no-spec --name \"My Authoring Bundle\"",
1331
+ "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:\n<%= config.bin %> <%= command.id %> --spec specs/agentSpec.yaml --name \"My Authoring Bundle\"",
1332
+ "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\":\n<%= config.bin %> <%= command.id %> --spec specs/agentSpec.yaml --name \"My Authoring Bundle\" --output-dir other-package-dir/main/default --target-org my-dev-org"
1322
1333
  ],
1323
1334
  "flags": {
1324
1335
  "json": {
@@ -1346,6 +1357,13 @@
1346
1357
  "multiple": false,
1347
1358
  "type": "option"
1348
1359
  },
1360
+ "api-name": {
1361
+ "name": "api-name",
1362
+ "summary": "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.",
1363
+ "hasDynamicHelp": false,
1364
+ "multiple": false,
1365
+ "type": "option"
1366
+ },
1349
1367
  "api-version": {
1350
1368
  "description": "Override the api version used for api requests made by this command",
1351
1369
  "name": "api-version",
@@ -1353,58 +1371,77 @@
1353
1371
  "multiple": false,
1354
1372
  "type": "option"
1355
1373
  },
1356
- "library-id": {
1357
- "char": "i",
1358
- "name": "library-id",
1359
- "required": true,
1360
- "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
1374
+ "spec": {
1375
+ "char": "f",
1376
+ "name": "spec",
1377
+ "summary": "Path to the agent spec YAML file. If you don't specify the flag, the command provides a list that you can choose from. Use the --no-spec flag to skip using an agent spec entirely.",
1361
1378
  "hasDynamicHelp": false,
1362
1379
  "multiple": false,
1363
1380
  "type": "option"
1364
1381
  },
1365
- "include-artifacts": {
1366
- "name": "include-artifacts",
1367
- "summary": "Resolve DC asset artifacts (DataStream, DLO, DMO, SearchIndex, Retriever) with entity IDs and names on each stage. Slower — requires additional queries.",
1382
+ "no-spec": {
1383
+ "name": "no-spec",
1384
+ "summary": "Skip prompting for an agent spec and use the default Agent Script boilerplate in the generated authoring bundle.",
1385
+ "allowNo": false,
1386
+ "type": "boolean"
1387
+ },
1388
+ "output-dir": {
1389
+ "char": "d",
1390
+ "name": "output-dir",
1391
+ "summary": "Directory where the authoring bundle files are generated.",
1392
+ "hasDynamicHelp": false,
1393
+ "multiple": false,
1394
+ "type": "option"
1395
+ },
1396
+ "name": {
1397
+ "char": "n",
1398
+ "name": "name",
1399
+ "summary": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
1400
+ "hasDynamicHelp": false,
1401
+ "multiple": false,
1402
+ "type": "option"
1403
+ },
1404
+ "force-overwrite": {
1405
+ "name": "force-overwrite",
1406
+ "summary": "Overwrite the existing authoring bundle if one with the same API name already exists locally.",
1368
1407
  "allowNo": false,
1369
1408
  "type": "boolean"
1370
1409
  }
1371
1410
  },
1372
1411
  "hasDynamicHelp": true,
1373
1412
  "hiddenAliases": [],
1374
- "id": "agent:adl:status",
1413
+ "id": "agent:generate:authoring-bundle",
1375
1414
  "pluginAlias": "@salesforce/plugin-agent",
1376
1415
  "pluginName": "@salesforce/plugin-agent",
1377
1416
  "pluginType": "core",
1378
1417
  "strict": true,
1379
- "summary": "Get indexing status of an Agentforce Data Library.",
1418
+ "summary": "Generate an authoring bundle from an existing agent spec YAML file.",
1380
1419
  "enableJsonFlag": true,
1420
+ "requiresProject": true,
1381
1421
  "isESM": true,
1382
1422
  "relativePath": [
1383
1423
  "lib",
1384
1424
  "commands",
1385
1425
  "agent",
1386
- "adl",
1387
- "status.js"
1426
+ "generate",
1427
+ "authoring-bundle.js"
1388
1428
  ],
1389
1429
  "aliasPermutations": [],
1390
1430
  "permutations": [
1391
- "agent:adl:status",
1392
- "adl:agent:status",
1393
- "adl:status:agent",
1394
- "agent:status:adl",
1395
- "status:agent:adl",
1396
- "status:adl:agent"
1431
+ "agent:generate:authoring-bundle",
1432
+ "generate:agent:authoring-bundle",
1433
+ "generate:authoring-bundle:agent",
1434
+ "agent:authoring-bundle:generate",
1435
+ "authoring-bundle:agent:generate",
1436
+ "authoring-bundle:generate:agent"
1397
1437
  ]
1398
1438
  },
1399
- "agent:adl:update": {
1439
+ "agent:generate:template": {
1400
1440
  "aliases": [],
1401
1441
  "args": {},
1402
- "description": "Updates the label, description, or other mutable properties of an existing data library.",
1442
+ "description": "WARNING: This command doesn't work for agents that were created from an Agent Script file. In other words, you can't currently package an agent template for agents that use Agent Script.\n\nAt a high-level, agents are defined by the Bot, BotVersion, and GenAiPlannerBundle metadata types. The GenAiPlannerBundle type in turn defines the agent's topics and actions. This command uses the metadata files for these three types, located in your local DX project, to generate a BotTemplate metadata file for a specific agent (Bot). You then use the BotTemplate metadata file, along with the GenAiPlannerBundle metadata file that references the BotTemplate, to package the template in a managed package that you can share between orgs or on AppExchange.\n\nUse the --agent-file flag to specify the relative or full pathname of the Bot metadata file, such as force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml. A single Bot can have multiple BotVersions, so use the --agent-version flag to specify the version. The corresponding BotVersion metadata file must exist locally. For example, if you specify \"--agent-version 4\", then the file force-app/main/default/bots/My_Awesome_Agent/v4.botVersion-meta.xml must exist.\n\nThe new BotTemplate metadata file is generated in the \"botTemplates\" directory in the output directory specified with the --output-dir flag, and has the name <Agent_API_name>\\_v<Version>\\_Template.botTemplate-meta.xml, such as my-package/botTemplates/My_Awesome_Agent_v4_Template.botTemplate-meta.xml. The command displays the full pathname of the generated files when it completes.\n\nSee \"Develop and Package Agent Templates Using Scratch Orgs\" (https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/dev2gp_package_agent_templates.htm) for details about the complete process, which includes using a scratch org to create and test the agent, retrieving the agent metadata to your DX project, running this command to create the agent template, and then packaging the template.",
1403
1443
  "examples": [
1404
- "Update the label of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --name \"New Name\" --target-org myOrg",
1405
- "Update the description:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --description \"Updated description\" --target-org myOrg",
1406
- "Update Knowledge library content fields (triggers re-indexing):\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --content-fields \"Answer**c,Summary**c\" --target-org myOrg",
1407
- "Restrict Knowledge library to public articles:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --restrict-to-public-articles --target-org myOrg"
1444
+ "Generate an agent template from the My_Awesome_Agent Bot metadata file in your DX project and save the BotTemplate and GenAiPlannerBundle to the specified directory; use version 1 of the agent. The agent that the template is based on is in the org with alias \"my-scratch-org\":\n<%= config.bin %> <%= command.id %> --agent-file force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1 --output-dir my-package --source-org my-scratch-org"
1408
1445
  ],
1409
1446
  "flags": {
1410
1447
  "json": {
@@ -1422,16 +1459,6 @@
1422
1459
  "multiple": false,
1423
1460
  "type": "option"
1424
1461
  },
1425
- "target-org": {
1426
- "char": "o",
1427
- "name": "target-org",
1428
- "noCacheDefault": true,
1429
- "required": true,
1430
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1431
- "hasDynamicHelp": true,
1432
- "multiple": false,
1433
- "type": "option"
1434
- },
1435
1462
  "api-version": {
1436
1463
  "description": "Override the api version used for api requests made by this command",
1437
1464
  "name": "api-version",
@@ -1439,52 +1466,37 @@
1439
1466
  "multiple": false,
1440
1467
  "type": "option"
1441
1468
  },
1442
- "library-id": {
1443
- "char": "i",
1444
- "name": "library-id",
1469
+ "source-org": {
1470
+ "char": "s",
1471
+ "name": "source-org",
1472
+ "noCacheDefault": true,
1445
1473
  "required": true,
1446
- "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
1447
- "hasDynamicHelp": false,
1448
- "multiple": false,
1449
- "type": "option"
1450
- },
1451
- "name": {
1452
- "char": "n",
1453
- "name": "name",
1454
- "summary": "New display name for the data library (max 80 characters).",
1455
- "hasDynamicHelp": false,
1474
+ "summary": "Username or alias of the namespaced scratch org that contains the agent which this template is based on.",
1475
+ "hasDynamicHelp": true,
1456
1476
  "multiple": false,
1457
1477
  "type": "option"
1458
1478
  },
1459
- "description": {
1460
- "name": "description",
1461
- "summary": "New description for the data library (max 255 characters).",
1479
+ "agent-version": {
1480
+ "name": "agent-version",
1481
+ "required": true,
1482
+ "summary": "Version of the agent (BotVersion).",
1462
1483
  "hasDynamicHelp": false,
1463
1484
  "multiple": false,
1464
1485
  "type": "option"
1465
1486
  },
1466
- "content-fields": {
1467
- "name": "content-fields",
1468
- "summary": "Comma-separated list of content fields for KNOWLEDGE libraries (triggers re-indexing).",
1487
+ "agent-file": {
1488
+ "char": "f",
1489
+ "name": "agent-file",
1490
+ "required": true,
1491
+ "summary": "Path to an agent (Bot) metadata file.",
1469
1492
  "hasDynamicHelp": false,
1470
1493
  "multiple": false,
1471
1494
  "type": "option"
1472
1495
  },
1473
- "restrict-to-public-articles": {
1474
- "name": "restrict-to-public-articles",
1475
- "summary": "Restrict to public Knowledge articles only (KNOWLEDGE libraries, triggers re-indexing).",
1476
- "allowNo": true,
1477
- "type": "boolean"
1478
- },
1479
- "data-category-rule": {
1480
- "name": "data-category-rule",
1481
- "summary": "Enable or disable data category filtering for KNOWLEDGE libraries. Use --no-data-category-rule to disable.",
1482
- "allowNo": true,
1483
- "type": "boolean"
1484
- },
1485
- "retriever-id": {
1486
- "name": "retriever-id",
1487
- "summary": "Swap the retriever for a RETRIEVER library (must be an active Custom Retriever ID).",
1496
+ "output-dir": {
1497
+ "char": "r",
1498
+ "name": "output-dir",
1499
+ "summary": "Directory where the generated BotTemplate and GenAiPlannerBundle files are saved.",
1488
1500
  "hasDynamicHelp": false,
1489
1501
  "multiple": false,
1490
1502
  "type": "option"
@@ -1492,47 +1504,44 @@
1492
1504
  },
1493
1505
  "hasDynamicHelp": true,
1494
1506
  "hiddenAliases": [],
1495
- "id": "agent:adl:update",
1507
+ "id": "agent:generate:template",
1496
1508
  "pluginAlias": "@salesforce/plugin-agent",
1497
1509
  "pluginName": "@salesforce/plugin-agent",
1498
1510
  "pluginType": "core",
1499
1511
  "strict": true,
1500
- "summary": "Update an Agentforce Data Library.",
1512
+ "summary": "Generate an agent template from an existing agent in your DX project so you can then package the template in a second-generation managed package.",
1501
1513
  "enableJsonFlag": true,
1514
+ "requiresProject": true,
1502
1515
  "isESM": true,
1503
1516
  "relativePath": [
1504
1517
  "lib",
1505
1518
  "commands",
1506
1519
  "agent",
1507
- "adl",
1508
- "update.js"
1520
+ "generate",
1521
+ "template.js"
1509
1522
  ],
1510
1523
  "aliasPermutations": [],
1511
1524
  "permutations": [
1512
- "agent:adl:update",
1513
- "adl:agent:update",
1514
- "adl:update:agent",
1515
- "agent:update:adl",
1516
- "update:agent:adl",
1517
- "update:adl:agent"
1525
+ "agent:generate:template",
1526
+ "generate:agent:template",
1527
+ "generate:template:agent",
1528
+ "agent:template:generate",
1529
+ "template:agent:generate",
1530
+ "template:generate:agent"
1518
1531
  ]
1519
1532
  },
1520
- "agent:adl:upload": {
1533
+ "agent:generate:test-spec": {
1521
1534
  "aliases": [],
1522
1535
  "args": {},
1523
- "description": "Performs the multi-step upload workflow: checks upload readiness, obtains a pre-signed S3 URL, uploads the file, triggers indexing, and optionally polls until the library is ready (retrieverId is populated).\n\nUpload triggers the full Data Cloud provisioning pipeline, creating all downstream assets (DLO, DMO, SearchIndex, Retriever). Use `sf agent adl status` to monitor progress. For adding files to an already-provisioned library, use `sf agent adl file add` instead.\n\nThis command only works with SFDRIVE libraries. KNOWLEDGE libraries index automatically after creation, and RETRIEVER libraries require no file upload.",
1536
+ "description": "The first step when using Salesforce CLI to create an agent test in your org is to use this interactive command to generate a local YAML-formatted test spec file. The test spec YAML file contains information about the agent being tested, such as its API name, and then one or more test cases. This command uses the metadata components in your DX project when prompting for information, such as the agent API name; it doesn't look in your org.\n\nTo generate a specific agent test case, this command prompts you for this information; when possible, the command provides a list of options for you to choose from:\n\n- Utterance: Natural language statement, question, or command used to test the agent.\n- Expected topic: API name of the topic you expect the agent to use when responding to the utterance.\n- Expected actions: One or more API names of the expection actions the agent takes.\n- Expected outcome: Natural language description of the outcome you expect.\n- (Optional) Custom evaluation: Test an agent's response for specific strings or numbers.\n- (Optional) Conversation history: Boilerplate for additional context you can add to the test in the form of a conversation history.\n\nYou can manually add contextVariables to test cases in the generated YAML file to inject contextual data (such as CaseId or RoutableId) into agent sessions. This is useful for testing agent behavior with different contextual information.\n\nWhen your test spec is ready, you then run the \"agent test create\" command to actually create the test in your org and synchronize the metadata with your DX project. The metadata type for an agent test is `AiEvaluationDefinition` (legacy testing-center) or `AiTestingDefinition` (Agentforce Studio / NGT), selected via --test-runner.\n\nIf you have an existing AiEvaluationDefinition or AiTestingDefinition metadata XML file in your DX project, you can generate its equivalent YAML test spec file with the --from-definition flag. The runner is inferred from the file extension; pass --test-runner to override.",
1524
1537
  "examples": [
1525
- "Upload a file and wait for indexing to complete:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg --wait 10",
1526
- "Upload a file without waiting:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg"
1538
+ "Generate an agent test spec YAML file interactively:\n<%= config.bin %> <%= command.id %>",
1539
+ "Generate an Agentforce Studio (NGT) test spec YAML file interactively:\n<%= config.bin %> <%= command.id %> --test-runner agentforce-studio",
1540
+ "Generate an agent test spec YAML file and specify a name for the new file; if the file exists, overwrite it without confirmation:\n<%= config.bin %> <%= command.id %> --output-file specs/Resort_Manager-new-version-testSpec.yaml --force-overwrite",
1541
+ "Generate an agent test spec YAML file from an existing AiEvaluationDefinition metadata XML file in your DX project:\n<%= config.bin %> <%= command.id %> --from-definition force-app/main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml",
1542
+ "Generate an Agentforce Studio (NGT) test spec YAML file from an existing AiTestingDefinition metadata XML file:\n<%= config.bin %> <%= command.id %> --from-definition force-app/main/default/aiTestingDefinitions/Returns_Checkout_Tests.aiTestingDefinition-meta.xml"
1527
1543
  ],
1528
1544
  "flags": {
1529
- "json": {
1530
- "description": "Format output as json.",
1531
- "helpGroup": "GLOBAL",
1532
- "name": "json",
1533
- "allowNo": false,
1534
- "type": "boolean"
1535
- },
1536
1545
  "flags-dir": {
1537
1546
  "helpGroup": "GLOBAL",
1538
1547
  "name": "flags-dir",
@@ -1541,75 +1550,66 @@
1541
1550
  "multiple": false,
1542
1551
  "type": "option"
1543
1552
  },
1544
- "target-org": {
1545
- "char": "o",
1546
- "name": "target-org",
1547
- "noCacheDefault": true,
1548
- "required": true,
1549
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1550
- "hasDynamicHelp": true,
1551
- "multiple": false,
1552
- "type": "option"
1553
- },
1554
- "api-version": {
1555
- "description": "Override the api version used for api requests made by this command",
1556
- "name": "api-version",
1553
+ "from-definition": {
1554
+ "char": "d",
1555
+ "name": "from-definition",
1556
+ "summary": "Filepath to an AiEvaluationDefinition or AiTestingDefinition metadata XML file in your DX project that you want to convert to a test spec YAML file.",
1557
1557
  "hasDynamicHelp": false,
1558
1558
  "multiple": false,
1559
1559
  "type": "option"
1560
1560
  },
1561
- "library-id": {
1562
- "char": "i",
1563
- "name": "library-id",
1564
- "required": true,
1565
- "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
1566
- "hasDynamicHelp": false,
1567
- "multiple": false,
1568
- "type": "option"
1561
+ "force-overwrite": {
1562
+ "name": "force-overwrite",
1563
+ "summary": "Don't prompt for confirmation when overwriting an existing test spec YAML file.",
1564
+ "allowNo": false,
1565
+ "type": "boolean"
1569
1566
  },
1570
- "file": {
1567
+ "output-file": {
1571
1568
  "char": "f",
1572
- "name": "file",
1573
- "required": true,
1574
- "summary": "Path to the file to upload.",
1569
+ "name": "output-file",
1570
+ "summary": "Name of the generated test spec YAML file. Default value is \"specs/<AGENT_API_NAME>-testSpec.yaml\" (legacy) or \"specs/<AGENT_API_NAME>-ngtTestSpec.yaml\" (Agentforce Studio).",
1575
1571
  "hasDynamicHelp": false,
1576
- "multiple": true,
1572
+ "multiple": false,
1577
1573
  "type": "option"
1578
1574
  },
1579
- "wait": {
1580
- "char": "w",
1581
- "name": "wait",
1582
- "summary": "Number of minutes to wait for indexing to complete. If not specified, returns after triggering indexing.",
1583
- "hasDynamicHelp": true,
1575
+ "test-runner": {
1576
+ "description": "By default, the command automatically detects which test runner to use based on the test definition metadata type in your org. Use this flag to explicitly specify the runner type. 'agentforce-studio' uses AiTestingDefinition metadata. 'testing-center' uses AiEvaluationDefinition metadata.",
1577
+ "name": "test-runner",
1578
+ "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
1579
+ "hasDynamicHelp": false,
1584
1580
  "multiple": false,
1581
+ "options": [
1582
+ "agentforce-studio",
1583
+ "testing-center"
1584
+ ],
1585
1585
  "type": "option"
1586
1586
  }
1587
1587
  },
1588
- "hasDynamicHelp": true,
1588
+ "hasDynamicHelp": false,
1589
1589
  "hiddenAliases": [],
1590
- "id": "agent:adl:upload",
1590
+ "id": "agent:generate:test-spec",
1591
1591
  "pluginAlias": "@salesforce/plugin-agent",
1592
1592
  "pluginName": "@salesforce/plugin-agent",
1593
1593
  "pluginType": "core",
1594
1594
  "strict": true,
1595
- "summary": "Upload a file to an SFDRIVE Agentforce Data Library.",
1596
- "enableJsonFlag": true,
1595
+ "summary": "Generate an agent test spec, which is a YAML file that lists the test cases for testing a specific agent.",
1596
+ "enableJsonFlag": false,
1597
1597
  "isESM": true,
1598
1598
  "relativePath": [
1599
1599
  "lib",
1600
1600
  "commands",
1601
1601
  "agent",
1602
- "adl",
1603
- "upload.js"
1602
+ "generate",
1603
+ "test-spec.js"
1604
1604
  ],
1605
1605
  "aliasPermutations": [],
1606
1606
  "permutations": [
1607
- "agent:adl:upload",
1608
- "adl:agent:upload",
1609
- "adl:upload:agent",
1610
- "agent:upload:adl",
1611
- "upload:agent:adl",
1612
- "upload:adl:agent"
1607
+ "agent:generate:test-spec",
1608
+ "generate:agent:test-spec",
1609
+ "generate:test-spec:agent",
1610
+ "agent:test-spec:generate",
1611
+ "test-spec:agent:generate",
1612
+ "test-spec:generate:agent"
1613
1613
  ]
1614
1614
  },
1615
1615
  "agent:mcp:create": {
@@ -2809,6 +2809,16 @@
2809
2809
  "allowNo": false,
2810
2810
  "type": "boolean"
2811
2811
  },
2812
+ "source-type": {
2813
+ "name": "source-type",
2814
+ "summary": "Where the agent came from. Use \"Bot\" when the agent was converted from an Einstein Bot. Applied on the first publish only.",
2815
+ "hasDynamicHelp": false,
2816
+ "multiple": false,
2817
+ "options": [
2818
+ "Bot"
2819
+ ],
2820
+ "type": "option"
2821
+ },
2812
2822
  "verbose": {
2813
2823
  "char": "v",
2814
2824
  "exclusive": [
@@ -4683,5 +4693,5 @@
4683
4693
  ]
4684
4694
  }
4685
4695
  },
4686
- "version": "2.2.3"
4696
+ "version": "2.3.0"
4687
4697
  }