@salesforce/plugin-agent 1.42.1 → 1.44.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/README.md +513 -68
  2. package/lib/adlUtils.d.ts +2 -0
  3. package/lib/adlUtils.js +31 -0
  4. package/lib/adlUtils.js.map +1 -0
  5. package/lib/commands/agent/adl/create.d.ts +6 -1
  6. package/lib/commands/agent/adl/create.js +83 -19
  7. package/lib/commands/agent/adl/create.js.map +1 -1
  8. package/lib/commands/agent/adl/delete.d.ts +0 -1
  9. package/lib/commands/agent/adl/delete.js +3 -2
  10. package/lib/commands/agent/adl/delete.js.map +1 -1
  11. package/lib/commands/agent/adl/file/add.d.ts +0 -1
  12. package/lib/commands/agent/adl/file/add.js +3 -2
  13. package/lib/commands/agent/adl/file/add.js.map +1 -1
  14. package/lib/commands/agent/adl/file/delete.d.ts +0 -1
  15. package/lib/commands/agent/adl/file/delete.js +4 -3
  16. package/lib/commands/agent/adl/file/delete.js.map +1 -1
  17. package/lib/commands/agent/adl/file/list.d.ts +5 -5
  18. package/lib/commands/agent/adl/file/list.js +31 -7
  19. package/lib/commands/agent/adl/file/list.js.map +1 -1
  20. package/lib/commands/agent/adl/get.d.ts +0 -1
  21. package/lib/commands/agent/adl/get.js +15 -3
  22. package/lib/commands/agent/adl/get.js.map +1 -1
  23. package/lib/commands/agent/adl/list.d.ts +0 -1
  24. package/lib/commands/agent/adl/list.js +3 -2
  25. package/lib/commands/agent/adl/list.js.map +1 -1
  26. package/lib/commands/agent/adl/status.d.ts +1 -1
  27. package/lib/commands/agent/adl/status.js +21 -4
  28. package/lib/commands/agent/adl/status.js.map +1 -1
  29. package/lib/commands/agent/adl/update.d.ts +1 -1
  30. package/lib/commands/agent/adl/update.js +18 -5
  31. package/lib/commands/agent/adl/update.js.map +1 -1
  32. package/lib/commands/agent/adl/upload.d.ts +0 -1
  33. package/lib/commands/agent/adl/upload.js +3 -2
  34. package/lib/commands/agent/adl/upload.js.map +1 -1
  35. package/lib/commands/agent/generate/test-spec.d.ts +9 -0
  36. package/lib/commands/agent/generate/test-spec.js +194 -11
  37. package/lib/commands/agent/generate/test-spec.js.map +1 -1
  38. package/lib/commands/agent/mcp/asset/list.d.ts +16 -0
  39. package/lib/commands/agent/mcp/asset/list.js +68 -0
  40. package/lib/commands/agent/mcp/asset/list.js.map +1 -0
  41. package/lib/commands/agent/mcp/asset/replace.d.ts +18 -0
  42. package/lib/commands/agent/mcp/asset/replace.js +95 -0
  43. package/lib/commands/agent/mcp/asset/replace.js.map +1 -0
  44. package/lib/commands/agent/mcp/create.d.ts +24 -0
  45. package/lib/commands/agent/mcp/create.js +112 -0
  46. package/lib/commands/agent/mcp/create.js.map +1 -0
  47. package/lib/commands/agent/mcp/delete.d.ts +19 -0
  48. package/lib/commands/agent/mcp/delete.js +65 -0
  49. package/lib/commands/agent/mcp/delete.js.map +1 -0
  50. package/lib/commands/agent/mcp/fetch.d.ts +16 -0
  51. package/lib/commands/agent/mcp/fetch.js +68 -0
  52. package/lib/commands/agent/mcp/fetch.js.map +1 -0
  53. package/lib/commands/agent/mcp/get.d.ts +16 -0
  54. package/lib/commands/agent/mcp/get.js +58 -0
  55. package/lib/commands/agent/mcp/get.js.map +1 -0
  56. package/lib/commands/agent/mcp/list.d.ts +18 -0
  57. package/lib/commands/agent/mcp/list.js +73 -0
  58. package/lib/commands/agent/mcp/list.js.map +1 -0
  59. package/lib/commands/agent/mcp/update.d.ts +24 -0
  60. package/lib/commands/agent/mcp/update.js +115 -0
  61. package/lib/commands/agent/mcp/update.js.map +1 -0
  62. package/lib/commands/agent/preview/start.d.ts +1 -0
  63. package/lib/commands/agent/preview/start.js +4 -1
  64. package/lib/commands/agent/preview/start.js.map +1 -1
  65. package/lib/commands/agent/preview.d.ts +1 -0
  66. package/lib/commands/agent/preview.js +4 -0
  67. package/lib/commands/agent/preview.js.map +1 -1
  68. package/lib/components/agent-preview-react.d.ts +2 -1
  69. package/lib/components/agent-preview-react.js +3 -3
  70. package/lib/components/agent-preview-react.js.map +1 -1
  71. package/lib/flags.d.ts +12 -1
  72. package/lib/flags.js +31 -0
  73. package/lib/flags.js.map +1 -1
  74. package/messages/agent.adl.create.md +22 -0
  75. package/messages/agent.adl.file.add.md +2 -0
  76. package/messages/agent.adl.file.delete.md +4 -0
  77. package/messages/agent.adl.file.list.md +12 -0
  78. package/messages/agent.adl.status.md +5 -1
  79. package/messages/agent.adl.update.md +4 -0
  80. package/messages/agent.adl.upload.md +2 -0
  81. package/messages/agent.generate.test-spec.md +33 -5
  82. package/messages/agent.mcp.asset.list.md +25 -0
  83. package/messages/agent.mcp.asset.replace.md +49 -0
  84. package/messages/agent.mcp.create.md +61 -0
  85. package/messages/agent.mcp.delete.md +37 -0
  86. package/messages/agent.mcp.fetch.md +25 -0
  87. package/messages/agent.mcp.get.md +25 -0
  88. package/messages/agent.mcp.list.md +33 -0
  89. package/messages/agent.mcp.update.md +65 -0
  90. package/messages/shared.md +16 -0
  91. package/oclif.manifest.json +1774 -842
  92. package/package.json +14 -4
  93. package/schemas/agent-adl-create.json +63 -3
  94. package/schemas/agent-adl-delete.json +5 -2
  95. package/schemas/agent-adl-file-add.json +7 -2
  96. package/schemas/agent-adl-file-delete.json +5 -2
  97. package/schemas/agent-adl-file-list.json +26 -3
  98. package/schemas/agent-adl-get.json +63 -3
  99. package/schemas/agent-adl-list.json +55 -3
  100. package/schemas/agent-adl-status.json +44 -4
  101. package/schemas/agent-adl-update.json +63 -3
  102. package/schemas/agent-adl-upload.json +5 -2
  103. package/schemas/agent-mcp-asset-list.json +65 -0
  104. package/schemas/agent-mcp-asset-replace.json +65 -0
  105. package/schemas/agent-mcp-create.json +144 -0
  106. package/schemas/agent-mcp-delete.json +22 -0
  107. package/schemas/agent-mcp-fetch.json +66 -0
  108. package/schemas/agent-mcp-get.json +86 -0
  109. package/schemas/agent-mcp-list.json +101 -0
  110. package/schemas/agent-mcp-update.json +86 -0
  111. package/schemas/agent-preview-end.json +8 -3
  112. package/schemas/agent-publish-authoring__bundle.json +8 -3
  113. package/schemas/agent-trace-delete.json +7 -2
  114. package/schemas/agent-trace-list.json +9 -2
  115. package/schemas/agent-trace-read.json +131 -21
