@salesforce/afv-skills 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/package.json +6 -5
  2. package/skills/accessing-webapp-data/SKILL.md +178 -0
  3. package/skills/agentforce-development/SKILL.md +427 -0
  4. package/skills/agentforce-development/assets/README-legacy.md +89 -0
  5. package/skills/agentforce-development/assets/agent-spec-template.md +90 -0
  6. package/skills/agentforce-development/assets/agents/README.md +45 -0
  7. package/skills/agentforce-development/assets/agents/hello-world.agent +60 -0
  8. package/skills/agentforce-development/assets/agents/multi-topic.agent +105 -0
  9. package/skills/agentforce-development/assets/agents/production-faq.agent +101 -0
  10. package/skills/agentforce-development/assets/agents/production-faq.bundle-meta.xml +4 -0
  11. package/skills/agentforce-development/assets/agents/simple-qa.agent +72 -0
  12. package/skills/agentforce-development/assets/apex/models-api-queueable.cls +225 -0
  13. package/skills/agentforce-development/assets/bundle-meta.xml +23 -0
  14. package/skills/agentforce-development/assets/components/apex-action.agent +52 -0
  15. package/skills/agentforce-development/assets/components/error-handling.agent +58 -0
  16. package/skills/agentforce-development/assets/components/escalation-setup.agent +169 -0
  17. package/skills/agentforce-development/assets/components/flow-action.agent +66 -0
  18. package/skills/agentforce-development/assets/components/n-ary-conditions.agent +110 -0
  19. package/skills/agentforce-development/assets/components/topic-with-actions.agent +40 -0
  20. package/skills/agentforce-development/assets/deterministic-routing.agent +166 -0
  21. package/skills/agentforce-development/assets/escalation-pattern.agent +209 -0
  22. package/skills/agentforce-development/assets/flow-action-lookup.agent +115 -0
  23. package/skills/agentforce-development/assets/hub-and-spoke.agent +104 -0
  24. package/skills/agentforce-development/assets/invocable-apex-template.cls +187 -0
  25. package/skills/agentforce-development/assets/local-info-agent-annotated.agent +355 -0
  26. package/skills/agentforce-development/assets/metadata/basic-prompt-template.promptTemplate-meta.xml +109 -0
  27. package/skills/agentforce-development/assets/metadata/genai-function-apex.xml +92 -0
  28. package/skills/agentforce-development/assets/metadata/genai-function-flow.xml +57 -0
  29. package/skills/agentforce-development/assets/metadata/genai-plugin.xml +72 -0
  30. package/skills/agentforce-development/assets/metadata/http-callout-flow.flow-meta.xml +348 -0
  31. package/skills/agentforce-development/assets/metadata/record-grounded-prompt.promptTemplate-meta.xml +136 -0
  32. package/skills/agentforce-development/assets/minimal-starter.agent +42 -0
  33. package/skills/agentforce-development/assets/patterns/README.md +254 -0
  34. package/skills/agentforce-development/assets/patterns/action-callbacks.agent +178 -0
  35. package/skills/agentforce-development/assets/patterns/advanced-input-bindings.agent +141 -0
  36. package/skills/agentforce-development/assets/patterns/bidirectional-routing.agent +156 -0
  37. package/skills/agentforce-development/assets/patterns/critical-input-collection.agent +244 -0
  38. package/skills/agentforce-development/assets/patterns/delegation-routing.agent +89 -0
  39. package/skills/agentforce-development/assets/patterns/lifecycle-events.agent +127 -0
  40. package/skills/agentforce-development/assets/patterns/llm-controlled-actions.agent +184 -0
  41. package/skills/agentforce-development/assets/patterns/multi-step-workflow.agent +282 -0
  42. package/skills/agentforce-development/assets/patterns/open-gate-routing.agent +286 -0
  43. package/skills/agentforce-development/assets/patterns/procedural-instructions.agent +273 -0
  44. package/skills/agentforce-development/assets/patterns/prompt-template-action.agent +188 -0
  45. package/skills/agentforce-development/assets/patterns/system-instruction-overrides.agent +293 -0
  46. package/skills/agentforce-development/assets/prompt-rag-search.agent +131 -0
  47. package/skills/agentforce-development/assets/template-multi-topic.agent +160 -0
  48. package/skills/agentforce-development/assets/template-single-topic.agent +81 -0
  49. package/skills/agentforce-development/assets/verification-gate.agent +208 -0
  50. package/skills/agentforce-development/references/action-prompt-templates.md +164 -0
  51. package/skills/agentforce-development/references/actions-reference.md +592 -0
  52. package/skills/agentforce-development/references/agent-access-guide.md +72 -0
  53. package/skills/agentforce-development/references/agent-design-and-spec-creation.md +1010 -0
  54. package/skills/agentforce-development/references/agent-metadata-and-lifecycle.md +575 -0
  55. package/skills/agentforce-development/references/agent-script-core-language.md +1218 -0
  56. package/skills/agentforce-development/references/agent-topic-map-diagrams.md +323 -0
  57. package/skills/agentforce-development/references/agent-user-setup.md +526 -0
  58. package/skills/agentforce-development/references/agent-validation-and-debugging.md +803 -0
  59. package/skills/agentforce-development/references/known-issues.md +353 -0
  60. package/skills/agentforce-development/references/minimal-examples.md +67 -0
  61. package/skills/agentforce-development/references/production-gotchas.md +279 -0
  62. package/skills/agentforce-development/references/salesforce-cli-for-agents.md +393 -0
  63. package/skills/agentforce-development/references/version-history.md +23 -0
  64. package/skills/building-webapp-data-visualization/SKILL.md +72 -0
  65. package/skills/building-webapp-data-visualization/implementation/bar-line-chart.md +316 -0
  66. package/skills/building-webapp-data-visualization/implementation/dashboard-layout.md +189 -0
  67. package/skills/building-webapp-data-visualization/implementation/donut-chart.md +181 -0
  68. package/skills/building-webapp-data-visualization/implementation/stat-card.md +150 -0
  69. package/skills/building-webapp-react-components/SKILL.md +96 -0
  70. package/skills/building-webapp-react-components/implementation/component.md +78 -0
  71. package/skills/building-webapp-react-components/implementation/header-footer.md +132 -0
  72. package/skills/building-webapp-react-components/implementation/page.md +93 -0
  73. package/skills/configuring-webapp-csp-trusted-sites/SKILL.md +90 -0
  74. package/skills/configuring-webapp-csp-trusted-sites/implementation/metadata-format.md +281 -0
  75. package/skills/configuring-webapp-metadata/SKILL.md +158 -0
  76. package/skills/creating-webapp/SKILL.md +141 -0
  77. package/skills/deploying-webapp-to-salesforce/SKILL.md +229 -0
  78. package/skills/exploring-webapp-graphql-schema/SKILL.md +149 -0
  79. package/skills/fetching-webapp-rest-api/SKILL.md +167 -0
  80. package/skills/{salesforce-custom-application → generating-custom-application}/SKILL.md +2 -4
  81. package/skills/{salesforce-custom-field → generating-custom-field}/SKILL.md +1 -5
  82. package/skills/{salesforce-custom-lightning-type → generating-custom-lightning-type}/SKILL.md +36 -2
  83. package/skills/{salesforce-custom-object → generating-custom-object}/SKILL.md +1 -1
  84. package/skills/generating-custom-tab/SKILL.md +154 -0
  85. package/skills/generating-experience-lwr-site/SKILL.md +196 -0
  86. package/skills/generating-experience-lwr-site/docs/bootstrap-template-byo-lwr.md +224 -0
  87. package/skills/generating-experience-lwr-site/docs/configure-content-brandingSet.md +131 -0
  88. package/skills/generating-experience-lwr-site/docs/configure-content-route.md +232 -0
  89. package/skills/generating-experience-lwr-site/docs/configure-content-themeLayout.md +141 -0
  90. package/skills/generating-experience-lwr-site/docs/configure-content-view.md +233 -0
  91. package/skills/generating-experience-lwr-site/docs/configure-guest-sharing-rules.md +42 -0
  92. package/skills/generating-experience-lwr-site/docs/handle-component-and-region-ids.md +27 -0
  93. package/skills/generating-experience-lwr-site/docs/handle-ui-components.md +215 -0
  94. package/skills/generating-experience-react-site/SKILL.md +67 -0
  95. package/skills/generating-experience-react-site/docs/configure-metadata-custom-site.md +41 -0
  96. package/skills/generating-experience-react-site/docs/configure-metadata-digital-experience-bundle.md +17 -0
  97. package/skills/generating-experience-react-site/docs/configure-metadata-digital-experience-config.md +21 -0
  98. package/skills/generating-experience-react-site/docs/configure-metadata-digital-experience.md +38 -0
  99. package/skills/generating-experience-react-site/docs/configure-metadata-network.md +72 -0
  100. package/skills/{salesforce-flexipage → generating-flexipage}/SKILL.md +86 -9
  101. package/skills/{salesforce-flow → generating-flow}/SKILL.md +3 -3
  102. package/skills/generating-fragment/SKILL.md +117 -0
  103. package/skills/generating-lightning-app/SKILL.md +423 -0
  104. package/skills/{salesforce-list-view → generating-list-view}/SKILL.md +1 -1
  105. package/skills/generating-permission-set/SKILL.md +174 -0
  106. package/skills/{salesforce-validation-rule → generating-validation-rule}/SKILL.md +1 -1
  107. package/skills/generating-webapp-graphql-mutation-query/SKILL.md +258 -0
  108. package/skills/generating-webapp-graphql-read-query/SKILL.md +253 -0
  109. package/skills/implementing-webapp-file-upload/SKILL.md +396 -0
  110. package/skills/installing-webapp-features/SKILL.md +210 -0
  111. package/skills/managing-webapp-agentforce-conversation-client/SKILL.md +186 -0
  112. package/skills/managing-webapp-agentforce-conversation-client/references/constraints.md +134 -0
  113. package/skills/managing-webapp-agentforce-conversation-client/references/examples.md +132 -0
  114. package/skills/managing-webapp-agentforce-conversation-client/references/style-tokens.md +101 -0
  115. package/skills/managing-webapp-agentforce-conversation-client/references/troubleshooting.md +57 -0
  116. package/skills/switching-org/SKILL.md +28 -0
  117. package/skills/using-webapp-graphql/SKILL.md +324 -0
  118. package/skills/using-webapp-graphql/shared-schema.graphqls +1150 -0
  119. package/skills/apex-class/SKILL.md +0 -253
  120. package/skills/apex-class/examples/AccountDeduplicationBatch.cls +0 -148
  121. package/skills/apex-class/examples/AccountSelector.cls +0 -193
  122. package/skills/apex-class/examples/AccountService.cls +0 -201
  123. package/skills/apex-class/templates/abstract.cls +0 -128
  124. package/skills/apex-class/templates/batch.cls +0 -125
  125. package/skills/apex-class/templates/domain.cls +0 -102
  126. package/skills/apex-class/templates/dto.cls +0 -108
  127. package/skills/apex-class/templates/exception.cls +0 -51
  128. package/skills/apex-class/templates/interface.cls +0 -25
  129. package/skills/apex-class/templates/queueable.cls +0 -92
  130. package/skills/apex-class/templates/schedulable.cls +0 -75
  131. package/skills/apex-class/templates/selector.cls +0 -92
  132. package/skills/apex-class/templates/service.cls +0 -69
  133. package/skills/apex-class/templates/utility.cls +0 -97
  134. package/skills/apex-test-class/SKILL.md +0 -101
  135. package/skills/apex-test-class/references/assertion-patterns.md +0 -209
  136. package/skills/apex-test-class/references/async-testing.md +0 -276
  137. package/skills/apex-test-class/references/mocking-patterns.md +0 -219
  138. package/skills/apex-test-class/references/test-data-factory.md +0 -176
  139. package/skills/deployment-readiness-check/SKILL.md +0 -257
  140. package/skills/deployment-readiness-check/assets/deployment_checklist.md +0 -286
  141. package/skills/deployment-readiness-check/references/rollback_procedures.md +0 -308
  142. package/skills/deployment-readiness-check/scripts/check_metadata.sh +0 -207
  143. package/skills/salesforce-custom-tab/SKILL.md +0 -78
  144. package/skills/salesforce-experience-site/SKILL.md +0 -178
  145. package/skills/salesforce-fragment/SKILL.md +0 -42
  146. package/skills/salesforce-lightning-app-build/SKILL.md +0 -254
  147. package/skills/salesforce-web-app-creating-records/SKILL.md +0 -84
  148. package/skills/salesforce-web-app-feature/SKILL.md +0 -70
  149. package/skills/salesforce-web-app-list-and-create-records/SKILL.md +0 -36
  150. package/skills/salesforce-web-application/SKILL.md +0 -34
