Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

sf agent generate agent-spec always produces empty topics array regardless of configuration

Open
#3,302 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
node.js
Domain
ai, cli

Research direction

Start with the sf agent generate agent-spec command and the @salesforce/plugin-agent implementation, checking the reported version mismatch between 1.22.2 and 1.21.1. Reproduce with both interactive and flag-based commands, then compare the generated YAML with the documented topic output and verify that sf agent create no longer reports that no topics are associated.

Written by the indexing model from the issue text.

Description

owned by another team validated
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:

  1. Create SFDX project with sf project generate --name agentforce-test
  2. Authenticate to Developer Edition org with Einstein/Agentforce enabled
  3. 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-topics values (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.

Dominant language
No language data
Stars
571
Forks
80
Avg merge
2d 21h
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from forcedotcom/cli

All issues in forcedotcom/cli

Similar issues

More AI Infra & Agents issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.