package/README.md CHANGED
@@ -76,6 +76,14 @@ sf plugins
76
76
  - [`sf agent generate authoring-bundle`](#sf-agent-generate-authoring-bundle)
77
77
  - [`sf agent generate template`](#sf-agent-generate-template)
78
78
  - [`sf agent generate test-spec`](#sf-agent-generate-test-spec)
79
+ - [`sf agent mcp asset list`](#sf-agent-mcp-asset-list)
80
+ - [`sf agent mcp asset replace`](#sf-agent-mcp-asset-replace)
81
+ - [`sf agent mcp create`](#sf-agent-mcp-create)
82
+ - [`sf agent mcp delete`](#sf-agent-mcp-delete)
83
+ - [`sf agent mcp fetch`](#sf-agent-mcp-fetch)
84
+ - [`sf agent mcp get`](#sf-agent-mcp-get)
85
+ - [`sf agent mcp list`](#sf-agent-mcp-list)
86
+ - [`sf agent mcp update`](#sf-agent-mcp-update)
79
87
  - [`sf agent preview`](#sf-agent-preview)
80
88
  - [`sf agent preview end`](#sf-agent-preview-end)
81
89
  - [`sf agent preview send`](#sf-agent-preview-send)
@@ -140,7 +148,7 @@ EXAMPLES
140
148
  $ sf agent activate --api-name Resort_Manager --version 2 --target-org my-org
141
149
  ```
142
150
 
143
- _See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/activate.ts)_
151
+ _See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/activate.ts)_
144
152
 
145
153
  ## `sf agent adl create`
146
154
 
@@ -150,13 +158,24 @@ Create an Agentforce Data Library.
150
158
  USAGE
151
159
  $ sf agent adl create -o <value> -n <value> --developer-name <value> --source-type sfdrive|knowledge|retriever
152
160
  [--json] [--flags-dir <value>] [--api-version <value>] [--description <value>] [--index-mode basic|enhanced]
153
- [--retriever-id <value>] [--primary-index-field1 <value>] [--primary-index-field2 <value>]
161
+ [--retriever-id <value>] [--primary-index-field1 <value>] [--primary-index-field2 <value>] [--content-fields
162
+ <value>] [--data-category-ids <value>] [--data-category-names <value>] [-w <value>]
154
163
 
155
164
  FLAGS
156
165
  -n, --name=<value> (required) Display name for the data library (max 80 characters).
157
166
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
158
167
  configuration variable is already set.
168
+ -w, --wait=<value> Wait N minutes for indexing to complete (KNOWLEDGE libraries). SFDRIVE libraries
169
+ require upload before indexing; RETRIEVER libraries are ready immediately.
159
170
  --api-version=<value> Override the api version used for api requests made by this command
171
+ --content-fields=<value> Comma-separated list of content fields for KNOWLEDGE libraries (optional, mutable
172
+ after creation).
173
+ --data-category-ids=<value> Comma-separated list of data category selection IDs for KNOWLEDGE libraries.
174
+ Mutually exclusive with --data-category-names (provide one or the other, not
175
+ both).
176
+ --data-category-names=<value> Comma-separated list of data category names in qualified format (e.g.,
177
+ "Group_API_Name.Category"). Mutually exclusive with --data-category-ids (provide
178
+ one or the other, not both).
160
179
  --description=<value> Description of the data library (max 255 characters).
161
180
  --developer-name=<value> (required) API name for the data library (max 80 characters, alphanumeric and
162
181
  underscores only, must start with a letter).
@@ -182,6 +201,9 @@ DESCRIPTION
182
201
  Creates a new data library in the target org. The --source-type flag determines the type of library: SFDRIVE (file
183
202
  upload), KNOWLEDGE (Salesforce Knowledge articles), or RETRIEVER (existing active Custom Retriever).
184
203
 
204
+ For SFDRIVE libraries, creation provisions the full Data Cloud pipeline (DLO → DMO → SearchIndex → Retriever). Upload
205
+ files with `sf agent adl upload` after creation.
206
+
185
207
  EXAMPLES
186
208
  Create an SFDRIVE library:
187
209
 
@@ -198,7 +220,7 @@ EXAMPLES
198
220
  --source-type retriever --retriever-id 0ppXX0000000001
199
221
  ```
200
222
 
201
- _See code: [src/commands/agent/adl/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/adl/create.ts)_
223
+ _See code: [src/commands/agent/adl/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/create.ts)_
202
224
 
203
225
  ## `sf agent adl delete`
204
226
 
@@ -229,7 +251,7 @@ EXAMPLES
229
251
  $ sf agent adl delete --library-id 1JDSG000007IbWX4A0 --target-org myOrg
230
252
  ```
231
253
 
232
- _See code: [src/commands/agent/adl/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/adl/delete.ts)_
254
+ _See code: [src/commands/agent/adl/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/delete.ts)_
233
255
 
234
256
  ## `sf agent adl file add`
235
257
 
@@ -256,6 +278,9 @@ DESCRIPTION
256
278
  Adds one or more files to an existing SFDRIVE data library and triggers SearchIndex re-hydration. This is the day-2
257
279
  operation for adding files to an already-provisioned library.
258
280
 
281
+ Adds files to an existing READY library. Unlike `sf agent adl upload`, this does NOT create new downstream Data Cloud
282
+ assets — it appends files to the existing SearchIndex and triggers re-indexing.
283
+
259
284
  Constraints: at least 1 file required, no duplicate file names in a batch, maximum 1000 files per library.
260
285
 
261
286
  EXAMPLES
@@ -268,7 +293,7 @@ EXAMPLES
268
293
  $ sf agent adl file add -i 1JDSG000007IbWX4A0 --path ./docs/guide.pdf --path ./docs/faq.txt --target-org myOrg
269
294
  ```
270
295
 
271
- _See code: [src/commands/agent/adl/file/add.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/adl/file/add.ts)_
296
+ _See code: [src/commands/agent/adl/file/add.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/file/add.ts)_
272
297
 
273
298
  ## `sf agent adl file delete`
274
299
 
@@ -301,7 +326,7 @@ EXAMPLES
301
326
  $ sf agent adl file delete --library-id 1JDSG000007IbWX4A0 --file-id a1B2C3D4E5F6G7H8I9 --target-org myOrg
302
327
  ```
303
328
 
304
- _See code: [src/commands/agent/adl/file/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/adl/file/delete.ts)_
329
+ _See code: [src/commands/agent/adl/file/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/file/delete.ts)_
305
330
 
306
331
  ## `sf agent adl file list`
307
332
 
@@ -309,13 +334,18 @@ List files in an Agentforce Data Library.
309
334
 
310
335
  ```
311
336
  USAGE
312
- $ sf agent adl file list -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>]
337
+ $ sf agent adl file list -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [--page-size
338
+ <value>] [--offset <value>] [--status uploaded|indexing|indexed|index_failed|deleting|delete_failed]
313
339
 
314
340
  FLAGS
315
341
  -i, --library-id=<value> (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).
316
342
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
317
343
  configuration variable is already set.
318
344
  --api-version=<value> Override the api version used for api requests made by this command
345
+ --offset=<value> Number of files to skip before returning results (for pagination).
346
+ --page-size=<value> [default: 50] Number of files to return per page (1-200, default 50).
347
+ --status=<option> Filter files by indexing status.
348
+ <options: uploaded|indexing|indexed|index_failed|deleting|delete_failed>
319
349
 
320
350
  GLOBAL FLAGS
321
351
  --flags-dir=<value> Import flag values from a directory.
@@ -336,7 +366,7 @@ EXAMPLES
336
366
  $ sf agent adl file list --library-id 1JDSG000007IbWX4A0 --target-org myOrg --json
337
367
  ```
338
368
 
339
- _See code: [src/commands/agent/adl/file/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/adl/file/list.ts)_
369
+ _See code: [src/commands/agent/adl/file/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/file/list.ts)_
340
370
 
341
371
  ## `sf agent adl get`
342
372
 
@@ -367,7 +397,7 @@ EXAMPLES
367
397
  $ sf agent adl get --library-id 1JDSG000007IbWX4A0 --target-org myOrg
368
398
  ```
369
399
 
370
- _See code: [src/commands/agent/adl/get.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/adl/get.ts)_
400
+ _See code: [src/commands/agent/adl/get.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/get.ts)_
371
401
 
372
402
  ## `sf agent adl list`
373
403
 
@@ -404,7 +434,7 @@ EXAMPLES
404
434
  $ sf agent adl list --target-org myOrg --json
405
435
  ```
406
436
 
407
- _See code: [src/commands/agent/adl/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/adl/list.ts)_
437
+ _See code: [src/commands/agent/adl/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/list.ts)_
408
438
 
409
439
  ## `sf agent adl status`
410
440
 
@@ -413,12 +443,15 @@ Get indexing status of an Agentforce Data Library.
413
443
  ```
414
444
  USAGE
415
445
  $ sf agent adl status -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>]
446
+ [--include-artifacts]
416
447
 
417
448
  FLAGS
418
449
  -i, --library-id=<value> (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).
419
450
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
420
451
  configuration variable is already set.
421
452
  --api-version=<value> Override the api version used for api requests made by this command
453
+ --include-artifacts Resolve DC asset artifacts (DataStream, DLO, DMO, SearchIndex, Retriever) with entity IDs
454
+ and names on each stage. Slower — requires additional queries.
422
455
 
423
456
  GLOBAL FLAGS
424
457
  --flags-dir=<value> Import flag values from a directory.
@@ -427,8 +460,8 @@ GLOBAL FLAGS
427
460
  DESCRIPTION
428
461
  Get indexing status of an Agentforce Data Library.
429
462
 
430
- Returns the current indexing status including stage details (DATA_LAKE_OBJECT, SEARCH_INDEX, RETRIEVER) and any
431
- errors.
463
+ Returns the current indexing status including stage details (DATA_STREAM, DATA_LAKE_OBJECT, DATA_MODEL_OBJECT,
464
+ SEARCH_INDEX, RETRIEVER) and any errors.
432
465
 
433
466
  EXAMPLES
434
467
  Get status of a data library:
@@ -436,7 +469,7 @@ EXAMPLES
436
469
  $ sf agent adl status --library-id 1JDSG000007IbWX4A0 --target-org myOrg
437
470
  ```
438
471
 
439
- _See code: [src/commands/agent/adl/status.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/adl/status.ts)_
472
+ _See code: [src/commands/agent/adl/status.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/status.ts)_
440
473
 
441
474
  ## `sf agent adl update`
442
475
 
@@ -445,7 +478,8 @@ Update an Agentforce Data Library.
445
478
  ```
446
479
  USAGE
447
480
  $ sf agent adl update -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [-n <value>]
448
- [--description <value>] [--content-fields <value>] [--restrict-to-public-articles] [--retriever-id <value>]
481
+ [--description <value>] [--content-fields <value>] [--restrict-to-public-articles] [--data-category-rule]
482
+ [--retriever-id <value>]
449
483
 
450
484
  FLAGS
451
485
  -i, --library-id=<value> (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).
@@ -455,6 +489,8 @@ FLAGS
455
489
  --api-version=<value> Override the api version used for api requests made by this command
456
490
  --content-fields=<value> Comma-separated list of content fields for KNOWLEDGE libraries (triggers
457
491
  re-indexing).
492
+ --[no-]data-category-rule Enable or disable data category filtering for KNOWLEDGE libraries. Use
493
+ --no-data-category-rule to disable.
458
494
  --description=<value> New description for the data library (max 255 characters).
459
495
  --[no-]restrict-to-public-articles Restrict to public Knowledge articles only (KNOWLEDGE libraries, triggers
460
496
  re-indexing).
@@ -488,7 +524,7 @@ EXAMPLES
488
524
  $ sf agent adl update --library-id 1JDSG000007IbWX4A0 --restrict-to-public-articles --target-org myOrg
489
525
  ```
490
526
 
491
- _See code: [src/commands/agent/adl/update.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/adl/update.ts)_
527
+ _See code: [src/commands/agent/adl/update.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/update.ts)_
492
528
 
493
529
  ## `sf agent adl upload`
494
530
 
@@ -518,6 +554,10 @@ DESCRIPTION
518
554
  Performs the multi-step upload workflow: checks upload readiness, obtains a pre-signed S3 URL, uploads the file,
519
555
  triggers indexing, and optionally polls until the library is ready (retrieverId is populated).
520
556
 
557
+ Upload triggers the full Data Cloud provisioning pipeline, creating all downstream assets (DLO, DMO, SearchIndex,
558
+ Retriever). Use `sf agent adl status` to monitor progress. For adding files to an already-provisioned library, use `sf
559
+ agent adl file add` instead.
560
+
521
561
  This command only works with SFDRIVE libraries. KNOWLEDGE libraries index automatically after creation, and RETRIEVER
522
562
  libraries require no file upload.
523
563
 
@@ -531,7 +571,7 @@ EXAMPLES
531
571
  $ sf agent adl upload --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg
532
572
  ```
533
573
 
534
- _See code: [src/commands/agent/adl/upload.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/adl/upload.ts)_
574
+ _See code: [src/commands/agent/adl/upload.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/upload.ts)_
535
575
 
536
576
  ## `sf agent create`
537
577
 
@@ -598,7 +638,7 @@ EXAMPLES
598
638
  $ sf agent create --name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
599
639
  ```
600
640
 
601
- _See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/create.ts)_
641
+ _See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/create.ts)_
602
642
 
603
643
  ## `sf agent deactivate`
604
644
 
@@ -639,7 +679,7 @@ EXAMPLES
639
679
  $ sf agent deactivate --api-name Resort_Manager --target-org my-org
640
680
  ```
641
681
 
642
- _See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/deactivate.ts)_
682
+ _See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/deactivate.ts)_
643
683
 
644
684
  ## `sf agent generate agent-spec`
645
685
 
@@ -746,7 +786,7 @@ EXAMPLES
746
786
  $ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
747
787
  ```
748
788
 
749
- _See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/generate/agent-spec.ts)_
789
+ _See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/generate/agent-spec.ts)_
750
790
 
751
791
  ## `sf agent generate authoring-bundle`
752
792
 
@@ -823,7 +863,7 @@ EXAMPLES
823
863
  other-package-dir/main/default --target-org my-dev-org
824
864
  ```
825
865
 
826
- _See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/generate/authoring-bundle.ts)_
866
+ _See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/generate/authoring-bundle.ts)_
827
867
 
828
868
  ## `sf agent generate template`
829
869
 
@@ -885,7 +925,7 @@ EXAMPLES
885
925
  my-package --source-org my-scratch-org
886
926
  ```
887
927
 
888
- _See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/generate/template.ts)_
928
+ _See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/generate/template.ts)_
889
929
 
890
930
  ## `sf agent generate test-spec`
891
931
 
@@ -893,14 +933,18 @@ Generate an agent test spec, which is a YAML file that lists the test cases for
893
933
 
894
934
  ```
895
935
  USAGE
896
- $ sf agent generate test-spec [--flags-dir <value>] [-d <value>] [--force-overwrite] [-f <value>]
936
+ $ sf agent generate test-spec [--flags-dir <value>] [-d <value>] [--force-overwrite] [-f <value>] [--test-runner
937
+ agentforce-studio|testing-center]
897
938
 
898
939
  FLAGS
899
- -d, --from-definition=<value> Filepath to the AIEvaluationDefinition metadata XML file in your DX project that you
900
- want to convert to a test spec YAML file.
940
+ -d, --from-definition=<value> Filepath to an AiEvaluationDefinition or AiTestingDefinition metadata XML file in your
941
+ DX project that you want to convert to a test spec YAML file.
901
942
  -f, --output-file=<value> Name of the generated test spec YAML file. Default value is
902
- "specs/<AGENT_API_NAME>-testSpec.yaml".
943
+ "specs/<AGENT_API_NAME>-testSpec.yaml" (legacy) or
944
+ "specs/<AGENT_API_NAME>-ngtTestSpec.yaml" (Agentforce Studio).
903
945
  --force-overwrite Don't prompt for confirmation when overwriting an existing test spec YAML file.
946
+ --test-runner=<option> Explicitly specify which test runner to use (agentforce-studio or testing-center).
947
+ <options: agentforce-studio|testing-center>
904
948
 
905
949
  GLOBAL FLAGS
906
950
  --flags-dir=<value> Import flag values from a directory.
@@ -929,16 +973,22 @@ DESCRIPTION
929
973
  information.
930
974
 
931
975
  When your test spec is ready, you then run the "agent test create" command to actually create the test in your org and
932
- synchronize the metadata with your DX project. The metadata type for an agent test is AiEvaluationDefinition.
976
+ synchronize the metadata with your DX project. The metadata type for an agent test is `AiEvaluationDefinition` (legacy
977
+ testing-center) or `AiTestingDefinition` (Agentforce Studio / NGT), selected via --test-runner.
933
978
 
934
- If you have an existing AiEvaluationDefinition metadata XML file in your DX project, you can generate its equivalent
935
- YAML test spec file with the --from-definition flag.
979
+ If you have an existing AiEvaluationDefinition or AiTestingDefinition metadata XML file in your DX project, you can
980
+ generate its equivalent YAML test spec file with the --from-definition flag. The runner is inferred from the file
981
+ extension; pass --test-runner to override.
936
982
 
937
983
  EXAMPLES
938
984
  Generate an agent test spec YAML file interactively:
939
985
 
940
986
  $ sf agent generate test-spec
941
987
 
988
+ Generate an Agentforce Studio (NGT) test spec YAML file interactively:
989
+
990
+ $ sf agent generate test-spec --test-runner agentforce-studio
991
+
942
992
  Generate an agent test spec YAML file and specify a name for the new file; if the file exists, overwrite it without
943
993
  confirmation:
944
994
 
@@ -947,10 +997,361 @@ EXAMPLES
947
997
  Generate an agent test spec YAML file from an existing AiEvaluationDefinition metadata XML file in your DX project:
948
998
 
949
999
  $ sf agent generate test-spec --from-definition \
950
- force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml
1000
+ force-app/main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml
1001
+
1002
+ Generate an Agentforce Studio (NGT) test spec YAML file from an existing AiTestingDefinition metadata XML file:
1003
+
1004
+ $ sf agent generate test-spec --from-definition \
1005
+ force-app/main/default/aiTestingDefinitions/Returns_Checkout_Tests.aiTestingDefinition-meta.xml
1006
+
1007
+ FLAG DESCRIPTIONS
1008
+ --test-runner=agentforce-studio|testing-center
1009
+
1010
+ Explicitly specify which test runner to use (agentforce-studio or testing-center).
1011
+
1012
+ By default, the command automatically detects which test runner to use based on the test definition metadata type in
1013
+ your org. Use this flag to explicitly specify the runner type. 'agentforce-studio' uses AiTestingDefinition
1014
+ metadata. 'testing-center' uses AiEvaluationDefinition metadata.
1015
+ ```
1016
+
1017
+ _See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/generate/test-spec.ts)_
1018
+
1019
+ ## `sf agent mcp asset list`
1020
+
1021
+ List the assets (tools, prompts, and resources) for an MCP server in the catalog.
1022
+
1023
+ ```
1024
+ USAGE
1025
+ $ sf agent mcp asset list -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>]
1026
+
1027
+ FLAGS
1028
+ -i, --mcp-server-id=<value> (required) The ID of the MCP server whose assets you want to list.
1029
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
1030
+ configuration variable is already set.
1031
+ --api-version=<value> Override the api version used for api requests made by this command
1032
+
1033
+ GLOBAL FLAGS
1034
+ --flags-dir=<value> Import flag values from a directory.
1035
+ --json Format output as json.
1036
+
1037
+ DESCRIPTION
1038
+ List the assets (tools, prompts, and resources) for an MCP server in the catalog.
1039
+
1040
+ Returns the assets discovered for the specified MCP server, including each asset's kind (MCP_TOOL, MCP_PROMPT, or
1041
+ MCP_RESOURCE), whether it is active, and whether it is available as an agent action.
1042
+
1043
+ EXAMPLES
1044
+ List the assets for an MCP server in the default target org:
1045
+
1046
+ $ sf agent mcp asset list --target-org myOrg --mcp-server-id 0XSxx0000000001
1047
+
1048
+ List the assets for an MCP server and output as JSON:
1049
+
1050
+ $ sf agent mcp asset list --target-org myOrg --mcp-server-id 0XSxx0000000001 --json
1051
+ ```
1052
+
1053
+ _See code: [src/commands/agent/mcp/asset/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/asset/list.ts)_
1054
+
1055
+ ## `sf agent mcp asset replace`
1056
+
1057
+ Replace the asset set of an MCP server in the API Catalog.
1058
+
1059
+ ```
1060
+ USAGE
1061
+ $ sf agent mcp asset replace -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [--assets <value>
1062
+ | --assets-file <value>]
1063
+
1064
+ FLAGS
1065
+ -i, --mcp-server-id=<value> (required) ID of the MCP server whose assets you want to replace.
1066
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
1067
+ configuration variable is already set.
1068
+ --api-version=<value> Override the api version used for api requests made by this command
1069
+ --assets=<value> The desired asset allowlist as a JSON string (or "-" to read from stdin). Mutually
1070
+ exclusive with --assets-file.
1071
+ --assets-file=<value> Path to a JSON file containing the desired asset allowlist. Mutually exclusive with
1072
+ --assets.
1073
+
1074
+ GLOBAL FLAGS
1075
+ --flags-dir=<value> Import flag values from a directory.
1076
+ --json Format output as json.
1077
+
1078
+ DESCRIPTION
1079
+ Replace the asset set of an MCP server in the API Catalog.
1080
+
1081
+ Replaces the full set of assets (tools, prompts, resources) for an MCP server with the asset items you supply. Provide
1082
+ the assets either inline with `--assets` (a JSON string, or `-` to read from stdin) or from a file with
1083
+ `--assets-file`. The JSON must be either an array of asset items or an object of the form `{ "assets": [...] }`. Each
1084
+ asset item may include `id`, `name`, `label`, `description`, `active`, and `kind`. This is a full replacement:
1085
+ existing assets not present in the supplied set are removed, so provide the complete desired asset set (read the
1086
+ current set first with `agent mcp asset list` or `agent mcp fetch`).
1087
+
1088
+ EXAMPLES
1089
+ Replace the assets inline with a JSON string:
1090
+
1091
+ $ sf agent mcp asset replace --mcp-server-id 0XSxx0000000001 --assets \
1092
+ '{"assets":[{"name":"McpTool__add","active":true}]}' --target-org myOrg
1093
+
1094
+ Replace the assets from a JSON file:
1095
+
1096
+ $ sf agent mcp asset replace --mcp-server-id 0XSxx0000000001 --assets-file ./assets.json --target-org myOrg
1097
+
1098
+ Pipe the assets from stdin:
1099
+ cat assets.json | sf agent mcp asset replace --mcp-server-id 0XSxx0000000001 --assets - --target-org myOrg
1100
+ ```
1101
+
1102
+ _See code: [src/commands/agent/mcp/asset/replace.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/asset/replace.ts)_
1103
+
1104
+ ## `sf agent mcp create`
1105
+
1106
+ Create an MCP server in the API Catalog.
1107
+
1108
+ ```
1109
+ USAGE
1110
+ $ sf agent mcp create -o <value> -n <value> --server-url <value> [--json] [--flags-dir <value>] [--api-version
1111
+ <value>] [--label <value>] [--description <value>] [--auth-type OAUTH|NO_AUTH] [--identity-provider <value>]
1112
+ [--client-id <value>] [--client-secret <value>] [--scope <value>]
1113
+
1114
+ FLAGS
1115
+ -n, --name=<value> (required) Unique name of the MCP server.
1116
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
1117
+ configuration variable is already set.
1118
+ --api-version=<value> Override the api version used for api requests made by this command
1119
+ --auth-type=<option> [default: NO_AUTH] Authorization type to use when connecting to the MCP server.
1120
+ <options: OAUTH|NO_AUTH>
1121
+ --client-id=<value> OAuth client ID. Required when auth-type is OAUTH.
1122
+ --client-secret=<value> OAuth client secret. Required when auth-type is OAUTH. Pass "-" to read it from stdin
1123
+ (piped) and keep it out of shell history.
1124
+ --description=<value> Description of the MCP server.
1125
+ --identity-provider=<value> Identity provider to use for OAuth authorization. Required when auth-type is OAUTH.
1126
+ --label=<value> Human-readable label for the MCP server.
1127
+ --scope=<value> OAuth scope to request. Required when auth-type is OAUTH.
1128
+ --server-url=<value> (required) URL of the external MCP server.
1129
+
1130
+ GLOBAL FLAGS
1131
+ --flags-dir=<value> Import flag values from a directory.
1132
+ --json Format output as json.
1133
+
1134
+ DESCRIPTION
1135
+ Create an MCP server in the API Catalog.
1136
+
1137
+ Registers an external Model Context Protocol (MCP) server with the API Catalog and discovers its assets (tools,
1138
+ prompts, and resources). Provide the server URL and, when the server requires it, OAuth authorization details. When
1139
+ the authorization type is OAUTH you must supply the identity provider, client ID, client secret, and scope.
1140
+
1141
+ EXAMPLES
1142
+ Create an MCP server with no authentication:
1143
+
1144
+ $ sf agent mcp create --name myServer --server-url https://mcp.example.com --target-org myOrg
1145
+
1146
+ Create an MCP server that uses OAuth authentication, piping the client secret from stdin to keep it out of shell history:
1147
+ cat secret.txt | sf agent mcp create --name myServer --server-url https://mcp.example.com --auth-type OAUTH --identity-provider myIdp --client-id abc123 --client-secret - --scope "read write" --target-org myOrg
1148
+ ```
1149
+
1150
+ _See code: [src/commands/agent/mcp/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/create.ts)_
1151
+
1152
+ ## `sf agent mcp delete`
1153
+
1154
+ Delete an MCP server from the API Catalog.
1155
+
1156
+ ```
1157
+ USAGE
1158
+ $ sf agent mcp delete -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [--no-prompt]
1159
+
1160
+ FLAGS
1161
+ -i, --mcp-server-id=<value> (required) ID of the MCP server to delete.
1162
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
1163
+ configuration variable is already set.
1164
+ --api-version=<value> Override the api version used for api requests made by this command
1165
+ --no-prompt Skip the confirmation prompt and delete the MCP server immediately.
1166
+
1167
+ GLOBAL FLAGS
1168
+ --flags-dir=<value> Import flag values from a directory.
1169
+ --json Format output as json.
1170
+
1171
+ DESCRIPTION
1172
+ Delete an MCP server from the API Catalog.
1173
+
1174
+ Permanently removes an MCP (Model Context Protocol) server registration from the API Catalog, identified by its ID. By
1175
+ default you are prompted to confirm the deletion; pass --no-prompt to skip the confirmation (for example in scripts
1176
+ and CI).
1177
+
1178
+ EXAMPLES
1179
+ Delete an MCP server, confirming interactively:
1180
+
1181
+ $ sf agent mcp delete --mcp-server-id 0XSxx0000000001 --target-org myOrg
1182
+
1183
+ Delete an MCP server without a confirmation prompt:
1184
+
1185
+ $ sf agent mcp delete --mcp-server-id 0XSxx0000000001 --target-org myOrg --no-prompt
1186
+ ```
1187
+
1188
+ _See code: [src/commands/agent/mcp/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/delete.ts)_
1189
+
1190
+ ## `sf agent mcp fetch`
1191
+
1192
+ Fetch the live assets (tools, prompts, resources) advertised by an MCP server.
1193
+
951
1194
  ```
1195
+ USAGE
1196
+ $ sf agent mcp fetch -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>]
952
1197
 
953
- _See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/generate/test-spec.ts)_
1198
+ FLAGS
1199
+ -i, --mcp-server-id=<value> (required) ID of the MCP server to fetch assets from.
1200
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
1201
+ configuration variable is already set.
1202
+ --api-version=<value> Override the api version used for api requests made by this command
1203
+
1204
+ GLOBAL FLAGS
1205
+ --flags-dir=<value> Import flag values from a directory.
1206
+ --json Format output as json.
1207
+
1208
+ DESCRIPTION
1209
+ Fetch the live assets (tools, prompts, resources) advertised by an MCP server.
1210
+
1211
+ Performs a live fetch against the configured MCP server identified by its ID, returning the assets (MCP tools,
1212
+ prompts, and resources) it currently advertises along with their status and activation state. Use this to refresh the
1213
+ view of what an MCP server exposes before activating its assets as agent actions.
1214
+
1215
+ EXAMPLES
1216
+ Fetch the assets advertised by an MCP server in the default target org:
1217
+
1218
+ $ sf agent mcp fetch --target-org myOrg --mcp-server-id 0XSxx0000000001
1219
+
1220
+ Fetch MCP server assets and output as JSON:
1221
+
1222
+ $ sf agent mcp fetch --target-org myOrg --mcp-server-id 0XSxx0000000001 --json
1223
+ ```
1224
+
1225
+ _See code: [src/commands/agent/mcp/fetch.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/fetch.ts)_
1226
+
1227
+ ## `sf agent mcp get`
1228
+
1229
+ Get a single MCP server registered in the API Catalog.
1230
+
1231
+ ```
1232
+ USAGE
1233
+ $ sf agent mcp get -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>]
1234
+
1235
+ FLAGS
1236
+ -i, --mcp-server-id=<value> (required) The identifier of the MCP server to retrieve.
1237
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
1238
+ configuration variable is already set.
1239
+ --api-version=<value> Override the api version used for api requests made by this command
1240
+
1241
+ GLOBAL FLAGS
1242
+ --flags-dir=<value> Import flag values from a directory.
1243
+ --json Format output as json.
1244
+
1245
+ DESCRIPTION
1246
+ Get a single MCP server registered in the API Catalog.
1247
+
1248
+ Retrieves the details of an MCP (Model Context Protocol) server by its identifier, including its name, label, type,
1249
+ status, and server URL.
1250
+
1251
+ EXAMPLES
1252
+ Get an MCP server by id in the default target org:
1253
+
1254
+ $ sf agent mcp get --target-org myOrg --mcp-server-id 0Mx000000000001
1255
+
1256
+ Get an MCP server and output as JSON:
1257
+
1258
+ $ sf agent mcp get --target-org myOrg --mcp-server-id 0Mx000000000001 --json
1259
+ ```
1260
+
1261
+ _See code: [src/commands/agent/mcp/get.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/get.ts)_
1262
+
1263
+ ## `sf agent mcp list`
1264
+
1265
+ List the MCP servers registered in the API Catalog.
1266
+
1267
+ ```
1268
+ USAGE
1269
+ $ sf agent mcp list -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [--label <value>] [--type
1270
+ EXTERNAL] [--status ACTIVE|DISCONNECTED]
1271
+
1272
+ FLAGS
1273
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
1274
+ configuration variable is already set.
1275
+ --api-version=<value> Override the api version used for api requests made by this command
1276
+ --label=<value> Filter the MCP servers by label.
1277
+ --status=<option> Filter the MCP servers by connection status. Only ACTIVE and DISCONNECTED are supported as
1278
+ filters.
1279
+ <options: ACTIVE|DISCONNECTED>
1280
+ --type=<option> Filter the MCP servers by type.
1281
+ <options: EXTERNAL>
1282
+
1283
+ GLOBAL FLAGS
1284
+ --flags-dir=<value> Import flag values from a directory.
1285
+ --json Format output as json.
1286
+
1287
+ DESCRIPTION
1288
+ List the MCP servers registered in the API Catalog.
1289
+
1290
+ Returns the Model Context Protocol (MCP) servers registered in the API Catalog, optionally filtered by label, type, or
1291
+ status. Use this to discover which MCP servers are available and inspect their server URLs and current status.
1292
+
1293
+ EXAMPLES
1294
+ List all MCP servers in the default target org:
1295
+
1296
+ $ sf agent mcp list --target-org myOrg
1297
+
1298
+ List external MCP servers filtered by status and output as JSON:
1299
+
1300
+ $ sf agent mcp list --target-org myOrg --type EXTERNAL --status ACTIVE --json
1301
+ ```
1302
+
1303
+ _See code: [src/commands/agent/mcp/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/list.ts)_
1304
+
1305
+ ## `sf agent mcp update`
1306
+
1307
+ Update an MCP server registered in the API Catalog.
1308
+
1309
+ ```
1310
+ USAGE
1311
+ $ sf agent mcp update -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [--label <value>]
1312
+ [--description <value>] [--server-url <value>] [--auth-type OAUTH|NO_AUTH] [--identity-provider <value>]
1313
+ [--client-id <value>] [--client-secret <value>] [--scope <value>]
1314
+
1315
+ FLAGS
1316
+ -i, --mcp-server-id=<value> (required) ID of the MCP server to update.
1317
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
1318
+ configuration variable is already set.
1319
+ --api-version=<value> Override the api version used for api requests made by this command
1320
+ --auth-type=<option> Authorization type to apply to the MCP server (OAUTH or NO_AUTH).
1321
+ <options: OAUTH|NO_AUTH>
1322
+ --client-id=<value> OAuth client ID (required when --auth-type is OAUTH).
1323
+ --client-secret=<value> OAuth client secret (required when --auth-type is OAUTH). Pass "-" to read it from
1324
+ stdin (piped) and keep it out of shell history.
1325
+ --description=<value> New description for the MCP server.
1326
+ --identity-provider=<value> Identity provider name for OAuth authorization (required when --auth-type is OAUTH).
1327
+ --label=<value> New display label for the MCP server.
1328
+ --scope=<value> OAuth scope (required when --auth-type is OAUTH).
1329
+ --server-url=<value> New endpoint URL of the MCP server.
1330
+
1331
+ GLOBAL FLAGS
1332
+ --flags-dir=<value> Import flag values from a directory.
1333
+ --json Format output as json.
1334
+
1335
+ DESCRIPTION
1336
+ Update an MCP server registered in the API Catalog.
1337
+
1338
+ Updates an existing MCP server in the API Catalog. Only the fields you provide are changed; omitted fields are left
1339
+ untouched. You can update the label, description, and server URL, and replace the authorization configuration. When
1340
+ setting `--auth-type OAUTH`, you must also provide `--identity-provider`, `--client-id`, `--client-secret`, and
1341
+ `--scope`. When setting `--auth-type NO_AUTH`, no authorization credentials are required. At least one updatable field
1342
+ must be supplied.
1343
+
1344
+ EXAMPLES
1345
+ Update the label and description of an MCP server in the default target org:
1346
+
1347
+ $ sf agent mcp update --mcp-server-id 0XSxx0000000001 --label "Orders MCP" --description "Order tooling" \
1348
+ --target-org myOrg
1349
+
1350
+ Update the server URL and switch the authorization to OAuth, piping the client secret from stdin and outputting as JSON:
1351
+ cat secret.txt | sf agent mcp update --mcp-server-id 0XSxx0000000001 --server-url https://mcp.example.com --auth-type OAUTH --identity-provider MyIdp --client-id abc --client-secret - --scope "read write" --target-org myOrg --json
1352
+ ```
1353
+
1354
+ _See code: [src/commands/agent/mcp/update.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/update.ts)_
954
1355
 
955
1356
  ## `sf agent preview`
956
1357
 
@@ -959,19 +1360,20 @@ Interact with an agent to preview how it responds to your statements, questions,
959
1360
  ```
960
1361
  USAGE
961
1362
  $ sf agent preview -o <value> [--flags-dir <value>] [--api-version <value>] [-n <value>] [--authoring-bundle
962
- <value>] [-d <value>] [-x] [--use-live-actions]
1363
+ <value>] [-d <value>] [-x] [--use-live-actions] [--context-variables <value>...]
963
1364
 
964
1365
  FLAGS
965
- -d, --output-dir=<value> Directory where conversation transcripts are saved.
966
- -n, --api-name=<value> API name of the activated published agent you want to interact with.
967
- -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
968
- configuration variable is already set.
969
- -x, --apex-debug Enable Apex debug logging during the agent preview conversation.
970
- --api-version=<value> Override the api version used for api requests made by this command
971
- --authoring-bundle=<value> API name of the authoring bundle metadata component that contains the agent's Agent
972
- Script file.
973
- --use-live-actions Use real actions in the org; if not specified, preview uses AI to simulate (mock)
974
- actions.
1366
+ -d, --output-dir=<value> Directory where conversation transcripts are saved.
1367
+ -n, --api-name=<value> API name of the activated published agent you want to interact with.
1368
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
1369
+ configuration variable is already set.
1370
+ -x, --apex-debug Enable Apex debug logging during the agent preview conversation.
1371
+ --api-version=<value> Override the api version used for api requests made by this command
1372
+ --authoring-bundle=<value> API name of the authoring bundle metadata component that contains the agent's
1373
+ Agent Script file.
1374
+ --context-variables=<value>... Session variables for the agent preview session, in the form Name=Value.
1375
+ --use-live-actions Use real actions in the org; if not specified, preview uses AI to simulate (mock)
1376
+ actions.
975
1377
 
976
1378
  GLOBAL FLAGS
977
1379
  --flags-dir=<value> Import flag values from a directory.
@@ -1021,9 +1423,30 @@ EXAMPLES
1021
1423
  "./transcripts/my-preview" directory, enable the Apex debug logs, and use your default org:
1022
1424
 
1023
1425
  $ sf agent preview --use-live-actions --apex-debug --output-dir transcripts/my-preview
1426
+
1427
+ FLAG DESCRIPTIONS
1428
+ --context-variables=<value>... Session variables for the agent preview session, in the form Name=Value.
1429
+
1430
+ Sets variables on the agent preview session, mirroring what the in-org Agentforce Builder UI does when you override
1431
+ variables before sending a message. Specify this flag multiple times or use comma-separated values. Two namespaces
1432
+ are supported, distinguished by the name shape. Names pass through to the runtime verbatim — the CLI doesn't
1433
+ transform them.
1434
+
1435
+ Linked context variables use the "$Context." prefix. These map to externally-provided fields that the runtime
1436
+ resolves (declared in the bundle's globalConfiguration.contextVariables) and are read by live actions and
1437
+ topic-routing expressions via $Context.Name. Example: $Context.MyLinkedVar=some-value.
1438
+
1439
+ State variables use the bare developerName, no prefix. These seed mutable agent state declared in
1440
+ agentVersion.stateVariables. Example: MyStateVar=some-value.
1441
+
1442
+ Both namespaces can be mixed in one value. Example: --context-variables '$Context.MyLinkedVar=foo,MyStateVar=bar'.
1443
+
1444
+ Tips: (1) Quote the whole value in single quotes so $Context isn't shell-expanded. (2) Names are sent verbatim — a
1445
+ bare name is treated as a state variable, not a linked context variable, so live actions that bind via $Context.Name
1446
+ will see null. (3) Type defaults to Text.
1024
1447
  ```
1025
1448
 
1026
- _See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/preview.ts)_
1449
+ _See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/preview.ts)_
1027
1450
 
1028
1451
  ## `sf agent preview end`
1029
1452
 
@@ -1095,7 +1518,7 @@ EXAMPLES
1095
1518
  $ sf agent preview end --all --target-org <target_org>
1096
1519
  ```
1097
1520
 
1098
- _See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/preview/end.ts)_
1521
+ _See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/preview/end.ts)_
1099
1522
 
1100
1523
  ## `sf agent preview send`
1101
1524
 
@@ -1153,7 +1576,7 @@ EXAMPLES
1153
1576
  $ sf agent preview send --utterance "what can you help me with?" --authoring-bundle My_Local_Agent
1154
1577
  ```
1155
1578
 
1156
- _See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/preview/send.ts)_
1579
+ _See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/preview/send.ts)_
1157
1580
 
1158
1581
  ## `sf agent preview sessions`
1159
1582
 
@@ -1186,7 +1609,7 @@ EXAMPLES
1186
1609
  $ sf agent preview sessions
1187
1610
  ```
1188
1611
 
1189
- _See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/preview/sessions.ts)_
1612
+ _See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/preview/sessions.ts)_
1190
1613
 