@@ -0,0 +1,353 @@
1
+ # Known Issues Tracker
2
+
3
+ Unresolved platform bugs, limitations, and edge cases that affect Agent Script development. Unlike the "Common Issues & Fixes" table in SKILL.md (which covers resolved troubleshooting), this file tracks **open platform issues** where the root cause is in Salesforce, not in user code.
4
+
5
+ ---
6
+
7
+ ## Issue Template
8
+
9
+ ```markdown
10
+ ## Issue N: [Title]
11
+ - **Status**: OPEN | RESOLVED | WORKAROUND
12
+ - **Date Discovered**: YYYY-MM-DD
13
+ - **Affects**: [Component/workflow affected]
14
+ - **Symptom**: What the user sees
15
+ - **Root Cause**: Why it happens (if known)
16
+ - **Workaround**: How to get around it
17
+ - **Open Questions**: What we still don't know
18
+ - **References**: Links to related docs, issues, or discussions
19
+ ```
20
+
21
+ ---
22
+
23
+ ## Open Issues
24
+
25
+ ### Issue 1: Agent test files block `force-app` deployment
26
+ - **Status**: WORKAROUND
27
+ - **Date Discovered**: 2026-01-20
28
+ - **Affects**: `sf project deploy start --source-dir force-app`
29
+ - **Symptom**: Deployment hangs for 2+ minutes or times out when `AiEvaluationDefinition` metadata files exist under `force-app/`. The deploy may eventually succeed but with excessive wait times.
30
+ - **Root Cause**: `AiEvaluationDefinition` metadata type triggers server-side processing that blocks the deployment pipeline. The metadata type is not well-suited for source-dir deploys.
31
+ - **Workaround**: Move test definitions to a separate directory outside the main deploy path, or use `--metadata` flag to deploy specific types instead of `--source-dir`.
32
+ ```bash
33
+ # Instead of:
34
+ sf project deploy start --source-dir force-app -o TARGET_ORG
35
+
36
+ # Use targeted deployment:
37
+ sf project deploy start --metadata AiAuthoringBundle:MyAgent -o TARGET_ORG
38
+ ```
39
+ - **Open Questions**: Will Salesforce optimize `AiEvaluationDefinition` deploy performance in a future release?
40
+
41
+ ---
42
+
43
+ ### Issue 2: `sf agent publish` fails with namespace prefix on `apex://` targets
44
+ - **Status**: OPEN
45
+ - **Date Discovered**: 2026-02-01
46
+ - **Affects**: Namespaced orgs using `apex://` action targets
47
+ - **Symptom**: `sf agent publish authoring-bundle` fails with "invocable action does not exist" error, despite the Apex class being deployed and confirmed via SOQL query.
48
+ - **Root Cause**: Unknown. Unclear whether `apex://ClassName` or `apex://ns__ClassName` is the correct format in namespaced orgs. The publish step may not resolve namespace prefixes the same way as standard metadata deployment.
49
+ - **Workaround**: None confirmed. Potential approaches to try:
50
+ 1. Use `apex://ns__ClassName` format
51
+ 2. Use unmanaged classes (no namespace)
52
+ 3. Wrap Apex in a Flow and use `flow://` target instead
53
+ - **Open Questions**:
54
+ - Does `apex://ns__ClassName` work?
55
+ - Is this a bug or by-design limitation?
56
+ - Does the same issue affect `flow://` targets with namespaced Flows?
57
+
58
+ ---
59
+
60
+ ### Issue 3: Agent packaging workflow unclear
61
+ - **Status**: OPEN
62
+ - **Date Discovered**: 2026-02-05
63
+ - **Affects**: ISV partners, AppExchange distribution
64
+ - **Symptom**: No documented way to package Agent Script agents for distribution. The `AiAuthoringBundle` metadata type has no known packaging equivalent to `BotTemplate`.
65
+ - **Root Cause**: Agent Script is newer than the packaging system. Salesforce has not published ISV packaging guidance for `.agent` files.
66
+ - **Workaround**: None. Current options:
67
+ 1. Distribute as source code (customer deploys manually)
68
+ 2. Use unlocked packages (may include `.agent` files but subscriber customization is untested)
69
+ 3. Convert to Agent Builder UI (GenAiPlannerBundle) for packaging — loses Agent Script benefits
70
+ - **Open Questions**:
71
+ - Will `AiAuthoringBundle` be supported in 2GP managed packages?
72
+ - Can subscribers modify `.agent` files post-install?
73
+ - Is there a roadmap item for Agent Script packaging?
74
+
75
+ ---
76
+
77
+ ### Issue 4: Legacy `sf bot` CLI commands incompatible with Agent Script
78
+ - **Status**: OPEN
79
+ - **Date Discovered**: 2026-01-25
80
+ - **Affects**: Users migrating from Einstein Bots to Agent Script
81
+ - **Symptom**: Old `sf bot` and `sf bot version` commands were removed in sf CLI v2 — these commands no longer exist, not just "don't recognize Agent Script". Running any `sf bot` command returns "Command not found".
82
+ - **Root Cause**: The `sf bot` command family was deprecated and removed in sf CLI v2. It targeted `BotDefinition`/`BotVersion` metadata types. Agent Script uses `AiAuthoringBundle`, a completely separate metadata structure.
83
+ - **Workaround**: Use `sf agent` commands exclusively for Agent Script:
84
+ ```bash
85
+ # ❌ Old commands (don't work with Agent Script):
86
+ sf bot list
87
+ sf bot version list
88
+
89
+ # ✅ New commands (for Agent Script):
90
+ sf project retrieve start --metadata Agent:MyAgent
91
+ sf agent validate authoring-bundle --api-name MyAgent
92
+ sf agent publish authoring-bundle --api-name MyAgent
93
+ ```
94
+ - **Open Questions**: Will Salesforce unify the `sf bot` and `sf agent` command families?
95
+
96
+ ---
97
+
98
+ ### Issue 5: Agent tests cannot be deployed/retrieved for source control
99
+ - **Status**: OPEN
100
+ - **Date Discovered**: 2026-02-06
101
+ - **Affects**: CI/CD pipelines, test version control
102
+ - **Symptom**: Tests created in the Agent Testing Center UI cannot be retrieved via `sf project retrieve start`. Old test XML format references `bot`/`version` fields that don't exist in Agent Script. No metadata type or CLI command exists for new-style agent tests.
103
+ - **Root Cause**: The Agent Testing Center was originally built for Einstein Bots. The test metadata schema hasn't been updated for Agent Script's `AiAuthoringBundle` structure. The `AiEvaluationDefinition` type exists but doesn't correspond to the Testing Center's UI-created tests.
104
+ - **Workaround**:
105
+ 1. Use YAML test spec files managed in source control (see `/sf-ai-agentforce-testing` skill)
106
+ 2. Treat UI-created tests as ephemeral / org-specific
107
+ 3. Use the Connect API directly to run tests programmatically
108
+ - **Open Questions**:
109
+ - Will a new metadata type be introduced for Agent Script tests?
110
+ - Can `AiEvaluationDefinition` be used with Agent Script agents?
111
+ - Is there a roadmap for test portability?
112
+ - **References**: See `references/custom-eval-investigation.md` in `sf-ai-agentforce-testing` for related findings on custom evaluation data structure issues.
113
+
114
+ ---
115
+
116
+ ### Issue 6: `require_user_confirmation` does not trigger confirmation dialog
117
+ - **Status**: OPEN
118
+ - **Date Discovered**: 2026-02-14
119
+ - **Date Updated**: 2026-02-17 (TDD v2.2.0 — confirmed compiles on target-backed actions)
120
+ - **Affects**: Actions with `require_user_confirmation: True`
121
+ - **Symptom**: Setting `require_user_confirmation: True` on an action definition does not produce a user-facing confirmation dialog before execution. The action executes immediately without user confirmation.
122
+ - **Root Cause**: The property is parsed and saved without error, but the runtime does not implement the confirmation UX for Agent Script actions. It may only work for GenAiPlannerBundle actions in the Agent Builder UI.
123
+ - **TDD Update (v2.2.0)**: Property compiles and publishes successfully on action definitions with `target:` (both `flow://` and `apex://`). Val_Action_Meta_Props confirms compilation. The issue is purely runtime — the confirmation dialog never appears. Property is NOT valid on `@utils.transition` actions (Val_Action_Properties, v1.3.0).
124
+ - **Workaround**: Implement confirmation logic manually using a two-step pattern: (1) LLM asks user to confirm, (2) action has `available when @variables.user_confirmed == True` guard.
125
+ - **Open Questions**: Will this be implemented for AiAuthoringBundle in a future release?
126
+
127
+ ---
128
+
129
+ ### Issue 7: OOTB Asset Library actions may ship without proper quote wrapping
130
+ - **Status**: WORKAROUND
131
+ - **Date Discovered**: 2026-02-14
132
+ - **Affects**: Out-of-the-box (OOTB) actions from the Agentforce Asset Library
133
+ - **Symptom**: Some pre-built actions from the Asset Library have input parameters that are not properly quote-wrapped, causing parse errors when referenced in Agent Script.
134
+ - **Root Cause**: Asset Library actions were designed for the Agent Builder UI path, which handles quoting differently than Agent Script's text-based syntax.
135
+ - **Workaround**: When importing Asset Library actions, manually verify all input parameter names in the action definition. If a parameter name contains special characters or colons (e.g., `Input:query`), wrap it in quotes: `with "Input:query" = ...`
136
+ - **Open Questions**: Will Salesforce update Asset Library actions for Agent Script compatibility?
137
+
138
+ ---
139
+
140
+ ### Issue 8: Lightning UI components do not render on new planner
141
+ - **Status**: OPEN
142
+ - **Date Discovered**: 2026-02-14
143
+ - **Affects**: Agents using Lightning Web Components for rich UI rendering
144
+ - **Symptom**: Custom Lightning UI components referenced in agent actions do not render in the chat interface when using the newer planner engine. Components that worked with the legacy planner appear as plain text or are silently dropped.
145
+ - **Root Cause**: The newer planner (Atlas/Daisy) does not support the same Lightning component rendering pipeline as the legacy Java planner.
146
+ - **Workaround**: None for rich UI. Fall back to text-based responses or use the legacy planner if Lightning component rendering is critical.
147
+ - **Open Questions**: Is Lightning UI rendering on the roadmap for the new planner?
148
+
149
+ ---
150
+
151
+ ### Issue 9: Large action responses cause data loss from state
152
+ - **Status**: OPEN
153
+ - **Date Discovered**: 2026-02-14
154
+ - **Affects**: Actions returning large payloads (>50KB response data)
155
+ - **Symptom**: When an action returns a large response payload, subsequent variable access may return null or incomplete data. State appears to lose previously stored values.
156
+ - **Root Cause**: Action output data accumulates in conversation context without compaction. Very large responses may push earlier state data beyond the context window boundary.
157
+ - **Workaround**: Design Flow/Apex actions to return minimal, summarized data. Use `filter_from_agent: True` on outputs the LLM doesn't need. Avoid `SELECT *` patterns in data retrieval.
158
+ - **Open Questions**: Will automatic context compaction be added for action outputs?
159
+
160
+ ---
161
+
162
+ ### Issue 10: Agent fails if user lacks permission for ANY action
163
+ - **Status**: OPEN
164
+ - **Date Discovered**: 2026-02-14
165
+ - **Affects**: Agents with actions targeting secured resources
166
+ - **Symptom**: If the running user (Einstein Agent User or session user) lacks permission to execute ANY action defined in the agent — even actions in other topics — the entire agent may fail with a permission error rather than gracefully skipping the unauthorized action.
167
+ - **Root Cause**: The planner appears to validate permissions for all registered actions at startup, not lazily per-topic.
168
+ - **Workaround**: For **Service Agents**: Ensure the Einstein Agent User has both the `AgentforceServiceAgentUser` system PS AND a custom `{AgentName}_Access` PS with `<classAccesses>` for ALL Apex classes across all topics. Do NOT rely on the auto-generated `NextGen_{AgentName}_Permissions` — it is often incomplete (ORM1 testing: 3/4 classes, missing `ShipmentTracker`). For **Employee Agents**: Ensure each employee user has the custom PS assigned. See [agent-user-setup.md](agent-user-setup.md) for the full provisioning workflow and permission set XML template. Alternatively, split agents by permission boundary.
169
+ - **Open Questions**: Will the planner support lazy permission checking in a future release?
170
+
171
+ ---
172
+
173
+ ### Issue 11: Dynamic welcome messages broken (`{!userName}` not resolved)
174
+ - **Status**: OPEN
175
+ - **Date Discovered**: 2026-02-14
176
+ - **Affects**: `system.messages.welcome` with variable interpolation
177
+ - **Symptom**: Variable references like `{!@variables.customer_name}` or `{!userName}` in the welcome message display as literal text instead of resolved values.
178
+ - **Root Cause**: Welcome messages are rendered before the agent runtime initializes variables. Mutable variables have not been set yet, and linked variables may not be resolved at welcome-message time.
179
+ - **Workaround**: Use static welcome messages. Personalize greetings in the first topic's instructions instead.
180
+ - **Open Questions**: Will welcome message variable resolution be supported in a future release?
181
+
182
+ ---
183
+
184
+ ### Issue 12: Welcome message line breaks stripped
185
+ - **Status**: OPEN
186
+ - **Date Discovered**: 2026-02-14
187
+ - **Affects**: `system.messages.welcome` with multi-line content
188
+ - **Symptom**: Line breaks (`\n`) in welcome messages are stripped, causing multi-line messages to render as a single line.
189
+ - **Root Cause**: The welcome message renderer does not preserve newline characters from the Agent Script source.
190
+ - **Workaround**: Keep welcome messages as a single line. Use the first topic's instructions with pipe syntax (`|`) for multi-line greetings.
191
+ - **Open Questions**: Is this by design or a bug?
192
+
193
+ ---
194
+
195
+ ### Issue 13: Related agent nodes fail in SOMA configuration
196
+ - **Status**: OPEN
197
+ - **Date Discovered**: 2026-02-14
198
+ - **Affects**: Multi-agent configurations using `related_agent` references
199
+ - **Symptom**: SOMA (Same Org Multi-Agent) configurations that reference related agents via node declarations fail with "Node does not have corresponding topic" error at runtime.
200
+ - **Root Cause**: The planner resolves agent references at compile time but may not correctly map cross-agent topic references when agents are deployed independently.
201
+ - **Workaround**: Use `@topic.X` delegation within the same agent instead of cross-agent references. For true multi-agent scenarios, use the `@utils.escalate` or connection-based handoff patterns.
202
+ - **Open Questions**: Will SOMA node resolution be fixed in a future planner update?
203
+
204
+ ---
205
+
206
+ ### Issue 14: Previously valid OpenAPI schemas now fail validation
207
+ - **Status**: OPEN
208
+ - **Date Discovered**: 2026-02-14
209
+ - **Affects**: External Service actions using OpenAPI 3.0 schemas
210
+ - **Symptom**: OpenAPI schemas that previously passed validation and worked with `externalService://` targets now fail with schema validation errors after org upgrades. No changes were made to the schema files.
211
+ - **Root Cause**: Salesforce tightened OpenAPI schema validation rules in recent releases. Schemas that were previously accepted with minor deviations (e.g., missing `info.version`, non-standard extensions) are now rejected.
212
+ - **Workaround**: Re-validate schemas against strict OpenAPI 3.0 spec. Common fixes: ensure `info.version` is present, remove non-standard `x-` extensions, verify all `$ref` paths resolve correctly.
213
+ - **Open Questions**: Will Salesforce publish the exact validation rules that changed?
214
+
215
+ ---
216
+
217
+ ### Issue 15: Action definitions without `outputs:` block cause "Internal Error" on publish
218
+ - **Status**: WORKAROUND
219
+ - **Date Discovered**: 2026-02-16
220
+ - **Date Updated**: 2026-02-17 (TDD v2.1.0 — clarified outputs specifically required)
221
+ - **Affects**: `sf agent publish authoring-bundle` with topic-level action definitions
222
+ - **Symptom**: `sf agent publish` returns "Internal Error, try again later" when topic-level action definitions have `target:` but no `outputs:` block. Also triggered when using `inputs:` without `outputs:`. LSP + CLI validation both PASS — error is server-side compilation only.
223
+ - **Root Cause**: The server-side compiler needs output type contracts to resolve `flow://` and `apex://` action targets. Without an `outputs:` block, the compiler cannot generate return bindings. The `inputs:` block alone is NOT sufficient — `outputs:` is specifically required.
224
+ - **Workaround**: Always include an `outputs:` block in action definitions. The `inputs:` block can be omitted if the target has no required inputs (the LLM will still slot-fill via `with param=...`), but `outputs:` must always be present.
225
+ - **TDD Validation**: `Val_No_Outputs` (v2.1.0) confirms inputs-only action definition → "Internal Error". `Val_Partial_Output` confirms declaring a subset of outputs IS valid. `Val_Apex_Bare_Output` confirms bare `@InvocableMethod` without wrapper classes also triggers this error.
226
+ - **Open Questions**: Will the compiler be updated to infer I/O schemas from the target's metadata?
227
+
228
+ ---
229
+
230
+ ### Issue 17: `EinsteinAgentApiChannel` surfaceType not available on all orgs
231
+ - **Status**: OPEN
232
+ - **Date Discovered**: 2026-02-16
233
+ - **Affects**: Agent Runtime API channel enablement via `plannerSurfaces` metadata
234
+ - **Symptom**: Adding `plannerSurfaces` with `surfaceType: EinsteinAgentApiChannel` causes deployment errors on some orgs. Valid surfaceType values on tested orgs: `Messaging`, `CustomerWebClient`, `Telephony`, `NextGenChat`.
235
+ - **Root Cause**: The `EinsteinAgentApiChannel` surfaceType may require specific org features or licenses that are not universally available.
236
+ - **Workaround**: Use `CustomerWebClient` for Agent Runtime API / CLI testing. This surfaceType is available on all tested orgs and enables API access.
237
+ - **Open Questions**: Is `EinsteinAgentApiChannel` limited to specific editions or feature flags?
238
+
239
+ ---
240
+
241
+ ### Issue 18: `connection messaging:` only generates `Messaging` plannerSurface — `CustomerWebClient` dropped on every publish
242
+ - **Status**: OPEN
243
+ - **Date Discovered**: 2026-02-17
244
+ - **Affects**: Agent Builder Preview, Agent Runtime API testing, CLI testing (`sf agent test`, `sf agent preview`)
245
+ - **Symptom**: After `sf agent publish authoring-bundle`, the compiled GenAiPlannerBundle only contains a `Messaging` plannerSurface. `CustomerWebClient` is never auto-generated. Agent Builder Preview shows "Something went wrong. Refresh and try again." because it requires `CustomerWebClient`.
246
+ - **Root Cause**: The `connection messaging:` DSL block only generates a `Messaging` plannerSurface during compilation. There is no `connection customerwebclient:` DSL syntax — attempting it causes `ERROR_HTTP_404` on publish. The compiler has no mechanism to auto-generate `CustomerWebClient`.
247
+ - **Impact**: Every publish overwrites the GenAiPlannerBundle, dropping any manually-added `CustomerWebClient` surface. This requires a post-publish patch after EVERY publish.
248
+ - **Workaround — 6-Step Post-Publish Patch Workflow:**
249
+ 1. `sf agent publish authoring-bundle --api-name AgentName -o TARGET_ORG --json` → creates new version (e.g., v22)
250
+ 2. `sf project retrieve start --metadata "GenAiPlannerBundle:AgentName_vNN" -o TARGET_ORG --json` → retrieve compiled bundle
251
+ 3. Manually add second `<plannerSurfaces>` block to the XML with `<surfaceType>CustomerWebClient</surfaceType>` (copy the existing `Messaging` block, change surfaceType and surface fields)
252
+ 4. `sf agent deactivate --api-name AgentName -o TARGET_ORG` → deactivate agent (deploy fails while active)
253
+ 5. `sf project deploy start --metadata "GenAiPlannerBundle:AgentName_vNN" -o TARGET_ORG --json` → deploy patched bundle
254
+ 6. `sf agent activate --api-name AgentName -o TARGET_ORG` → reactivate agent
255
+ - **Patch XML Example:**
256
+ ```xml
257
+ <!-- Add this AFTER the existing Messaging plannerSurfaces block -->
258
+ <plannerSurfaces>
259
+ <adaptiveResponseAllowed>false</adaptiveResponseAllowed>
260
+ <callRecordingAllowed>false</callRecordingAllowed>
261
+ <outboundRouteConfigs>
262
+ <escalationMessage>One moment while I connect you with a support specialist.</escalationMessage>
263
+ <outboundRouteName>Route_from_Your_Agent</outboundRouteName>
264
+ <outboundRouteType>OmniChannelFlow</outboundRouteType>
265
+ </outboundRouteConfigs>
266
+ <surface>SurfaceAction__CustomerWebClient</surface>
267
+ <surfaceType>CustomerWebClient</surfaceType>
268
+ </plannerSurfaces>
269
+ ```
270
+ - **Note**: The `outboundRouteConfigs` should mirror the Messaging surface config. If no routing is configured, omit `outboundRouteConfigs`.
271
+ - **Validated on**: YourOrg (Your_Agent_Name v22), 2026-02-17
272
+
273
+ ---
274
+
275
+ ### Issue 19: Comments inside `if` blocks treated as empty body
276
+ - **Status**: OPEN
277
+ - **Date Discovered**: 2026-03-04
278
+ - **Affects**: `if`/`else` blocks in `instructions: ->`
279
+ - **Symptom**: An `if` block containing only comments (e.g., `# TODO`) compiles but produces an empty body at runtime. The parser strips comments during tokenization, and the resulting `INDENT → DEDENT` with no executable statements creates a no-op branch that silently swallows the conditional path.
280
+ - **Root Cause**: Comments are not executable statements in Agent Script. The parser treats a comment-only block identically to an empty block.
281
+ - **Workaround**: Always include at least one executable statement (`| text`, `run`, `set`, or `transition`) in every `if`/`else` block. Never use comment-only blocks as placeholders.
282
+ ```yaml
283
+ # ❌ WRONG — empty body after comment stripping
284
+ if @variables.premium == True:
285
+ # TODO: add premium greeting
286
+
287
+ # ✅ CORRECT — executable statement present
288
+ if @variables.premium == True:
289
+ | Welcome back, valued premium member!
290
+ ```
291
+ - **Open Questions**: Will the compiler emit a warning for empty `if` bodies?
292
+
293
+ ---
294
+
295
+ ### Issue 20: GenAiPlannerBundle / AiAuthoringBundle / GenAiFunction NOT SOQL-queryable
296
+ - **Status**: WORKAROUND (by design — metadata types, not sObjects)
297
+ - **Date Discovered**: 2026-03-04
298
+ - **Affects**: Any workflow that attempts SOQL queries on agent metadata types
299
+ - **Symptom**: `SELECT ... FROM GenAiPlannerBundle` returns `INVALID_TYPE: GenAiPlannerBundle`. Same for `AiAuthoringBundle` and `GenAiFunction`. These types do not appear in `EntityDefinition` SOQL queries.
300
+ - **Root Cause**: These are **Metadata API types**, not sObjects. They exist in the metadata layer and are only accessible via `sf project retrieve start --metadata` or the Metadata API. This is by design, not a bug.
301
+ - **Workaround**: Use `sf project retrieve start --metadata "TypeName:ApiName"` instead of SOQL. For querying agent status/versions via SOQL, use `BotDefinition` and `BotVersion` sObjects.
302
+ ```bash
303
+ # ❌ WRONG — these are NOT sObjects
304
+ sf data query --query "SELECT Id FROM GenAiPlannerBundle" -o ORG --json
305
+ sf data query --query "SELECT Id FROM AiAuthoringBundle" -o ORG --json
306
+
307
+ # ✅ CORRECT — use Metadata API
308
+ sf project retrieve start --metadata "GenAiPlannerBundle:MyAgent_v1" -o ORG --json
309
+ sf project retrieve start --metadata "AiAuthoringBundle:MyAgent" -o ORG --json
310
+
311
+ # ✅ CORRECT — query sObjects for agent info
312
+ sf data query --query "SELECT Id, DeveloperName FROM BotDefinition WHERE DeveloperName = 'MyAgent'" -o ORG --json
313
+ sf data query --query "SELECT Id, VersionNumber, Status FROM BotVersion WHERE BotDefinition.DeveloperName = 'MyAgent'" -o ORG --json
314
+ ```
315
+ - **Open Questions**: None — this is by design.
316
+
317
+ ---
318
+
319
+ ## Resolved Issues
320
+
321
+ ### Issue 16: `connections:` (plural) wrapper block not valid — use `connection messaging:` (singular)
322
+ - **Status**: RESOLVED
323
+ - **Date Discovered**: 2026-02-16
324
+ - **Date Resolved**: 2026-02-16
325
+ - **Affects**: Agent Script escalation routing configuration
326
+ - **Symptom**: CLI validation rejects `connections:` (plural wrapper) block with `SyntaxError: Invalid syntax after conditional statement`.
327
+ - **Root Cause**: The correct syntax is `connection messaging:` (singular, standalone top-level block) — NOT the `connections:` plural wrapper shown in some docs and `future_recipes/`. The `connection <channel>:` block is a Beta Feature available on production orgs.
328
+ - **Resolution**: Use `connection messaging:` as a standalone block (no wrapper). Both minimal form (`adaptive_response_allowed` only) and full form (with `outbound_route_type`, `outbound_route_name`, `escalation_message`) are validated.
329
+ - **CRITICAL**: `outbound_route_name` requires `flow://` prefix — bare API name causes `ERROR_HTTP_404` on publish. Correct format: `"flow://My_Flow_Name"`.
330
+ - **All-or-nothing rule**: When `outbound_route_type` is present, all three route properties are required.
331
+ - **Validated on**: YourOrg (Your_Agent_Name), 2026-02-16
332
+
333
+ ---
334
+
335
+ ## Contributing
336
+
337
+ When you discover a new platform issue during an Agent Script session:
338
+
339
+ 1. Add it to the **Open Issues** section using the template above
340
+ 2. Assign the next sequential issue number
341
+ 3. Set status to `OPEN` or `WORKAROUND`
342
+ 4. Include the date discovered
343
+ 5. Be specific about the symptom and any error messages
344
+ 6. Note what you've tried so far under "Workaround"
345
+
346
+ When an issue is resolved:
347
+ 1. Update the status to `RESOLVED`
348
+ 2. Add the resolution date and what fixed it (e.g., "Fixed in Spring '26 release")
349
+ 3. Move the issue to the **Resolved Issues** section
350
+
351
+ ---
352
+
353
+ *Last updated: 2026-03-04*
@@ -0,0 +1,67 @@
1
+ # Minimal Working Examples
2
+
3
+ Complete, deployable agent examples with single topics, actions, and conditional logic.
4
+
5
+ ---
6
+
7
+ ## Hello-World Agent Script
8
+
9
+ A complete, deployable agent with one topic, one action, and conditional logic:
10
+
11
+ ```agentscript
12
+ system:
13
+ messages:
14
+ welcome: "Hello! How can I help you today?"
15
+ error: "Sorry, something went wrong."
16
+ instructions: "You are a helpful customer service agent."
17
+
18
+ config:
19
+ developer_name: "simple_agent"
20
+ description: "A minimal working agent example"
21
+ agent_type: "AgentforceServiceAgent"
22
+ default_agent_user: "agent_user@yourorg.com"
23
+
24
+ variables:
25
+ customer_verified: mutable boolean = False
26
+
27
+ start_agent entry:
28
+ description: "Entry point for all conversations"
29
+ reasoning:
30
+ instructions: |
31
+ Greet the customer and route to the main topic.
32
+ actions:
33
+ go_main: @utils.transition to @topic.main
34
+ description: "Navigate to main conversation"
35
+
36
+ topic main:
37
+ description: "Main conversation handler"
38
+ reasoning:
39
+ instructions: ->
40
+ if @variables.customer_verified == True:
41
+ | You are speaking with a verified customer.
42
+ | Help them with their request.
43
+ else:
44
+ | Please verify the customer's identity first.
45
+ actions:
46
+ verify: @actions.verify_customer
47
+ description: "Verify customer identity"
48
+ set @variables.customer_verified = @outputs.verified
49
+ actions:
50
+ verify_customer: apex://VerifyCustomerAction
51
+ description: "Verify customer identity"
52
+ inputs:
53
+ customer_id: string
54
+ label: "Customer ID"
55
+ outputs:
56
+ verified: boolean
57
+ label: "Verified"
58
+ ```
59
+
60
+ ### Key Points
61
+
62
+ - **`config` block**: `developer_name` must match the folder name (case-sensitive)
63
+ - **`default_agent_user`**: Must be a valid Einstein Agent User in the target org — query with `sf data query`
64
+ - **`instructions: ->`**: Procedural mode enables `if`/`else` and `run` directives
65
+ - **`instructions: |`**: Literal mode for static text passed to the LLM
66
+ - **`set @variables.X = @outputs.Y`**: Captures action output into mutable state
67
+ - **`@utils.transition`**: Permanent handoff (does not return to calling topic)