{"id":33135138,"url":"https://github.com/salesforcecli/plugin-agent","last_synced_at":"2026-06-03T04:00:41.380Z","repository":{"id":260661961,"uuid":"877680154","full_name":"salesforcecli/plugin-agent","owner":"salesforcecli","description":"Commands to interact with Salesforce agents","archived":false,"fork":false,"pushed_at":"2026-05-24T04:05:42.000Z","size":4656,"stargazers_count":9,"open_issues_count":6,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-05-24T06:20:16.811Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/salesforcecli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-24T03:59:18.000Z","updated_at":"2026-05-24T04:02:58.000Z","dependencies_parsed_at":"2026-03-01T08:02:31.699Z","dependency_job_id":null,"html_url":"https://github.com/salesforcecli/plugin-agent","commit_stats":null,"previous_names":["salesforcecli/plugin-agent"],"tags_count":246,"template":false,"template_full_name":null,"purl":"pkg:github/salesforcecli/plugin-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Fplugin-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Fplugin-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Fplugin-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Fplugin-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salesforcecli","download_url":"https://codeload.github.com/salesforcecli/plugin-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Fplugin-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33847265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-11-15T10:03:42.411Z","updated_at":"2026-06-03T04:00:41.371Z","avatar_url":"https://github.com/salesforcecli.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# plugin-agent\n\n[![NPM](https://img.shields.io/npm/v/@salesforce/plugin-agent.svg?label=@salesforce/plugin-agent)](https://www.npmjs.com/package/@salesforce/plugin-agent) [![Downloads/week](https://img.shields.io/npm/dw/@salesforce/plugin-agent.svg)](https://npmjs.org/package/@salesforce/plugin-agent) [![License](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](https://opensource.org/license/apache-2-0)\n\n## Install\n\n```bash\nsf plugins install @salesforce/plugin-agent@x.y.z\n```\n\n## Contributing\n\n1. Please read our [Code of Conduct](CODE_OF_CONDUCT.md)\n2. Create a new issue before starting your project so that we can keep track of\n   what you are trying to add/fix. That way, we can also offer suggestions or\n   let you know if there is already an effort in progress.\n3. Fork this repository.\n4. [Build the plugin locally](#build)\n5. Create a _topic_ branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.\n6. Edit the code in your fork.\n7. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests.\n8. Sign CLA (see [CLA](#cla) below).\n9. Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.\n\n### CLA\n\nExternal contributors will be required to sign a Contributor's License\nAgreement. You can do so by going to https://cla.salesforce.com/sign-cla.\n\n### Build\n\nTo build the plugin locally, make sure to have yarn installed and run the following commands:\n\n```bash\n# Clone the repository\ngit clone git@github.com:salesforcecli/plugin-agent\n\n# Install the dependencies and compile\nyarn \u0026\u0026 yarn build\n```\n\nTo use your plugin, run using the local `./bin/dev.js` or `./bin/dev.cmd` file.\n\n```bash\n# Run using local run file.\n./bin/dev.js agent\n```\n\nThere should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.\n\n```bash\n# Link your plugin to the sf cli\nsf plugins link .\n# To verify\nsf plugins\n```\n\n## Commands\n\n\u003c!-- commands --\u003e\n\n- [`sf agent activate`](#sf-agent-activate)\n- [`sf agent adl create`](#sf-agent-adl-create)\n- [`sf agent adl delete`](#sf-agent-adl-delete)\n- [`sf agent adl file add`](#sf-agent-adl-file-add)\n- [`sf agent adl file delete`](#sf-agent-adl-file-delete)\n- [`sf agent adl file list`](#sf-agent-adl-file-list)\n- [`sf agent adl get`](#sf-agent-adl-get)\n- [`sf agent adl list`](#sf-agent-adl-list)\n- [`sf agent adl status`](#sf-agent-adl-status)\n- [`sf agent adl update`](#sf-agent-adl-update)\n- [`sf agent adl upload`](#sf-agent-adl-upload)\n- [`sf agent create`](#sf-agent-create)\n- [`sf agent deactivate`](#sf-agent-deactivate)\n- [`sf agent generate agent-spec`](#sf-agent-generate-agent-spec)\n- [`sf agent generate authoring-bundle`](#sf-agent-generate-authoring-bundle)\n- [`sf agent generate template`](#sf-agent-generate-template)\n- [`sf agent generate test-spec`](#sf-agent-generate-test-spec)\n- [`sf agent preview`](#sf-agent-preview)\n- [`sf agent preview end`](#sf-agent-preview-end)\n- [`sf agent preview send`](#sf-agent-preview-send)\n- [`sf agent preview sessions`](#sf-agent-preview-sessions)\n- [`sf agent preview start`](#sf-agent-preview-start)\n- [`sf agent publish authoring-bundle`](#sf-agent-publish-authoring-bundle)\n- [`sf agent test create`](#sf-agent-test-create)\n- [`sf agent test list`](#sf-agent-test-list)\n- [`sf agent test results`](#sf-agent-test-results)\n- [`sf agent test resume`](#sf-agent-test-resume)\n- [`sf agent test run`](#sf-agent-test-run)\n- [`sf agent test run-eval`](#sf-agent-test-run-eval)\n- [`sf agent trace delete`](#sf-agent-trace-delete)\n- [`sf agent trace list`](#sf-agent-trace-list)\n- [`sf agent trace read`](#sf-agent-trace-read)\n- [`sf agent validate authoring-bundle`](#sf-agent-validate-authoring-bundle)\n\n## `sf agent activate`\n\nActivate an agent in an org.\n\n```\nUSAGE\n  $ sf agent activate -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [-n \u003cvalue\u003e] [--version\n    \u003cvalue\u003e]\n\nFLAGS\n  -n, --api-name=\u003cvalue\u003e     API name of the agent to activate; if not specified, the command provides a list that you\n                             choose from.\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variable is already set.\n      --api-version=\u003cvalue\u003e  Override the api version used for api requests made by this command\n      --version=\u003cvalue\u003e      Version number of the agent to activate; if not specified, the command provides a list that\n                             you choose from.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Activate an agent in an org.\n\n  Activating an agent makes it immediately available to your users. A published agent must be active before you can\n  preview it with the \"agent preview\" CLI command or VS Code. Agents can have multiple versions; only one version can be\n  active at a time.\n\n  If you run the command without the --api-name or --version flags, the command provides a list of agent API names and\n  versions for you to choose from. Use the flags to specify the exact agent and version without being prompted. If you\n  use the --json flag and not --version, then the latest agent version is automatically activated.\n\n  The value of the --version flag is always a number, corresponding to the \"vX\" part of the \"BotVersion\" metadata in\n  your project. For example, if you have a force-app/main/default/bots/My_Agent/v4.botVersion-meta.xml file in your\n  project, then you activate this version with the \"--version 4\" flag.\n\nEXAMPLES\n  Activate an agent in your default target org by being prompted for both its API name and version:\n\n    $ sf agent activate\n\n  Activate version 2 of an agent with API name Resort_Manager in the org with alias \"my-org\":\n\n    $ sf agent activate --api-name Resort_Manager --version 2 --target-org my-org\n```\n\n_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/activate.ts)_\n\n## `sf agent adl create`\n\nCreate an Agentforce Data Library.\n\n```\nUSAGE\n  $ sf agent adl create -o \u003cvalue\u003e -n \u003cvalue\u003e --developer-name \u003cvalue\u003e --source-type sfdrive|knowledge|retriever\n    [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [--description \u003cvalue\u003e] [--index-mode basic|enhanced]\n    [--retriever-id \u003cvalue\u003e] [--primary-index-field1 \u003cvalue\u003e] [--primary-index-field2 \u003cvalue\u003e]\n\nFLAGS\n  -n, --name=\u003cvalue\u003e                  (required) Display name for the data library (max 80 characters).\n  -o, --target-org=\u003cvalue\u003e            (required) Username or alias of the target org. Not required if the `target-org`\n                                      configuration variable is already set.\n      --api-version=\u003cvalue\u003e           Override the api version used for api requests made by this command\n      --description=\u003cvalue\u003e           Description of the data library (max 255 characters).\n      --developer-name=\u003cvalue\u003e        (required) API name for the data library (max 80 characters, alphanumeric and\n                                      underscores only, must start with a letter).\n      --index-mode=\u003coption\u003e           Index mode for SFDRIVE libraries: basic or enhanced.\n                                      \u003coptions: basic|enhanced\u003e\n      --primary-index-field1=\u003cvalue\u003e  Primary index field 1 for KNOWLEDGE libraries (required, immutable after\n                                      creation).\n      --primary-index-field2=\u003cvalue\u003e  Primary index field 2 for KNOWLEDGE libraries (required, immutable after\n                                      creation).\n      --retriever-id=\u003cvalue\u003e          ID of an active Custom Retriever (required for RETRIEVER source type; retriever\n                                      must be active).\n      --source-type=\u003coption\u003e          (required) Type of grounding source: sfdrive (file upload), knowledge (Salesforce\n                                      Knowledge articles), or retriever (existing active Custom Retriever).\n                                      \u003coptions: sfdrive|knowledge|retriever\u003e\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Create an Agentforce Data Library.\n\n  Creates a new data library in the target org. The --source-type flag determines the type of library: SFDRIVE (file\n  upload), KNOWLEDGE (Salesforce Knowledge articles), or RETRIEVER (existing active Custom Retriever).\n\nEXAMPLES\n  Create an SFDRIVE library:\n\n    $ sf agent adl create --target-org myOrg --name \"My Docs\" --developer-name My_Docs --source-type sfdrive\n\n  Create a KNOWLEDGE library with index fields:\n\n    $ sf agent adl create --target-org myOrg --name \"KB Library\" --developer-name KB_Library --source-type knowledge \\\n      --primary-index-field1 Title --primary-index-field2 Summary\n\n  Create a RETRIEVER library:\n\n    $ sf agent adl create --target-org myOrg --name \"Existing Retriever\" --developer-name Existing_Retriever \\\n      --source-type retriever --retriever-id 0ppXX0000000001\n```\n\n_See code: [src/commands/agent/adl/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/adl/create.ts)_\n\n## `sf agent adl delete`\n\nDelete an Agentforce Data Library.\n\n```\nUSAGE\n  $ sf agent adl delete -o \u003cvalue\u003e -i \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e]\n\nFLAGS\n  -i, --library-id=\u003cvalue\u003e   (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variable is already set.\n      --api-version=\u003cvalue\u003e  Override the api version used for api requests made by this command\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Delete an Agentforce Data Library.\n\n  Permanently deletes a data library and all associated files and indexing data.\n\nEXAMPLES\n  Delete a data library:\n\n    $ sf agent adl delete --library-id 1JDSG000007IbWX4A0 --target-org myOrg\n```\n\n_See code: [src/commands/agent/adl/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/adl/delete.ts)_\n\n## `sf agent adl file add`\n\nAdd files to an existing Agentforce Data Library.\n\n```\nUSAGE\n  $ sf agent adl file add -o \u003cvalue\u003e -i \u003cvalue\u003e -f \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e]\n\nFLAGS\n  -f, --file=\u003cvalue\u003e         (required) Path to the file to add to the library.\n  -i, --library-id=\u003cvalue\u003e   (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variable is already set.\n      --api-version=\u003cvalue\u003e  Override the api version used for api requests made by this command\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Add files to an existing Agentforce Data Library.\n\n  Adds one or more files to an existing SFDRIVE data library and triggers SearchIndex re-hydration. This is the day-2\n  operation for adding files to an already-provisioned library.\n\n  Constraints: at least 1 file required, no duplicate file names in a batch, maximum 1000 files per library.\n\nEXAMPLES\n  Add a file to an existing library:\n\n    $ sf agent adl file add --library-id 1JDSG000007IbWX4A0 --file ./docs/new-guide.pdf --target-org myOrg\n```\n\n_See code: [src/commands/agent/adl/file/add.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/adl/file/add.ts)_\n\n## `sf agent adl file delete`\n\nDelete a file from an Agentforce Data Library.\n\n```\nUSAGE\n  $ sf agent adl file delete -o \u003cvalue\u003e -i \u003cvalue\u003e --file-id \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version\n  \u003cvalue\u003e]\n\nFLAGS\n  -i, --library-id=\u003cvalue\u003e   (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variable is already set.\n      --api-version=\u003cvalue\u003e  Override the api version used for api requests made by this command\n      --file-id=\u003cvalue\u003e      (required) ID of the file to delete (AiGroundingFileRef record ID).\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Delete a file from an Agentforce Data Library.\n\n  Permanently removes a file from an SFDRIVE data library and triggers re-indexing of the search index.\n\nEXAMPLES\n  Delete a file from a data library:\n\n    $ sf agent adl file delete --library-id 1JDSG000007IbWX4A0 --file-id a1B2C3D4E5F6G7H8I9 --target-org myOrg\n```\n\n_See code: [src/commands/agent/adl/file/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/adl/file/delete.ts)_\n\n## `sf agent adl file list`\n\nList files in an Agentforce Data Library.\n\n```\nUSAGE\n  $ sf agent adl file list -o \u003cvalue\u003e -i \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e]\n\nFLAGS\n  -i, --library-id=\u003cvalue\u003e   (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variable is already set.\n      --api-version=\u003cvalue\u003e  Override the api version used for api requests made by this command\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  List files in an Agentforce Data Library.\n\n  Returns the list of files in an SFDRIVE library including file name, size, and creation date.\n\nEXAMPLES\n  List files in a data library:\n\n    $ sf agent adl file list --library-id 1JDSG000007IbWX4A0 --target-org myOrg\n\n  List files and output as JSON:\n\n    $ sf agent adl file list --library-id 1JDSG000007IbWX4A0 --target-org myOrg --json\n```\n\n_See code: [src/commands/agent/adl/file/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/adl/file/list.ts)_\n\n## `sf agent adl get`\n\nGet details of an Agentforce Data Library.\n\n```\nUSAGE\n  $ sf agent adl get -o \u003cvalue\u003e -i \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e]\n\nFLAGS\n  -i, --library-id=\u003cvalue\u003e   (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variable is already set.\n      --api-version=\u003cvalue\u003e  Override the api version used for api requests made by this command\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Get details of an Agentforce Data Library.\n\n  Returns the full detail of a data library including its grounding source configuration, status, and retriever ID.\n\nEXAMPLES\n  Get details of a data library:\n\n    $ sf agent adl get --library-id 1JDSG000007IbWX4A0 --target-org myOrg\n```\n\n_See code: [src/commands/agent/adl/get.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/adl/get.ts)_\n\n## `sf agent adl list`\n\nList Agentforce Data Libraries in an org.\n\n```\nUSAGE\n  $ sf agent adl list -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e]\n\nFLAGS\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variable is already set.\n      --api-version=\u003cvalue\u003e  Override the api version used for api requests made by this command\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  List Agentforce Data Libraries in an org.\n\n  Returns all data libraries in the target org, including their source type, status, and library ID.\n\nEXAMPLES\n  List all data libraries in the default target org:\n\n    $ sf agent adl list --target-org myOrg\n\n  List data libraries and output as JSON:\n\n    $ sf agent adl list --target-org myOrg --json\n```\n\n_See code: [src/commands/agent/adl/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/adl/list.ts)_\n\n## `sf agent adl status`\n\nGet indexing status of an Agentforce Data Library.\n\n```\nUSAGE\n  $ sf agent adl status -o \u003cvalue\u003e -i \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e]\n\nFLAGS\n  -i, --library-id=\u003cvalue\u003e   (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variable is already set.\n      --api-version=\u003cvalue\u003e  Override the api version used for api requests made by this command\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Get indexing status of an Agentforce Data Library.\n\n  Returns the current indexing status including stage details (DATA_LAKE_OBJECT, SEARCH_INDEX, RETRIEVER) and any\n  errors.\n\nEXAMPLES\n  Get status of a data library:\n\n    $ sf agent adl status --library-id 1JDSG000007IbWX4A0 --target-org myOrg\n```\n\n_See code: [src/commands/agent/adl/status.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/adl/status.ts)_\n\n## `sf agent adl update`\n\nUpdate an Agentforce Data Library.\n\n```\nUSAGE\n  $ sf agent adl update -o \u003cvalue\u003e -i \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [-n \u003cvalue\u003e]\n    [--description \u003cvalue\u003e] [--content-fields \u003cvalue\u003e] [--restrict-to-public-articles]\n\nFLAGS\n  -i, --library-id=\u003cvalue\u003e                (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).\n  -n, --name=\u003cvalue\u003e                      New display name for the data library (max 80 characters).\n  -o, --target-org=\u003cvalue\u003e                (required) Username or alias of the target org. Not required if the\n                                          `target-org` configuration variable is already set.\n      --api-version=\u003cvalue\u003e               Override the api version used for api requests made by this command\n      --content-fields=\u003cvalue\u003e            Comma-separated list of content fields for KNOWLEDGE libraries (triggers\n                                          re-indexing).\n      --description=\u003cvalue\u003e               New description for the data library (max 255 characters).\n      --[no-]restrict-to-public-articles  Restrict to public Knowledge articles only (KNOWLEDGE libraries, triggers\n                                          re-indexing).\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Update an Agentforce Data Library.\n\n  Updates the label, description, or other mutable properties of an existing data library.\n\nEXAMPLES\n  Update the label of a data library:\n\n    $ sf agent adl update --library-id 1JDSG000007IbWX4A0 --name \"New Name\" --target-org myOrg\n\n  Update the description:\n\n    $ sf agent adl update --library-id 1JDSG000007IbWX4A0 --description \"Updated description\" --target-org myOrg\n\n  Update Knowledge library content fields (triggers re-indexing):\n\n    $ sf agent adl update --library-id 1JDSG000007IbWX4A0 --content-fields \"Answer**c,Summary**c\" --target-org myOrg\n\n  Restrict Knowledge library to public articles:\n\n    $ sf agent adl update --library-id 1JDSG000007IbWX4A0 --restrict-to-public-articles --target-org myOrg\n```\n\n_See code: [src/commands/agent/adl/update.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/adl/update.ts)_\n\n## `sf agent adl upload`\n\nUpload a file to an SFDRIVE Agentforce Data Library.\n\n```\nUSAGE\n  $ sf agent adl upload -o \u003cvalue\u003e -i \u003cvalue\u003e -f \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [-w\n    \u003cvalue\u003e]\n\nFLAGS\n  -f, --file=\u003cvalue\u003e         (required) Path to the file to upload.\n  -i, --library-id=\u003cvalue\u003e   (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variable is already set.\n  -w, --wait=\u003cvalue\u003e         Number of minutes to wait for indexing to complete. If not specified, returns after\n                             triggering indexing.\n      --api-version=\u003cvalue\u003e  Override the api version used for api requests made by this command\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Upload a file to an SFDRIVE Agentforce Data Library.\n\n  Performs the multi-step upload workflow: checks upload readiness, obtains a pre-signed S3 URL, uploads the file,\n  triggers indexing, and optionally polls until the library is ready (retrieverId is populated).\n\n  This command only works with SFDRIVE libraries. KNOWLEDGE libraries index automatically after creation, and RETRIEVER\n  libraries require no file upload.\n\nEXAMPLES\n  Upload a file and wait for indexing to complete:\n\n    $ sf agent adl upload --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg --wait 10\n\n  Upload a file without waiting:\n\n    $ sf agent adl upload --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg\n```\n\n_See code: [src/commands/agent/adl/upload.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/adl/upload.ts)_\n\n## `sf agent create`\n\nCreate an agent in your org using a local agent spec file.\n\n```\nUSAGE\n  $ sf agent create -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [--name \u003cvalue\u003e] [--api-name\n    \u003cvalue\u003e] [--spec \u003cvalue\u003e] [--preview]\n\nFLAGS\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variable is already set.\n      --api-name=\u003cvalue\u003e     API name of the new agent; if not specified, the API name is derived from the agent name\n                             (label); the API name must not exist in the org.\n      --api-version=\u003cvalue\u003e  Override the api version used for api requests made by this command\n      --name=\u003cvalue\u003e         Name (label) of the new agent.\n      --preview              Preview the agent without saving it in your org.\n      --spec=\u003cvalue\u003e         Path to an agent spec file.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Create an agent in your org using a local agent spec file.\n\n  NOTE: This command creates an agent that doesn't use Agent Script as its blueprint. We generally don't recommend you\n  use this workflow to create an agent. Rather, use the \"agent generate|validate|publish authoring-bundle\" commands to\n  author agents that use the Agent Script language. See \"Author an Agent\"\n  (https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-nga-author-agent.html) for details.\n\n  To run this command, you must have an agent spec file, which is a YAML file that define the agent properties and\n  contains a list of AI-generated topics. Topics define the range of jobs the agent can handle. Use the \"agent generate\n  agent-spec\" CLI command to generate an agent spec file. Then specify the file to this command using the --spec flag,\n  along with the name (label) of the new agent with the --name flag. If you don't specify any of the required flags, the\n  command prompts you.\n\n  When this command completes, your org contains the new agent, which you can then edit and customize in the Agent\n  Builder UI. The new agent's topics are the same as the ones listed in the agent spec file. The agent might also have\n  some AI-generated actions, or you can add them. This command also retrieves all the metadata files associated with the\n  new agent to your local Salesforce DX project.\n\n  Use the --preview flag to review what the agent looks like without actually saving it in your org. When previewing,\n  the command creates a JSON file in the current directory with all the agent details. The name of the JSON file is the\n  agent's API name and a timestamp.\n\n  To open the new agent in your org's Agent Builder UI, run this command: \"sf org open agent --api-name \u003capi-name\u003e\".\n\nEXAMPLES\n  Create an agent by being prompted for the required information, such as the agent spec file and agent name, and then\n  create it in your default org:\n\n    $ sf agent create\n\n  Create an agent by specifying the agent name, API name, and spec file with flags; use the org with alias \"my-org\";\n  the command fails if the API name is already being used in your org:\n\n    $ sf agent create --name \"Resort Manager\" --api-name Resort_Manager --spec specs/resortManagerAgent.yaml \\\n      --target-org my-org\n\n  Preview the creation of an agent named \"Resort Manager\" and use your default org:\n\n    $ sf agent create --name \"Resort Manager\" --spec specs/resortManagerAgent.yaml --preview\n```\n\n_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/create.ts)_\n\n## `sf agent deactivate`\n\nDeactivate an agent in an org.\n\n```\nUSAGE\n  $ sf agent deactivate -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [-n \u003cvalue\u003e]\n\nFLAGS\n  -n, --api-name=\u003cvalue\u003e     API name of the agent to deactivate; if not specified, the command provides a list that you\n                             choose from.\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variable is already set.\n      --api-version=\u003cvalue\u003e  Override the api version used for api requests made by this command\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Deactivate an agent in an org.\n\n  Deactivating an agent makes it unavailable to your users. To make changes to an agent, such as adding or removing\n  topics or actions, you must deactivate it. You can't preview an agent with the \"agent preview\" CLI command or VS Code\n  if it's deactivated.\n\n  If you run the command without the --api-name flag, the command provides a list of agent API names for you to choose\n  from. Use the flag to specify the exact agent without being prompted.\n\nEXAMPLES\n  Deactivate an agent in your default target org by being prompted:\n\n    $ sf agent deactivate\n\n  Deactivate the agent Resort_Manager in the org with alias \"my_org\":\n\n    $ sf agent deactivate --api-name Resort_Manager --target-org my-org\n```\n\n_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/deactivate.ts)_\n\n## `sf agent generate agent-spec`\n\nGenerate an agent spec, which is a YAML file that captures what an agent can do.\n\n```\nUSAGE\n  $ sf agent generate agent-spec -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [--type customer|internal]\n    [--role \u003cvalue\u003e] [--company-name \u003cvalue\u003e] [--company-description \u003cvalue\u003e] [--company-website \u003cvalue\u003e] [--max-topics\n    \u003cvalue\u003e] [--agent-user \u003cvalue\u003e] [--enrich-logs true|false] [--tone formal|casual|neutral] [--spec \u003cvalue\u003e]\n    [--output-file \u003cvalue\u003e] [--full-interview] [--grounding-context \u003cvalue\u003e --prompt-template \u003cvalue\u003e]\n    [--force-overwrite]\n\nFLAGS\n  -o, --target-org=\u003cvalue\u003e           (required) Username or alias of the target org. Not required if the `target-org`\n                                     configuration variable is already set.\n      --agent-user=\u003cvalue\u003e           Username of a user in your org to assign to your agent; determines what your agent\n                                     can access and do.\n      --api-version=\u003cvalue\u003e          Override the api version used for api requests made by this command\n      --company-description=\u003cvalue\u003e  Description of your company.\n      --company-name=\u003cvalue\u003e         Name of your company.\n      --company-website=\u003cvalue\u003e      Website URL of your company.\n      --enrich-logs=\u003coption\u003e         Adds agent conversation data to event logs so you can view all agent session\n                                     activity in one place.\n                                     \u003coptions: true|false\u003e\n      --force-overwrite              Don't prompt the user to confirm that an existing spec file will be overwritten.\n      --full-interview               Prompt for both required and optional flags.\n      --grounding-context=\u003cvalue\u003e    Context information and personalization that's added to your prompts when using a\n                                     custom prompt template.\n      --max-topics=\u003cvalue\u003e           Maximum number of topics to generate in the agent spec; default is 5.\n      --output-file=\u003cvalue\u003e          [default: specs/agentSpec.yaml] Path for the generated YAML agent spec file; can be\n                                     an absolute or relative path.\n      --prompt-template=\u003cvalue\u003e      API name of a customized prompt template to use instead of the default prompt\n                                     template.\n      --role=\u003cvalue\u003e                 Role of the agent.\n      --spec=\u003cvalue\u003e                 Agent spec file, in YAML format, to use as input to the command.\n      --tone=\u003coption\u003e                Conversational style of the agent, such as how it expresses your brand personality\n                                     in its messages through word choice, punctuation, and sentence structure.\n                                     \u003coptions: formal|casual|neutral\u003e\n      --type=\u003coption\u003e                Type of agent to create. Internal types are copilots used internally by your\n                                     company and customer types are the agents you create for your customers.\n                                     \u003coptions: customer|internal\u003e\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Generate an agent spec, which is a YAML file that captures what an agent can do.\n\n  An agent spec is a YAML-formatted file that contains basic information about the agent, such as its role, company\n  description, and an AI-generated list of topics based on this information. Topics define the range of jobs your agent\n  can handle.\n\n  Use flags, such as --role and --company-description, to provide details about your company and the role that the agent\n  plays in your company. If you prefer, you can also be prompted for the basic information; use --full-interview to be\n  prompted for all required and optional properties. Upon command execution, the large language model (LLM) associated\n  with your org uses the provided information to generate a list of topics for the agent. Because the LLM uses the\n  company and role information to generate the topics, we recommend that you provide accurate, complete, and specific\n  details so the LLM generates the best and most relevant topics. Once generated, you can edit the spec file; for\n  example, you can remove topics that don't apply or change a topic's description.\n\n  You can also iterate the spec generation process by using the --spec flag to pass an existing agent spec file to this\n  command, and then using the --role, --company-description, etc, flags to refine your agent properties. Iteratively\n  improving the description of your agent allows the LLM to generate progressively better topics.\n\n  You can also specify other agent properties, such as a custom prompt template, how to ground the prompt template to\n  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\n  agent.\n\n  When your agent spec is ready, generate an authoring bundle from it by passing the spec file to the --spec flag of the\n  \"agent generate authoring-bundle\" CLI command. An authoring bundle is a metadata type that contains an Agent Script\n  file, which is the blueprint for an agent. (While not recommended, you can also use the agent spec file to immediately\n  create an agent with the \"agent create\" command. We don't recommend this workflow because these types of agents don't\n  use Agent Script, and are thus less flexible and more difficult to maintain.)\n\nEXAMPLES\n  Generate an agent spec in the default location and use flags to specify the agent properties, such as its role and\n  your company details; use your default org:\n\n    $ sf agent generate agent-spec --type customer --role \"Field customer complaints and manage employee schedules.\" \\\n      --company-name \"Coral Cloud Resorts\" --company-description \"Provide customers with exceptional destination \\\n      activities, unforgettable experiences, and reservation services.\"\n\n  Generate an agent spec by being prompted for the required agent properties and generate a maxiumum of 5 topics;\n  write the generated file to the \"specs/resortManagerSpec.yaml\" file and use the org with alias \"my-org\":\n\n    $ sf agent generate agent-spec --max-topics 5 --output-file specs/resortManagerAgent.yaml --target-org my-org\n\n  Be prompted for all required and optional agent properties; use your default org:\n\n    $ sf agent generate agent-spec --full-interview\n\n  Specify an existing agent spec file called \"specs/resortManagerAgent.yaml\", and then overwrite it with a new version\n  that contains newly AI-generated topics based on the updated role information passed in with the --role flag:\n\n    $ sf agent generate agent-spec --spec specs/resortManagerAgent.yaml --output-file specs/resortManagerAgent.yaml \\\n      --role \"Field customer complaints, manage employee schedules, and ensure all resort operations are running \\\n      smoothly\"\n\n  Specify that the conversational tone of the agent is formal and to attach the \"resortmanager@myorg.com\" username to\n  it; be prompted for the required properties and use your default org:\n\n    $ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com\n```\n\n_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/generate/agent-spec.ts)_\n\n## `sf agent generate authoring-bundle`\n\nGenerate an authoring bundle from an existing agent spec YAML file.\n\n```\nUSAGE\n  $ sf agent generate authoring-bundle -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-name \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [-f\n    \u003cvalue\u003e] [--no-spec] [-d \u003cvalue\u003e] [-n \u003cvalue\u003e] [--force-overwrite]\n\nFLAGS\n  -d, --output-dir=\u003cvalue\u003e   Directory where the authoring bundle files are generated.\n  -f, --spec=\u003cvalue\u003e         Path to the agent spec YAML file. If you don't specify the flag, the command provides a\n                             list that you can choose from. Use the --no-spec flag to skip using an agent spec entirely.\n  -n, --name=\u003cvalue\u003e         Name (label) of the authoring bundle; if not specified, you're prompted for the name.\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variable is already set.\n      --api-name=\u003cvalue\u003e     API name of the new authoring bundle; if not specified, the API name is derived from the\n                             authoring bundle name (label); the API name can't exist in the org.\n      --api-version=\u003cvalue\u003e  Override the api version used for api requests made by this command\n      --force-overwrite      Overwrite the existing authoring bundle if one with the same API name already exists\n                             locally.\n      --no-spec              Skip prompting for an agent spec and use the default Agent Script boilerplate in the\n                             generated authoring bundle.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Generate an authoring bundle from an existing agent spec YAML file.\n\n  Authoring bundles are metadata components that contain an agent's Agent Script file. The Agent Script file is the\n  agent's blueprint; it fully describes what the agent can do using the Agent Script language.\n\n  Use this command to generate a new authoring bundle based on an agent spec YAML file, which you create with the \"agent\n  generate agent-spec\" command. The agent spec YAML file is a high-level description of the agent; it describes its\n  essence rather than exactly what it can do. The resulting Agent Script file is customized to reflect what's in the\n  agent spec file. You can also create an authoring bundle without an agent spec file by specifying the \"--no-spec\"\n  flag; in this case, the resulting Agent Script file is just the default boilerplate.\n\n  The metadata type for authoring bundles is aiAuthoringBundle, which consist of a standard\n  \"\u003cbundle-api-name\u003e.bundle-meta.xml\" metadata file and the Agent Script file (with extension \".agent\"). When you run\n  this command, the new authoring bundle is generated in the force-app/main/default/aiAuthoringBundles/\u003cbundle-api-name\u003e\n  directory. Use the --output-dir flag to generate them elsewhere.\n\n  After you generate the initial authoring bundle, code the Agent Script file so your agent behaves exactly as you want.\n  The Agent Script file generated by this command is just a first draft of your agent! Interactively test the agent by\n  conversing with it using the \"agent preview\" command. Then publish the agent to your org with the \"agent publish\n  authoring-bundle\" command.\n\n  This command requires an org because it uses it to access an LLM for generating the Agent Script file.\n\nEXAMPLES\n  Generate an authoring bundle by being prompted for all required values, such as the agent spec YAML file, the bundle\n  name, and the API name; use your default org:\n\n    $ sf agent generate authoring-bundle\n\n  Generate an authoring bundle without using an agent spec file; give the bundle the label \"My Authoring Bundle\" and\n  use your default org:\n\n    $ sf agent generate authoring-bundle --no-spec --name \"My Authoring Bundle\"\n\n  Generate an authoring bundle from the \"specs/agentSpec.yaml\" agent spec YAML file and give it the label \"My\n  Authoring Bundle\"; use your default org:\n\n    $ sf agent generate authoring-bundle --spec specs/agentSpec.yaml --name \"My Authoring Bundle\"\n\n  Similar to previous example, but generate the authoring bundle files in the \"other-package-dir/main/default\" package\n  directory; use the org with alias \"my-dev-org\":\n\n    $ sf agent generate authoring-bundle --spec specs/agentSpec.yaml --name \"My Authoring Bundle\" --output-dir \\\n      other-package-dir/main/default --target-org my-dev-org\n```\n\n_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/generate/authoring-bundle.ts)_\n\n## `sf agent generate template`\n\nGenerate an agent template from an existing agent in your DX project so you can then package the template in a second-generation managed package.\n\n```\nUSAGE\n  $ sf agent generate template -s \u003cvalue\u003e --agent-version \u003cvalue\u003e -f \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version\n    \u003cvalue\u003e] [-r \u003cvalue\u003e]\n\nFLAGS\n  -f, --agent-file=\u003cvalue\u003e     (required) Path to an agent (Bot) metadata file.\n  -r, --output-dir=\u003cvalue\u003e     Directory where the generated BotTemplate and GenAiPlannerBundle files are saved.\n  -s, --source-org=\u003cvalue\u003e     (required) Username or alias of the namespaced scratch org that contains the agent which\n                               this template is based on.\n      --agent-version=\u003cvalue\u003e  (required) Version of the agent (BotVersion).\n      --api-version=\u003cvalue\u003e    Override the api version used for api requests made by this command\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Generate an agent template from an existing agent in your DX project so you can then package the template in a\n  second-generation managed package.\n\n  WARNING: This command doesn't work for agents that were created from an Agent Script file. In other words, you can't\n  currently package an agent template for agents that use Agent Script.\n\n  At a high-level, agents are defined by the Bot, BotVersion, and GenAiPlannerBundle metadata types. The\n  GenAiPlannerBundle type in turn defines the agent's topics and actions. This command uses the metadata files for these\n  three types, located in your local DX project, to generate a BotTemplate metadata file for a specific agent (Bot). You\n  then use the BotTemplate metadata file, along with the GenAiPlannerBundle metadata file that references the\n  BotTemplate, to package the template in a managed package that you can share between orgs or on AppExchange.\n\n  Use the --agent-file flag to specify the relative or full pathname of the Bot metadata file, such as\n  force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml. A single Bot can have multiple\n  BotVersions, so use the --agent-version flag to specify the version. The corresponding BotVersion metadata file must\n  exist locally. For example, if you specify \"--agent-version 4\", then the file\n  force-app/main/default/bots/My_Awesome_Agent/v4.botVersion-meta.xml must exist.\n\n  The new BotTemplate metadata file is generated in the \"botTemplates\" directory in the output directory specified with\n  the --output-dir flag, and has the name \u003cAgent_API_name\u003e\\_v\u003cVersion\u003e\\_Template.botTemplate-meta.xml, such as\n  my-package/botTemplates/My_Awesome_Agent_v4_Template.botTemplate-meta.xml. The command displays the full pathname of\n  the generated files when it completes.\n\n  See \"Develop and Package Agent Templates Using Scratch Orgs\"\n  (https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/dev2gp_package_agent_templates.htm) for\n  details about the complete process, which includes using a scratch org to create and test the agent, retrieving the\n  agent metadata to your DX project, running this command to create the agent template, and then packaging the template.\n\nEXAMPLES\n  Generate an agent template from the My_Awesome_Agent Bot metadata file in your DX project and save the BotTemplate\n  and GenAiPlannerBundle to the specified directory; use version 1 of the agent. The agent that the template is based\n  on is in the org with alias \"my-scratch-org\":\n\n    $ sf agent generate template --agent-file \\\n      force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1 --output-dir \\\n      my-package --source-org my-scratch-org\n```\n\n_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/generate/template.ts)_\n\n## `sf agent generate test-spec`\n\nGenerate an agent test spec, which is a YAML file that lists the test cases for testing a specific agent.\n\n```\nUSAGE\n  $ sf agent generate test-spec [--flags-dir \u003cvalue\u003e] [-d \u003cvalue\u003e] [--force-overwrite] [-f \u003cvalue\u003e]\n\nFLAGS\n  -d, --from-definition=\u003cvalue\u003e  Filepath to the AIEvaluationDefinition metadata XML file in your DX project that you\n                                 want to convert to a test spec YAML file.\n  -f, --output-file=\u003cvalue\u003e      Name of the generated test spec YAML file. Default value is\n                                 \"specs/\u003cAGENT_API_NAME\u003e-testSpec.yaml\".\n      --force-overwrite          Don't prompt for confirmation when overwriting an existing test spec YAML file.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n\nDESCRIPTION\n  Generate an agent test spec, which is a YAML file that lists the test cases for testing a specific agent.\n\n  The first step when using Salesforce CLI to create an agent test in your org is to use this interactive command to\n  generate a local YAML-formatted test spec file. The test spec YAML file contains information about the agent being\n  tested, such as its API name, and then one or more test cases. This command uses the metadata components in your DX\n  project when prompting for information, such as the agent API name; it doesn't look in your org.\n\n  To generate a specific agent test case, this command prompts you for this information; when possible, the command\n  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\n  conversation history.\n\n  You can manually add contextVariables to test cases in the generated YAML file to inject contextual data (such as\n  CaseId or RoutableId) into agent sessions. This is useful for testing agent behavior with different contextual\n  information.\n\n  When your test spec is ready, you then run the \"agent test create\" command to actually create the test in your org and\n  synchronize the metadata with your DX project. The metadata type for an agent test is AiEvaluationDefinition.\n\n  If you have an existing AiEvaluationDefinition metadata XML file in your DX project, you can generate its equivalent\n  YAML test spec file with the --from-definition flag.\n\nEXAMPLES\n  Generate an agent test spec YAML file interactively:\n\n    $ sf agent generate test-spec\n\n  Generate an agent test spec YAML file and specify a name for the new file; if the file exists, overwrite it without\n  confirmation:\n\n    $ sf agent generate test-spec --output-file specs/Resort_Manager-new-version-testSpec.yaml --force-overwrite\n\n  Generate an agent test spec YAML file from an existing AiEvaluationDefinition metadata XML file in your DX project:\n\n    $ sf agent generate test-spec --from-definition \\\n      force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml\n```\n\n_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/generate/test-spec.ts)_\n\n## `sf agent preview`\n\nInteract with an agent to preview how it responds to your statements, questions, and commands (utterances).\n\n```\nUSAGE\n  $ sf agent preview -o \u003cvalue\u003e [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [-n \u003cvalue\u003e] [--authoring-bundle\n    \u003cvalue\u003e] [-d \u003cvalue\u003e] [-x] [--use-live-actions]\n\nFLAGS\n  -d, --output-dir=\u003cvalue\u003e        Directory where conversation transcripts are saved.\n  -n, --api-name=\u003cvalue\u003e          API name of the activated published agent you want to interact with.\n  -o, --target-org=\u003cvalue\u003e        (required) Username or alias of the target org. Not required if the `target-org`\n                                  configuration variable is already set.\n  -x, --apex-debug                Enable Apex debug logging during the agent preview conversation.\n      --api-version=\u003cvalue\u003e       Override the api version used for api requests made by this command\n      --authoring-bundle=\u003cvalue\u003e  API name of the authoring bundle metadata component that contains the agent's Agent\n                                  Script file.\n      --use-live-actions          Use real actions in the org; if not specified, preview uses AI to simulate (mock)\n                                  actions.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n\nDESCRIPTION\n  Interact with an agent to preview how it responds to your statements, questions, and commands (utterances).\n\n  Use this command to have a natural language conversation with an agent, either while you code its local Agent Script\n  file or when it's published to an org. Previewing an agent acts like an initial test to make sure it responds to your\n  utterances as you expect. For example, you can test that the agent uses a particular topic when asked a question, and\n  then whether it invokes the correct action associated with that topic. This command is the CLI-equivalent of the\n  Preview panel in your org's Agentforce Builder UI.\n\n  Run without flags, this command provides a list of agents to preview, divided into two categories: \"Agent Script\",\n  which are agents that have a local authoring bundle in your DX project, or \"Published\", which are agents that are\n  published and activated in your org. Authoring bundles contain an agent's Agent Script file. You then choose the agent\n  you want to preview from the list. Or you can use the --authoring-bundle flag to specify a local authoring bundle's\n  API name or --api-name to specify an activated published agent.\n\n  When previewing an agent from its Agent Script file, you can use these two modes:\n\n  - Simulated mode (Default): Uses only the Agent Script file to converse, and it simulates (mocks) all the actions. Use\n  this mode if none of the Apex classes, flows, or prompt templates that implement your actions are available yet. The\n  LLM uses the information about topics in the Agent Script file to simulate what the action does or how it responds.\n  - Live mode: Uses the actual Apex classes, flows, and prompt templates in your development org in the agent preview.\n  If you've changed the Apex classe, flows, or prompt templates in your local DX project, then you must deploy them to\n  your development org if you want to use them in your live preview.\n\n  You can use the Apex Replay Debugger to debug your Apex classes when using live mode for Agent Script files and for\n  activated published agents; specify the --apex-debug flag.\n\n  Once connected to your agent, the preview interface is simple: in the \"Start typing...\" prompt, enter a statement,\n  question, or command; when you're done, enter Return. Your utterance is posted on the right along with a timestamp.\n  The agent then responds on the left. To exit the conversation, hit ESC or Control+C.\n\n  When the session concludes, the command asks if you want to save the API responses and chat transcripts. By default,\n  the files are saved to the \"./temp/agent-preview\" directory. Specify a new default directory with the --output-dir\n  flag.\n\nEXAMPLES\n  Preview an agent by choosing from the list of available local Agent Script or published agents. If previewing a\n  local Agent Script agent, use simulated mode. Use the org with alias \"my-dev-org\".\n\n    $ sf agent preview --target-org my-dev-org\n\n  Preview an agent in live mode by choosing from a list of authoring bundles. Save the conversation transcripts to the\n  \"./transcripts/my-preview\" directory, enable the Apex debug logs, and use your default org:\n\n    $ sf agent preview --use-live-actions --apex-debug --output-dir transcripts/my-preview\n```\n\n_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/preview.ts)_\n\n## `sf agent preview end`\n\nEnd an existing programmatic agent preview session and get trace location.\n\n```\nUSAGE\n  $ sf agent preview end -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [--session-id \u003cvalue\u003e |\n    --all] [-n \u003cvalue\u003e | --authoring-bundle \u003cvalue\u003e] [-p]\n\nFLAGS\n  -n, --api-name=\u003cvalue\u003e          API name of the activated published agent you want to preview.\n  -o, --target-org=\u003cvalue\u003e        (required) Username or alias of the target org. Not required if the `target-org`\n                                  configuration variable is already set.\n  -p, --no-prompt                 Don't prompt for confirmation before ending sessions. Has an effect only when used\n                                  with --all.\n      --all                       End all active preview sessions. Combine with --api-name or --authoring-bundle to\n                                  limit to a specific agent, or use with only --target-org to end sessions for all\n                                  agents found in the local session cache. Requires --target-org.\n      --api-version=\u003cvalue\u003e       Override the api version used for api requests made by this command\n      --authoring-bundle=\u003cvalue\u003e  API name of the authoring bundle metadata component that contains the agent's Agent\n                                  Script file.\n      --session-id=\u003cvalue\u003e        Session ID outputted by \"agent preview start\". Not required when the agent has exactly\n                                  one active session. Run \"agent preview sessions\" to see the list of all sessions.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  End an existing programmatic agent preview session and get trace location.\n\n  You must have previously started a programmatic agent preview session with the \"agent preview start\" command to then\n  use this command to end it. This command also displays the local directory where the session trace files are stored.\n\n  The original \"agent preview start\" command outputs a session ID which you then use with the --session-id flag of this\n  command to end the session. You don't have to specify the --session-id flag if an agent has only one active preview\n  session. You must also use either the --authoring-bundle or --api-name flag to specify the API name of the authoring\n  bundle or the published agent, respectively. To find either API name, navigate to your package directory in your DX\n  project. The API name of an authoring bundle is the same as its directory name under the \"aiAuthoringBundles\" metadata\n  directory. Similarly, the published agent's API name is the same as its directory name under the \"Bots\" metadata\n  directory.\n\n  Use the --all flag to end all active preview sessions at once. You can combine --all with --api-name or\n  --authoring-bundle to end only sessions for a specific agent, or use --all on its own to end every session across all\n  agents in the project.\n\nEXAMPLES\n  End a preview session of a published agent by specifying its session ID and API name; use the default org:\n\n    $ sf agent preview end --session-id \u003cSESSION_ID\u003e --api-name My_Published_Agent\n\n  Similar to previous example, but don't specify a session ID; you get an error if the published agent has more than\n  one active session. Use the org with alias \"my-dev-org\":\n\n    $ sf agent preview end --api-name My_Published_Agent --target-org my-dev-org\n\n  End a preview session of an agent using its authoring bundle API name; you get an error if the agent has more than\n  one active session.\n\n    $ sf agent preview end --authoring-bundle My_Local_Agent\n\n  End all active preview sessions for a specific agent without prompting:\n\n    $ sf agent preview end --all --authoring-bundle My_Local_Agent --target-org \u003ctarget_org\u003e --no-prompt\n\n  End all active preview sessions across every agent in the local session cache for an org:\n\n    $ sf agent preview end --all --target-org \u003ctarget_org\u003e\n```\n\n_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/preview/end.ts)_\n\n## `sf agent preview send`\n\nSend a message to an existing agent preview session.\n\n```\nUSAGE\n  $ sf agent preview send -o \u003cvalue\u003e -u \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [--session-id\n    \u003cvalue\u003e] [-n \u003cvalue\u003e] [--authoring-bundle \u003cvalue\u003e]\n\nFLAGS\n  -n, --api-name=\u003cvalue\u003e          API name of the activated published agent you want to preview.\n  -o, --target-org=\u003cvalue\u003e        (required) Username or alias of the target org. Not required if the `target-org`\n                                  configuration variable is already set.\n  -u, --utterance=\u003cvalue\u003e         (required) Utterance to send to the agent, enclosed in double quotes.\n      --api-version=\u003cvalue\u003e       Override the api version used for api requests made by this command\n      --authoring-bundle=\u003cvalue\u003e  API name of the authoring bundle metadata component that contains the agent's Agent\n                                  Script file.\n      --session-id=\u003cvalue\u003e        Session ID outputted by \"agent preview start\". Not required when the agent has exactly\n                                  one active session. Run \"agent preview sessions\" to see list of all sessions.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Send a message to an existing agent preview session.\n\n  You must have previously started a programmatic agent preview session with the \"agent preview start\" command to then\n  use this command to send the agent a message (utterance). This command then displays the agent's response.\n\n  The original \"agent preview start\" command outputs a session ID which you then use with the --session-id flag of this\n  command to send a message. You don't have to specify the --session-id flag if an agent has only one active preview\n  session. You must also use either the --authoring-bundle or --api-name flag to specify the API name of the authoring\n  bundle or the published agent, respecitvely. To find either API name, navigate to your package directory in your DX\n  project. The API name of an authoring bundle is the same as its directory name under the \"aiAuthoringBundles\" metadata\n  directory. Similarly, the published agent's API name is the same as its directory name under the \"Bots\" metadata\n  directory.\n\nEXAMPLES\n  Send a message to an activated published agent using its API name and session ID; use the default org:\n\n    $ sf agent preview send --utterance \"What can you help me with?\" --api-name My_Published_Agent --session-id \\\n      \u003cSESSION_ID\u003e\n\n  Similar to previous example, but don't specify a session ID; you get an error if the agent has more than one active\n  session. Use the org with alias \"my-dev-org\":\n\n    $ sf agent preview send --utterance \"What can you help me with?\" --api-name My_Published_Agent --target-org \\\n      my-dev-org\n\n  Send a message to an agent using its authoring bundle API name; you get an error if the agent has more than one\n  active session:\n\n    $ sf agent preview send --utterance \"what can you help me with?\" --authoring-bundle My_Local_Agent\n```\n\n_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/preview/send.ts)_\n\n## `sf agent preview sessions`\n\nList all known programmatic agent preview sessions.\n\n```\nUSAGE\n  $ sf agent preview sessions [--json] [--flags-dir \u003cvalue\u003e]\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  List all known programmatic agent preview sessions.\n\n  This command lists the agent preview sessions that were started with the \"agent preview start\" command and are still\n  in the local cache. Use this command to discover specific session IDs that you can pass to the \"agent preview send\" or\n  \"agent preview end\" commands with the --session-id flag.\n\n  Programmatic agent preview sessions can be started for both published activated agents and by using an agent's local\n  authoring bundle, which contains its Agent Script file. In this command's output table, the Agent column contains\n  either the API name of the authoring bundle or the published agent, whichever was used when starting the session. In\n  the table, if the same API name has multiple rows with different session IDs, then it means that you previously\n  started multiple preview sessions with the associated agent.\n\nEXAMPLES\n  List all cached agent preview sessions:\n\n    $ sf agent preview sessions\n```\n\n_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/preview/sessions.ts)_\n\n## `sf agent preview start`\n\nStart a programmatic agent preview session.\n\n```\nUSAGE\n  $ sf agent preview start -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [-n \u003cvalue\u003e]\n    [--authoring-bundle \u003cvalue\u003e] [--use-live-actions | --simulate-actions]\n\nFLAGS\n  -n, --api-name=\u003cvalue\u003e          API name of the activated published agent you want to preview.\n  -o, --target-org=\u003cvalue\u003e        (required) Username or alias of the target org. Not required if the `target-org`\n                                  configuration variable is already set.\n      --api-version=\u003cvalue\u003e       Override the api version used for api requests made by this command\n      --authoring-bundle=\u003cvalue\u003e  API name of the authoring bundle metadata component that contains the agent's Agent\n                                  Script file.\n      --simulate-actions          Use AI to simulate action execution instead of calling real actions. Required with\n                                  --authoring-bundle.\n      --use-live-actions          Execute real actions in the org (Apex classes, flows, etc.). Required with\n                                  --authoring-bundle.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Start a programmatic agent preview session.\n\n  This command outputs a session ID that you then use with the \"agent preview send\" command to send an utterance to the\n  agent. Use the \"agent preview sessions\" command to list all active sessions and the \"agent preview end\" command to end\n  a specific session.\n\n  Identify the agent you want to start previewing with either the --authoring-bundle flag to specify a local authoring\n  bundle's API name or --api-name to specify an activated published agent's API name. To find either API name, navigate\n  to your package directory in your DX project. The API name of an authoring bundle is the same as its directory name\n  under the \"aiAuthoringBundles\" metadata directory. Similarly, the published agent's API name is the same as its\n  directory name under the \"Bots\" metadata directory.\n\n  When starting a preview session with --authoring-bundle, you must explicitly specify the execution mode using one of\n  these flags:\n\n  - --use-live-actions: Executes real Apex classes, flows, and other actions in the org. This surfaces compile and\n  validation errors during preview.\n  - --simulate-actions: Uses AI to simulate action execution without calling real implementations.\n\n  Published agents (--api-name) always use live actions. The mode flags are optional and have no effect for published\n  agents.\n\nEXAMPLES\n  Start a programmatic agent preview session by specifying an authoring bundle; use simulated actions. Use the org\n  with alias \"my-dev-org\":\n\n    $ sf agent preview start --authoring-bundle My_Agent_Bundle --target-org my-dev-org --simulate-actions\n\n  Similar to previous example but use live actions and the default org:\n\n    $ sf agent preview start --authoring-bundle My_Agent_Bundle --use-live-actions\n\n  Start a preview session with an activated published agent (always uses live actions):\n\n    $ sf agent preview start --api-name My_Published_Agent\n```\n\n_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/preview/start.ts)_\n\n## `sf agent publish authoring-bundle`\n\nPublish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.\n\n```\nUSAGE\n  $ sf agent publish authoring-bundle -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [-n \u003cvalue\u003e]\n    [--skip-retrieve] [-v | --concise]\n\nFLAGS\n  -n, --api-name=\u003cvalue\u003e     API name of the authoring bundle you want to publish; if not specified, the command\n                             provides a list that you can choose from.\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variable is already set.\n  -v, --verbose              Display detailed output showing all metadata components retrieved and deployed during the\n                             publish process.\n      --api-version=\u003cvalue\u003e  Override the api version used for api requests made by this command\n      --concise              Display minimal output with only essential information about the publish operation.\n      --skip-retrieve        Don't retrieve the metadata associated with the agent to your DX project.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.\n\n  An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The\n  metadata type contains two files: the standard metatada XML file and an Agent Script file (extension \".agent\") that\n  fully describes the agent using the Agent Script language.\n\n  When you publish an authoring bundle to your org, a number of things happen. First, this command validates that the\n  Agent Script file successfully compiles. If there are compilation errors, the command exits and you must fix the Agent\n  Script file to continue. Once the Agent Script file compiles, then it's published to the org, which in turn creates\n  new associated metadata (Bot, BotVersion, GenAiX), or new versions of the metadata if the agent already exists. The\n  new or updated metadata is retrieved back to your DX project; specify the --skip-retrieve flag to skip this step.\n  Finally, the authoring bundle metadata (AiAuthoringBundle) is deployed to your org.\n\n  This command uses the API name of the authoring bundle.\n\nEXAMPLES\n  Publish an authoring bundle by being prompted for its API name; use your default org:\n\n    $ sf agent publish authoring-bundle\n\n  Publish an authoring bundle with API name MyAuthoringBundle to the org with alias \"my-dev-org\":\n\n    $ sf agent publish authoring-bundle --api-name MyAuthoringbundle --target-org my-dev-org\n\n  Publish with verbose output to see all retrieved and deployed metadata components:\n\n    $ sf agent publish authoring-bundle --api-name MyAuthoringbundle --verbose\n\n  Publish with concise output showing only essential information:\n\n    $ sf agent publish authoring-bundle --api-name MyAuthoringbundle --concise\n```\n\n_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/publish/authoring-bundle.ts)_\n\n## `sf agent test create`\n\nCreate an agent test in your org using a local test spec YAML file.\n\n```\nUSAGE\n  $ sf agent test create -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-name \u003cvalue\u003e] [--spec \u003cvalue\u003e] [--api-version\n    \u003cvalue\u003e] [--preview] [--force-overwrite] [--test-runner agentforce-studio|testing-center]\n\nFLAGS\n  -o, --target-org=\u003cvalue\u003e    (required) Username or alias of the target org. Not required if the `target-org`\n                              configuration variable is already set.\n      --api-name=\u003cvalue\u003e      API name of the new test; the API name must not exist in the org.\n      --api-version=\u003cvalue\u003e   Override the api version used for api requests made by this command\n      --force-overwrite       Don't prompt for confirmation when overwriting an existing test (based on API name) in\n                              your org.\n      --preview               Preview the test metadata file without deploying to your org.\n      --spec=\u003cvalue\u003e          Path to the test spec YAML file.\n      --test-runner=\u003coption\u003e  Explicitly specify which test runner to use (agentforce-studio or testing-center).\n                              \u003coptions: agentforce-studio|testing-center\u003e\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Create an agent test in your org using a local test spec YAML file.\n\n  To run this command, you must have an agent test spec file, which is a YAML file that lists the test cases for testing\n  a specific agent. Use the \"agent generate test-spec\" CLI command to generate a test spec file. Then specify the file\n  to this command with the --spec flag, or run this command with no flags to be prompted.\n\n  When this command completes, your org contains the new agent test, which you can view and edit using the Testing\n  Center UI (legacy) or Agentforce Studio (NGT). This command also retrieves the metadata component associated with the\n  new test to your local Salesforce DX project and displays its filename. By default, the legacy AiEvaluationDefinition\n  is created; use --test-runner agentforce-studio to author an AiTestingDefinition (NGT) instead.\n\n  After you've created the test in the org, use the \"agent test run\" command to run it.\n\nEXAMPLES\n  Create an agent test interactively and be prompted for the test spec and API name of the test in the org; use the\n  default org:\n\n    $ sf agent test create\n\n  Create an agent test and use flags to specify all required information; if a test with same API name already exists\n  in the org, overwrite it without confirmation. Use the org with alias \"my-org\":\n\n    $ sf agent test create --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test \\\n      --force-overwrite --target-org my-org\n\n  Preview what the agent test metadata (AiEvaluationDefinition) looks like without deploying it to your default org:\n\n    $ sf agent test create --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview\n\n  Author an Agentforce Studio (NGT) test from an NGT-shaped YAML; writes an AiTestingDefinition metadata file:\n\n    $ sf agent test create --spec specs/ReturnsCheckout.ngt.yaml --api-name Returns_Checkout --test-runner \\\n      agentforce-studio --target-org my-org\n\nFLAG DESCRIPTIONS\n  --test-runner=agentforce-studio|testing-center\n\n    Explicitly specify which test runner to use (agentforce-studio or testing-center).\n\n    By default, the command automatically detects which test runner to use based on the test definition metadata type in\n    your org. Use this flag to explicitly specify the runner type. 'agentforce-studio' uses AiTestingDefinition\n    metadata. 'testing-center' uses AiEvaluationDefinition metadata.\n```\n\n_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/test/create.ts)_\n\n## `sf agent test list`\n\nList the available agent tests in your org.\n\n```\nUSAGE\n  $ sf agent test list -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e]\n\nFLAGS\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variable is already set.\n      --api-version=\u003cvalue\u003e  Override the api version used for api requests made by this command\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  List the available agent tests in your org.\n\n  The command outputs a table with the name (API name) of each test along with its unique ID, type ('agentforce-studio'\n  or 'testing-center'), and the date it was created in the org.\n\nEXAMPLES\n  List the agent tests in your default org:\n\n    $ sf agent test list\n\n  List the agent tests in an org with alias \"my-org\"\"\n\n    $ sf agent test list --target-org my-org\n```\n\n_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/test/list.ts)_\n\n## `sf agent test results`\n\nGet the results of a completed agent test run.\n\n```\nUSAGE\n  $ sf agent test results -o \u003cvalue\u003e -i \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [--result-format\n    json|human|junit|tap] [-d \u003cvalue\u003e] [--test-runner agentforce-studio|testing-center] [--verbose]\n\nFLAGS\n  -d, --output-dir=\u003cvalue\u003e      Directory to write the agent test results into.\n  -i, --job-id=\u003cvalue\u003e          (required) Job ID of the completed agent test run.\n  -o, --target-org=\u003cvalue\u003e      (required) Username or alias of the target org. Not required if the `target-org`\n                                configuration variable is already set.\n      --api-version=\u003cvalue\u003e     Override the api version used for api requests made by this command\n      --result-format=\u003coption\u003e  [default: human] Format of the agent test run results.\n                                \u003coptions: json|human|junit|tap\u003e\n      --test-runner=\u003coption\u003e    Explicitly specify which test runner to use (agentforce-studio or testing-center).\n                                \u003coptions: agentforce-studio|testing-center\u003e\n      --verbose                 Show generated data in the test results output.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Get the results of a completed agent test run.\n\n  This command requires a job ID, which the original \"agent test run\" command displays when it completes. You can also\n  use the --use-most-recent flag to see results for the most recently run agent test.\n\n  By default, this command outputs test results in human-readable tables for each test case. The tables show whether the\n  test case passed, the expected and actual values, the test score, how long the test took, and more. Use the\n  --result-format to display the test results in JSON or Junit format. Use the --output-dir flag to write the results to\n  a file rather than to the terminal.\n\nEXAMPLES\n  Get the results of an agent test run in your default org using its job ID:\n\n    $ sf agent test results --job-id 4KBfake0000003F4AQ\n\n  Get the results of the most recently run agent test in an org with alias \"my-org\":\n\n    $ sf agent test results --use-most-recent --target-org my-org\n\n  Get the results of the most recently run agent test in your default org, and write the JSON-formatted results into a\n  directory called \"test-results\":\n\n    $ sf agent test results --use-most-recent --output-dir ./test-results --result-format json\n\nFLAG DESCRIPTIONS\n  -d, --output-dir=\u003cvalue\u003e  Directory to write the agent test results into.\n\n    If the agent test run completes, write the results to the specified directory. If the test is still running, the\n    test results aren't written.\n\n  --test-runner=agentforce-studio|testing-center\n\n    Explicitly specify which test runner to use (agentforce-studio or testing-center).\n\n    By default, the command automatically detects which test runner to use based on the test definition metadata type in\n    your org. Use this flag to explicitly specify the runner type. 'agentforce-studio' uses AiTestingDefinition\n    metadata. 'testing-center' uses AiEvaluationDefinition metadata.\n\n  --verbose  Show generated data in the test results output.\n\n    When enabled, includes detailed generated data (such as invoked actions) in the human-readable test results output.\n    This is useful for debugging test failures and understanding what actions were actually invoked during the test run.\n\n    The generated data is in JSON format and includes the Apex classes or Flows that were invoked, the Salesforce\n    objects that were touched, and so on. Use the JSON structure of this information to build the test case JSONPath\n    expression when using custom evaluations.\n```\n\n_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/test/results.ts)_\n\n## `sf agent test resume`\n\nResume an agent test that you previously started in your org so you can view the test results.\n\n```\nUSAGE\n  $ sf agent test resume -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [-i \u003cvalue\u003e] [-r] [-w\n    \u003cvalue\u003e] [--result-format json|human|junit|tap] [-d \u003cvalue\u003e] [--test-runner agentforce-studio|testing-center]\n    [--verbose]\n\nFLAGS\n  -d, --output-dir=\u003cvalue\u003e      Directory to write the agent test results into.\n  -i, --job-id=\u003cvalue\u003e          Job ID of the original agent test run.\n  -o, --target-org=\u003cvalue\u003e      (required) Username or alias of the target org. Not required if the `target-org`\n                                configuration variable is already set.\n  -r, --use-most-recent         Use the job ID of the most recent agent test run.\n  -w, --wait=\u003cvalue\u003e            [default: 5 minutes] Number of minutes to wait for the command to complete and display\n                                results to the terminal window.\n      --api-version=\u003cvalue\u003e     Override the api version used for api requests made by this command\n      --result-format=\u003coption\u003e  [default: human] Format of the agent test run results.\n                                \u003coptions: json|human|junit|tap\u003e\n      --test-runner=\u003coption\u003e    Explicitly specify which test runner to use (agentforce-studio or testing-center).\n                                \u003coptions: agentforce-studio|testing-center\u003e\n      --verbose                 Show generated data in the test results output.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Resume an agent test that you previously started in your org so you can view the test results.\n\n  This command requires a job ID, which the original \"agent test run\" command displays when it completes. You can also\n  use the --use-most-recent flag to see results for the most recently run agent test.\n\n  Use the --wait flag to specify the number of minutes for this command to wait for the agent test to complete; if the\n  test completes by the end of the wait time, the command displays the test results. If not, the CLI returns control of\n  the terminal to you, and you must run \"agent test resume\" again.\n\n  By default, this command outputs test results in human-readable tables for each test case. The tables show whether the\n  test case passed, the expected and actual values, the test score, how long the test took, and more. Use the\n  --result-format to display the test results in JSON or Junit format. Use the --output-dir flag to write the results to\n  a file rather than to the terminal.\n\nEXAMPLES\n  Resume an agent test in your default org using a job ID:\n\n    $ sf agent test resume --job-id 4KBfake0000003F4AQ\n\n  Resume the most recently-run agent test in an org with alias \"my-org\" org; wait 10 minutes for the tests to finish:\n\n    $ sf agent test resume --use-most-recent --wait 10 --target-org my-org\n\n  Resume the most recent agent test in your default org, and write the JSON-formatted results into a directory called\n  \"test-results\":\n\n    $ sf agent test resume --use-most-recent --output-dir ./test-results --result-format json\n\nFLAG DESCRIPTIONS\n  -d, --output-dir=\u003cvalue\u003e  Directory to write the agent test results into.\n\n    If the agent test run completes, write the results to the specified directory. If the test is still running, the\n    test results aren't written.\n\n  --test-runner=agentforce-studio|testing-center\n\n    Explicitly specify which test runner to use (agentforce-studio or testing-center).\n\n    By default, the command automatically detects which test runner to use based on the test definition metadata type in\n    your org. Use this flag to explicitly specify the runner type. 'agentforce-studio' uses AiTestingDefinition\n    metadata. 'testing-center' uses AiEvaluationDefinition metadata.\n\n  --verbose  Show generated data in the test results output.\n\n    When enabled, includes detailed generated data (such as invoked actions) in the human-readable test results output.\n    This is useful for debugging test failures and understanding what actions were actually invoked during the test run.\n\n    The generated data is in JSON format and includes the Apex classes or Flows that were invoked, the Salesforce\n    objects that were touched, and so on. Use the JSON structure of this information to build the test case JSONPath\n    expression when using custom evaluations.\n```\n\n_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/test/resume.ts)_\n\n## `sf agent test run`\n\nStart an agent test in your org.\n\n```\nUSAGE\n  $ sf agent test run -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [-n \u003cvalue\u003e] [-w \u003cvalue\u003e]\n    [--result-format json|human|junit|tap] [-d \u003cvalue\u003e] [--test-runner agentforce-studio|testing-center] [--verbose]\n\nFLAGS\n  -d, --output-dir=\u003cvalue\u003e      Directory to write the agent test results into.\n  -n, --api-name=\u003cvalue\u003e        API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition\n                                metadata component that implements the agent test.\n  -o, --target-org=\u003cvalue\u003e      (required) Username or alias of the target org. Not required if the `target-org`\n                                configuration variable is already set.\n  -w, --wait=\u003cvalue\u003e            Number of minutes to wait for the command to complete and display results to the\n                                terminal window.\n      --api-version=\u003cvalue\u003e     Override the api version used for api requests made by this command\n      --result-format=\u003coption\u003e  [default: human] Format of the agent test run results.\n                                \u003coptions: json|human|junit|tap\u003e\n      --test-runner=\u003coption\u003e    Explicitly specify which test runner to use (agentforce-studio or testing-center).\n                                \u003coptions: agentforce-studio|testing-center\u003e\n      --verbose                 Show generated data in the test results output.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Start an agent test in your org.\n\n  Use the --api-name flag to specify the name of the agent test you want to run. Use the output of the \"agent test list\"\n  command to get the names of all the available agent tests in your org.\n\n  By default, this command starts the agent test in your org, but it doesn't wait for the test to finish. Instead, it\n  displays the \"agent test resume\" command, with a job ID, that you execute to see the results of the test run, and then\n  returns control of the terminal window to you. Use the --wait flag to specify the number of minutes for the command to\n  wait for the agent test to complete; if the test completes by the end of the wait time, the command displays the test\n  results. If not, run \"agent test resume\".\n\n  By default, this command outputs test results in human-readable tables for each test case, if the test completes in\n  time. The tables show whether the test case passed, the expected and actual values, the test score, how long the test\n  took, and more. Use the --result-format to display the test results in JSON or Junit format. Use the --output-dir flag\n  to write the results to a file rather than to the terminal.\n\nEXAMPLES\n  Start an agent test called Resort_Manager_Test for an agent in your default org, don't wait for the test to finish:\n\n    $ sf agent test run --api-name Resort_Manager_Test\n\n  Start an agent test for an agent in an org with alias \"my-org\" and wait for 10 minutes for the test to finish:\n\n    $ sf agent test run --api-name Resort_Manager_Test --wait 10 --target-org my-org\n\n  Start an agent test and write the JSON-formatted results into a directory called \"test-results\":\n\n    $ sf agent test run --api-name Resort_Manager_Test --wait 10 --output-dir ./test-results --result-format json\n\nFLAG DESCRIPTIONS\n  -d, --output-dir=\u003cvalue\u003e  Directory to write the agent test results into.\n\n    If the agent test run completes, write the results to the specified directory. If the test is still running, the\n    test results aren't written.\n\n  --test-runner=agentforce-studio|testing-center\n\n    Explicitly specify which test runner to use (agentforce-studio or testing-center).\n\n    By default, the command automatically detects which test runner to use based on the test definition metadata type in\n    your org. Use this flag to explicitly specify the runner type. 'agentforce-studio' uses AiTestingDefinition\n    metadata. 'testing-center' uses AiEvaluationDefinition metadata.\n\n  --verbose  Show generated data in the test results output.\n\n    When enabled, includes detailed generated data (such as invoked actions) in the human-readable test results output.\n    This is useful for debugging test failures and understanding what actions were actually invoked during the test run.\n\n    The generated data is in JSON format and includes the Apex classes or Flows that were invoked, the Salesforce\n    objects that were touched, and so on. Use the JSON structure of this information to build the test case JSONPath\n    expression when using custom evaluations.\n```\n\n_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/test/run.ts)_\n\n## `sf agent test run-eval`\n\nRun rich evaluation tests against an Agentforce agent.\n\n```\nUSAGE\n  $ sf agent test run-eval -o \u003cvalue\u003e -s \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [-n \u003cvalue\u003e]\n    [--result-format json|human|junit|tap] [--batch-size \u003cvalue\u003e] [--no-normalize]\n\nFLAGS\n  -n, --api-name=\u003cvalue\u003e        Agent API name (also called DeveloperName) used to resolve agent_id and\n                                agent_version_id. Auto-inferred from the YAML spec's subjectName.\n  -o, --target-org=\u003cvalue\u003e      (required) Username or alias of the target org. Not required if the `target-org`\n                                configuration variable is already set.\n  -s, --spec=\u003cvalue\u003e            (required) Path to test spec file (YAML or JSON). Supports reading from stdin when\n                                piping content.\n      --api-version=\u003cvalue\u003e     Override the api version used for api requests made by this command\n      --batch-size=\u003cvalue\u003e      [default: 5] Number of tests per API request (max 5).\n      --no-normalize            Disable auto-normalization of field names and shorthand references.\n      --result-format=\u003coption\u003e  [default: human] Format of the agent test run results.\n                                \u003coptions: json|human|junit|tap\u003e\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Run rich evaluation tests against an Agentforce agent.\n\n  Specify the tests you want to run with one of these inputs to the --spec flag:\n\n  - YAML test spec generated by the `agent generate test-spec` CLI command\n  - JSON payload\n\n  When you provide a YAML test spec, this command automatically translates test cases into internal state-based\n  evaluation framework calls and infers the agent name from the test spec's `subjectName` field. As a result, you can\n  use the same test spec with both the `agent test run` and `agent test run-eval` commands. YAML test specs also support\n  context variables, which allow you to inject contextual data (such as CaseId or RoutableId) into agent sessions for\n  testing with different contexts.\n\n  When you provide a JSON payload, it's sent directly to the evaluation framework with optional normalization. The\n  normalizer auto-corrects common field name mistakes, converts shorthand references to JSONPath, and injects defaults.\n  Use `--no-normalize` to disable this auto-normalization. JSON payloads can also include context_variables on\n  agent.create_session steps for the same contextual testing capabilities as when you use a YAML test spec.\n\n  This command supports more than 8 evaluator types, including subagent routing assertions, action invocation checks,\n  string/numeric assertions, semantic similarity scoring, and LLM-based quality ratings.\n\nEXAMPLES\n  Run tests using a YAML test spec on the org with alias \"my-org\":\n\n    $ sf agent test run-eval --spec specs/my-agent-testSpec.yaml --target-org my-org\n\n  Run tests using a YAML spec with explicit agent name override; use your default org:\n\n    $ sf agent test run-eval --spec specs/my-agent-testSpec.yaml --api-name My_Agent\n\n  Run tests using a JSON payload:\n\n    $ sf agent test run-eval --spec specs/eval-payload.json --target-org my-org\n\n  Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):\n\n    $ sf agent test run-eval --spec specs/my-agent-testSpec.yaml --target-org my-org --result-format junit\n\n  Run tests with contextVariables to inject contextual data into agent sessions (add contextVariables to test cases in\n  your YAML spec):\n\n    $ sf agent test run-eval --spec specs/agent-with-context.yaml --target-org my-org\n\n  Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n  $ echo '{\"tests\":[...]}' | sf agent test run-eval --spec --target-org my-org\n```\n\n_See code: [src/commands/agent/test/run-eval.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/test/run-eval.ts)_\n\n## `sf agent trace delete`\n\nDelete trace files from an agent preview session.\n\n```\nUSAGE\n  $ sf agent trace delete [--json] [--flags-dir \u003cvalue\u003e] [-a \u003cvalue\u003e] [--session-id \u003cvalue\u003e] [--older-than \u003cvalue\u003e]\n    [--no-prompt]\n\nFLAGS\n  -a, --agent=\u003cvalue\u003e       API name of the agent used to filter the list of trace files you want to delete. Matches\n                            against the API name used when starting the session, either an authoring bundle or a\n                            published agent API name.\n      --no-prompt           Skip the confirmation prompt and delete immediately.\n      --older-than=\u003cvalue\u003e  Duration used to filter the list of trace files; only files older than the duration are\n                            deleted. Accepts a number followed by a unit: m/minutes, h/hours, d/days, w/weeks. Examples:\n                            7d, 24h, 2w.\n      --session-id=\u003cvalue\u003e  Session ID used to filter the list of trace files you want to delete. Use the \"agent preview\n                            sessions\" CLI command to list all known agent preview sessions along with their session IDs.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Delete trace files from an agent preview session.\n\n  When you run an agent preview conversation (either interactive or programmatic), trace files are automatically\n  recorded and saved in your local DX project. Use this command to delete some or all of the trace files.\n\n  By default, this command shows a preview of what will be deleted and prompts for confirmation. Use --no-prompt to skip\n  confirmation.\n\n  Without filters, this comamnd deletes all trace files for all agents and sessions. Use flags to narrow the scope:\n  filter by agent API name (--agent), by session (--session-id), or by age (--older-than).\n\nEXAMPLES\n  Delete all traces for all agents and sessions; prompt for confirmation:\n\n    $ sf agent trace delete\n\n  Delete all traces for a specific agent:\n\n    $ sf agent trace delete --agent My_Agent\n\n  Delete traces from a specific session:\n\n    $ sf agent trace delete --session-id \u003cSESSION_ID\u003e\n\n  Delete traces older than 7 days:\n\n    $ sf agent trace delete --older-than 7d\n\n  Delete traces older than 24 hours for a specific agent; don't prompt for confirmation:\n\n    $ sf agent trace delete --agent My_Agent --older-than 24h --no-prompt\n\n  Delete all traces for all agents and sessions; don't prompt for confirmation:\n\n    $ sf agent trace delete --no-prompt\n```\n\n_See code: [src/commands/agent/trace/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/trace/delete.ts)_\n\n## `sf agent trace list`\n\nList the available trace files that were recorded during all agent preview sessions.\n\n```\nUSAGE\n  $ sf agent trace list [--json] [--flags-dir \u003cvalue\u003e] [--session-id \u003cvalue\u003e] [-a \u003cvalue\u003e] [--since \u003cvalue\u003e]\n\nFLAGS\n  -a, --agent=\u003cvalue\u003e       API name of the agent used to filter the list of available trace files. Matches against the\n                            API name used when starting the session, either an authoring bundle or a published agent API\n                            name.\n      --session-id=\u003cvalue\u003e  Session ID used to filter the list of trace files. Use the \"agent preview sessions\" CLI\n                            command to list all known agent preview sessions along with their session IDs.\n      --since=\u003cvalue\u003e       Date used to filter the list of trace files; only those recorded on or after the date are\n                            listed.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  List the available trace files that were recorded during all agent preview sessions.\n\n  When you run an agent preview conversation (either interactive or programmatic), trace files are automatically\n  recorded and saved in your local DX project. By default, this command lists all trace files for all agents and all of\n  their sessions. Use flags to narrow results: filter by agent name (--agent), by session (--session-id), or by date\n  (--since).\n\n  Each row in the output corresponds to one trace file, which in turn corresponds to one agent session. The Agent column\n  shows the authoring bundle or API name used when starting the session.\n\nEXAMPLES\n  List all trace files for all agents and sessions:\n\n    $ sf agent trace list\n\n  List all trace files for a specific agent:\n\n    $ sf agent trace list --agent My_Agent\n\n  List trace files for a specific session:\n\n    $ sf agent trace list --session-id \u003cSESSION_ID\u003e\n\n  List trace files recorded on or after April 20, 2026 (date-only, interpreted as UTC midnight):\n\n    $ sf agent trace list --since 2026-04-20\n\n  List trace files recorded on or after a specific UTC time:\n\n    $ sf agent trace list --since 2026-04-20T14:00:00Z\n\n  Filter by agent and date together:\n\n    $ sf agent trace list --agent My_Agent --since 2026-04-20\n\n  Return results as JSON:\n\n    $ sf agent trace list --json\n\nFLAG DESCRIPTIONS\n  --since=\u003cvalue\u003e  Date used to filter the list of trace files; only those recorded on or after the date are listed.\n\n    Accepts ISO 8601 format: date-only (2026-04-20), date-time (2026-04-20T14:00:00Z), or date-time with milliseconds\n    (2026-04-20T14:00:00.000Z). The \"Recorded At\" values shown in the table output are valid inputs.\n```\n\n_See code: [src/commands/agent/trace/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/trace/list.ts)_\n\n## `sf agent trace read`\n\nRead trace files from an agent preview session.\n\n```\nUSAGE\n  $ sf agent trace read -s \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [-f summary|detail|raw] [-d\n    actions|grounding|routing|errors] [-t \u003cvalue\u003e]\n\nFLAGS\n  -d, --dimension=\u003coption\u003e  Dimension to drill into when using \"--format detail\"; used to filter and organize the trace\n                            data to answer a specific type of question.\n                            \u003coptions: actions|grounding|routing|errors\u003e\n  -f, --format=\u003coption\u003e     [default: summary] Output format of the trace data; specifies the level of detail you want\n                            in the trace files.\n                            \u003coptions: summary|detail|raw\u003e\n  -s, --session-id=\u003cvalue\u003e  (required) Session ID to read traces for. Use the \"agent preview sessions\" CLI command to\n                            list all known agent preview sessions along with their session IDs\n  -t, --turn=\u003cvalue\u003e        Turn number for which you want trace data. A turn is a single utterance or response in a\n                            conversation, starting with 1.\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Read trace files from an agent preview session.\n\n  When you run an agent preview conversation (either interactive or programmatic), trace files are automatically\n  recorded and saved in your local DX project. Each turn (utterance or response) of a conversation creates trace data.\n  Use this command to view trace data for a specific preview session, so you can then analyze the trace data to observe,\n  monitor, investigate, and troubleshoot agent events and behavior.\n\n  Use the --format flag to specify one of these formats of the outputted trace data:\n\n  - summary (Default): A per-turn narrative showing topic routing, actions executed, and the agent's response. Use this\n  to quickly understand what happened in a preview session.\n  - detail: Diagnostic drill-down into a specific dimension. Filters output to only the trace steps relevant to that\n  dimension, minimizing noise.\n  - raw: Unprocessed trace JSON. Use this as a fallback when the trace schema has changed or you need to perform custom\n  analysis.\n\n  If you specify \"--format detail\", you must also specify a dimension with the --dimension flag. Dimensions are a way to\n  slice and analyze the agent execution trace from a specific angle or concern. Instead of looking at the raw sequence\n  of everything that happened, each dimension filters and organizes the trace data to answer a specific type of\n  question. These are the available dimensions and the information they provide:\n\n  - actions: The actions the agent executed. Includes action name, input parameters, output, and latency. Use this\n  dimension to understand what the agent actually did when answering an utterance in the preview session.\n  - grounding: The reasoning steps used by the LLM. Use this dimension to see how the agent \"thought\" about the problem\n  - the AI reasoning that determined which actions to take.\n  - routing: How the agent navigated between subagents. Use this dimension to understand conversation flow - when and\n  why the agent switched between different subagents or contexts during the conversation.\n  - errors: Aggregates all errors during the session. Use this dimension to quickly identify and debug issues across all\n  steps.\n\nEXAMPLES\n  Show a session trace summary for all turns in the session with the specified ID:\n\n    $ sf agent trace read --session-id \u003cSESSION_ID\u003e\n\n  Show a trace summary for the second turn (utterance or response) of the conversation:\n\n    $ sf agent trace read --session-id \u003cSESSION_ID\u003e --turn 2\n\n  Drill into action execution across all turns:\n\n    $ sf agent trace read --session-id \u003cSESSION_ID\u003e --format detail --dimension actions\n\n  Drill into routing decisions for the first turn of the conversation:\n\n    $ sf agent trace read --session-id \u003cSESSION_ID\u003e --format detail --dimension routing --turn 1\n\n  Show all errors across the session:\n\n    $ sf agent trace read --session-id \u003cSESSION_ID\u003e --format detail --dimension errors\n\n  Output raw trace JSON for custom parsing:\n\n    $ sf agent trace read --session-id \u003cSESSION_ID\u003e --format raw\n\n  Return results as JSON:\n\n    $ sf agent trace read --session-id \u003cSESSION_ID\u003e --json\n```\n\n_See code: [src/commands/agent/trace/read.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.0/src/commands/agent/trace/read.ts)_\n\n## `sf agent validate authoring-bundle`\n\nValidate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.\n\n```\nUSAGE\n  $ sf agent validate authoring-bundle -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [-n \u003cvalue\u003e]\n\nFLAGS\n  -n, --api-name=\u003cvalue\u003e     API name of the authoring bundle you want to validate; if not specified, the command\n                             provides a list that you can choose from.\n  -o, --target-org=\u003cvalue\u003e   (required) Username or alias of the target org. Not required if the `target-org`\n                             configuration variabl","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalesforcecli%2Fplugin-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalesforcecli%2Fplugin-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalesforcecli%2Fplugin-agent/lists"}