1191
1614
  ## `sf agent preview start`
1192
1615
 
@@ -1195,19 +1618,20 @@ Start a programmatic agent preview session.
1195
1618
  ```
1196
1619
  USAGE
1197
1620
  $ sf agent preview start -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-n <value>]
1198
- [--authoring-bundle <value>] [--use-live-actions | --simulate-actions]
1621
+ [--authoring-bundle <value>] [--use-live-actions | --simulate-actions] [--context-variables <value>...]
1199
1622
 
1200
1623
  FLAGS
1201
- -n, --api-name=<value> API name of the activated published agent you want to preview.
1202
- -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
1203
- configuration variable is already set.
1204
- --api-version=<value> Override the api version used for api requests made by this command
1205
- --authoring-bundle=<value> API name of the authoring bundle metadata component that contains the agent's Agent
1206
- Script file.
1207
- --simulate-actions Use AI to simulate action execution instead of calling real actions. Required with
1208
- --authoring-bundle.
1209
- --use-live-actions Execute real actions in the org (Apex classes, flows, etc.). Required with
1210
- --authoring-bundle.
1624
+ -n, --api-name=<value> API name of the activated published agent you want to preview.
1625
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
1626
+ configuration variable is already set.
1627
+ --api-version=<value> Override the api version used for api requests made by this command
1628
+ --authoring-bundle=<value> API name of the authoring bundle metadata component that contains the agent's
1629
+ Agent Script file.
1630
+ --context-variables=<value>... Session variables for the agent preview session, in the form Name=Value.
1631
+ --simulate-actions Use AI to simulate action execution instead of calling real actions. Required with
1632
+ --authoring-bundle.
1633
+ --use-live-actions Execute real actions in the org (Apex classes, flows, etc.). Required with
1634
+ --authoring-bundle.
1211
1635
 
1212
1636
  GLOBAL FLAGS
1213
1637
  --flags-dir=<value> Import flag values from a directory.
@@ -1249,9 +1673,30 @@ EXAMPLES
1249
1673
  Start a preview session with an activated published agent (always uses live actions):
1250
1674
 
1251
1675
  $ sf agent preview start --api-name My_Published_Agent
1676
+
1677
+ FLAG DESCRIPTIONS
1678
+ --context-variables=<value>... Session variables for the agent preview session, in the form Name=Value.
1679
+
1680
+ Sets variables on the agent preview session, mirroring what the in-org Agentforce Builder UI does when you override
1681
+ variables before sending a message. Specify this flag multiple times or use comma-separated values. Two namespaces
1682
+ are supported, distinguished by the name shape. Names pass through to the runtime verbatim — the CLI doesn't
1683
+ transform them.
1684
+
1685
+ Linked context variables use the "$Context." prefix. These map to externally-provided fields that the runtime
1686
+ resolves (declared in the bundle's globalConfiguration.contextVariables) and are read by live actions and
1687
+ topic-routing expressions via $Context.Name. Example: $Context.MyLinkedVar=some-value.
1688
+
1689
+ State variables use the bare developerName, no prefix. These seed mutable agent state declared in
1690
+ agentVersion.stateVariables. Example: MyStateVar=some-value.
1691
+
1692
+ Both namespaces can be mixed in one value. Example: --context-variables '$Context.MyLinkedVar=foo,MyStateVar=bar'.
1693
+
1694
+ Tips: (1) Quote the whole value in single quotes so $Context isn't shell-expanded. (2) Names are sent verbatim — a
1695
+ bare name is treated as a state variable, not a linked context variable, so live actions that bind via $Context.Name
1696
+ will see null. (3) Type defaults to Text.
1252
1697
  ```
