sf agent generate agent-spec always produces empty topics array regardless of configuration
还没有人认领这个 Issue。
评估
调研方向
从 sf agent generate agent-spec 命令和 @salesforce/plugin-agent 实现开始,检查报告的 1.22.2 与 1.21.1 之间的版本不匹配。分别使用交互式命令和基于 flag 的命令进行复现,然后将生成的 YAML 与文档中记录的 topic 输出进行比较,并验证 sf agent create 不再报告没有关联任何 topic。
由索引模型根据 Issue 内容生成。
描述
Summary
The sf agent generate agent-spec command consistently fails to generate topics, resulting in topics: [] in the output YAML file, regardless of agent properties provided. This occurs even with simple, standard agent configurations and affects both interactive and flag-based command execution.
Steps To Reproduce
Environment Setup:
- Create SFDX project with
sf project generate --name agentforce-test - Authenticate to Developer Edition org with Einstein/Agentforce enabled
- Ensure CLI is updated to latest version
✗ sf version
@salesforce/cli/2.89.8 darwin-x64 node-v23.11.1
Reproduction Steps:
Test 1: Basic Interactive Execution
sf agent generate agent-spec --target-org DevOrg
Interactive inputs:
- Type of agent:
internal - Company name:
Test Company - Company description:
Salesforce consulting company - Role of agent:
Customer support agent
result
agentType: internal
companyName: Test Company
companyDescription: Salesforce consulting company
role: Customer support agent
maxNumOfTopics: 5
enrichLogs: false
tone: casual
topics: []
Test 2: Flag-based Execution (Simple)
sf agent generate agent-spec --type internal \
--company-name "Test Company" \
--company-description "Salesforce consulting company" \
--role "Customer support agent" \
--max-topics 1 --tone formal \
--target-org DevOrg
result
agentType: internal
companyName: Test Company
companyDescription: Salesforce consulting company
role: Customer support agent
maxNumOfTopics: 1
enrichLogs: false
tone: formal
topics: []
Expected result
According to the documentation at https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-generate-agent-spec.html:
The spec file also contains an LLM-generated list of topics based on this information... The bottom part contains the LLM-generated list of topics.
The generated specs/agentSpec.yaml should contain topics like:
topics:
- name: Guest Check-In Automation
description: Streamline the guest check-in process using AI.
- name: Personalized Guest Services
description: Provide tailored recommendations and services.
- name: Predictive Maintenance
description: Use AI to forecast and prevent equipment failures.
Actual result
All executions consistently produce the same result with empty topics:
Generated file content:
agentType: internal
companyName: Test Company
companyDescription: Salesforce consulting company
role: Customer support agent
maxNumOfTopics: 1
enrichLogs: false
tone: formal
topics: [] # ← Always empty regardless of configuration
Additional information
Plugin Version Warning:
Every execution shows:
Warning: Plugin @salesforce/plugin-agent (1.22.2) differs from the version specified by sf (1.21.1)
Attempted Variations:
- Different
--max-topicsvalues (1, 2, 3) - Various agent types and descriptions
- Both new spec creation and existing spec refinement
Consistent Behavior:
- Command completes without errors
- All agent properties are correctly saved
- Only
topics: []array remains consistently empty - Issue persists across multiple days and CLI sessions
System Information
Shell: zsh
Platform: macOS
✗ sf version --verbose --json
{
"architecture": "darwin-x64",
"cliVersion": "@salesforce/cli/2.89.8",
"nodeVersion": "node-v23.11.1",
"osVersion": "Darwin 22.6.0",
"rootPath": "/usr/local/Cellar/sf/2.89.8/libexec/lib/node_modules/@salesforce/cli",
"shell": "zsh",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.2.28 (core)",
"@oclif/plugin-commands 4.1.25 (core)",
"@oclif/plugin-help 6.2.28 (core)",
"@oclif/plugin-not-found 3.2.51 (core)",
"@oclif/plugin-plugins 5.4.37 (core)",
"@oclif/plugin-search 1.2.24 (core)",
"@oclif/plugin-update 4.6.39 (core)",
"@oclif/plugin-version 2.2.28 (core)",
"@oclif/plugin-warn-if-update-available 3.1.39 (core)",
"@oclif/plugin-which 3.2.35 (core)",
"@salesforce/cli 2.89.8 (core)",
"agent 1.22.2 (user) published 6 days ago (Wed May 21 2025)",
"apex 3.6.17 (core)",
"api 1.3.3 (core)",
"auth 3.6.120 (core)",
"data 4.0.32 (core)",
"deploy-retrieve 3.22.10 (core)",
"info 3.4.60 (core)",
"limits 3.3.54 (core)",
"marketplace 1.3.8 (core)",
"org 5.7.8 (core)",
"packaging 2.13.3 (core)",
"schema 3.3.62 (core)",
"settings 2.4.27 (core)",
"sobject 1.4.56 (core)",
"telemetry 3.6.41 (core)",
"templates 56.3.47 (core)",
"trust 3.7.89 (core)",
"user 3.6.21 (core)"
]
}
Development Org Configuration:
- Type: Developer Edition
- Einstein: Enabled
- Agentforce: Enabled
- Data Cloud: Created and active
Impact:
This issue blocks the entire Agentforce CLI workflow as the subsequent sf agent create command fails with "No topics are associated with agent. Skip saving." when attempting to create an agent from the spec file.
- 主要语言
- 没有语言数据
- 星标
- 571
- 派生
- 80
- 平均合并
- 1 天 18 小时
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
forcedotcom/cli 的其他 Issue
-
sf agent mcp asset replace --assets null throws raw TypeError instead of InvalidShape可能已有人在做 @konkonrong-lgtm 于 68 天前认领。 未关闭area:afdx bug investigating owned by another team validated
难度 2/5 1-3 小时 新手友好度 78/100
forcedotcom/cli#3625 · 4 条评论 ·
-
area:afdx bug owned by another team
难度 2/5 1-3 小时 新手友好度 78/100
forcedotcom/cli#3608 · 2 条评论 ·
-
[BUG]: sf package version create always warns about org-capitalize-record-types, even when it's set未关闭area:packaging more information required owned by another team regression stale
难度 3/5 1-2 天 新手友好度 52/100
forcedotcom/cli#3663 · 5 条评论 ·
-
[BUG]: NavigationMenu SourceMember name mismatch prevents source-tracked retrieve from completing未关闭bug investigating validated
难度 4/5 3-5 天 新手友好度 52/100
forcedotcom/cli#3660 · 3 条评论 ·
-
announcement
难度 5/5 一周以上 新手友好度 25/100
forcedotcom/cli#3658 · 1 个 reaction ·
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
paperclipai/paperclip#16785 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
code-yeongyu/senpi#3661 ·
维护者通常 1 天内回复
-
ai-generated
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
Moonshot: Kimi K3 always sends `reasoning_effort="max"`, though the API now accepts `low` and `high`可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭accepted
难度 2/5 1-3 小时 新手友好度 78/100
UKGovernmentBEIS/inspect_ai#5939 ·
维护者通常 1 天内回复