1253
1698
 
1254
- _See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/preview/start.ts)_
1699
+ _See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/preview/start.ts)_
1255
1700
 
1256
1701
  ## `sf agent publish authoring-bundle`
1257
1702
 
@@ -1311,7 +1756,7 @@ EXAMPLES
1311
1756
  $ sf agent publish authoring-bundle --api-name MyAuthoringbundle --concise
1312
1757
  ```
1313
1758
 
1314
- _See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/publish/authoring-bundle.ts)_
1759
+ _See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/publish/authoring-bundle.ts)_
1315
1760
 
1316
1761
  ## `sf agent test create`
1317
1762
 
@@ -1383,7 +1828,7 @@ FLAG DESCRIPTIONS
1383
1828
  metadata. 'testing-center' uses AiEvaluationDefinition metadata.
1384
1829
  ```
1385
1830
 
1386
- _See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/test/create.ts)_
1831
+ _See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/test/create.ts)_
1387
1832
 
1388
1833
  ## `sf agent test list`
1389
1834
 
@@ -1418,7 +1863,7 @@ EXAMPLES
1418
1863
  $ sf agent test list --target-org my-org
1419
1864
  ```
1420
1865
 
1421
- _See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/test/list.ts)_
1866
+ _See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/test/list.ts)_
1422
1867
 
1423
1868
  ## `sf agent test results`
1424
1869
 
@@ -1494,7 +1939,7 @@ FLAG DESCRIPTIONS
1494
1939
  expression when using custom evaluations.
1495
1940
  ```
1496
1941
 
1497
- _See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/test/results.ts)_
1942
+ _See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/test/results.ts)_
1498
1943
 
1499
1944
  ## `sf agent test resume`
1500
1945
 
@@ -1578,7 +2023,7 @@ FLAG DESCRIPTIONS
1578
2023
  expression when using custom evaluations.
1579
2024
  ```
1580
2025
 
1581
- _See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/test/resume.ts)_
2026
+ _See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/test/resume.ts)_
1582
2027
 
1583
2028
  ## `sf agent test run`
1584
2029
 
@@ -1662,7 +2107,7 @@ FLAG DESCRIPTIONS
1662
2107
  expression when using custom evaluations.
1663
2108
  ```
1664
2109
 
1665
- _See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/test/run.ts)_
2110
+ _See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/test/run.ts)_
1666
2111
 
1667
2112
  ## `sf agent test run-eval`
1668
2113
 
@@ -1738,7 +2183,7 @@ EXAMPLES
1738
2183
  $ echo '{"tests":[...]}' | sf agent test run-eval --spec --target-org my-org
1739
2184
  ```
1740
2185
 
1741
- _See code: [src/commands/agent/test/run-eval.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/test/run-eval.ts)_
2186
+ _See code: [src/commands/agent/test/run-eval.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/test/run-eval.ts)_
1742
2187
 
1743
2188
  ## `sf agent trace delete`
1744
2189
 
@@ -1802,7 +2247,7 @@ EXAMPLES
1802
2247
  $ sf agent trace delete --no-prompt
1803
2248
  ```
1804
2249
 
1805
- _See code: [src/commands/agent/trace/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/trace/delete.ts)_
2250
+ _See code: [src/commands/agent/trace/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/trace/delete.ts)_
1806
2251
 
1807
2252
  ## `sf agent trace list`
1808
2253
 
@@ -1872,7 +2317,7 @@ FLAG DESCRIPTIONS
1872
2317
  (2026-04-20T14:00:00.000Z). The "Recorded At" values shown in the table output are valid inputs.
1873
2318
  ```
1874
2319
 
1875
- _See code: [src/commands/agent/trace/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/trace/list.ts)_
2320
+ _See code: [src/commands/agent/trace/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/trace/list.ts)_
1876
2321
 
1877
2322
  ## `sf agent trace read`
1878
2323
 
@@ -1960,7 +2405,7 @@ EXAMPLES
1960
2405
  $ sf agent trace read --session-id <SESSION_ID> --json
1961
2406
  ```
1962
2407
 
1963
- _See code: [src/commands/agent/trace/read.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/trace/read.ts)_
2408
+ _See code: [src/commands/agent/trace/read.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/trace/read.ts)_
1964
2409
 
1965
2410
  ## `sf agent validate authoring-bundle`
1966
2411
 
@@ -2007,6 +2452,6 @@ EXAMPLES
2007
2452
  $ sf agent validate authoring-bundle --api-name MyAuthoringBundle --target-org my-dev-org
2008
2453
  ```
2009
2454
 
2010
- _See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.42.1/src/commands/agent/validate/authoring-bundle.ts)_
2455
+ _See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/validate/authoring-bundle.ts)_
2011
2456
 
2012
2457
  <!-- commandsstop -->