| name | sf-agent |
| description | Agentforce agent management commands including creation, activation, deactivation, and testing. |
sf agent Management
Agentforce agent management commands.
sf agent create
Create an agent in your org using a local agent spec file.
sf agent create --name "Resort Manager" --api-name Resort_Manager \
--spec specs/resortManagerAgent.yaml --target-org myOrg
sf agent create --name "Resort Manager" --spec specs/agent.yaml --preview
Flags
| Flag | Description |
|---|
--name | Name (label) of the new agent |
--api-name | API name of the agent |
--spec | Path to agent spec YAML file |
--preview | Preview without saving |
sf agent activate
Activate an agent in an org.
sf agent activate --api-name My_Agent --version 4 --target-org myOrg
sf agent activate --api-name My_Agent --json
[!NOTE]
The --version flag corresponds to the vX part of the BotVersion metadata in your project. If omitted, the command provides a list of versions to choose from.
sf agent deactivate
Deactivate an agent in an org.
sf agent deactivate --api-name Resort_Manager --target-org myOrg --json
sf agent generate agent-spec
Generate an agent spec YAML file.
sf agent generate agent-spec --type customer \
--role "Field customer complaints and manage schedules." \
--company-name "Coral Cloud Resorts" \
--output-file specs/agentSpec.yaml --target-org myOrg
sf agent generate authoring-bundle
Generate an authoring bundle from agent spec.
sf agent generate authoring-bundle --spec specs/agentSpec.yaml \
--name "My Authoring Bundle" --target-org myOrg
sf agent publish authoring-bundle
Publish authoring bundle to create an agent in org.
sf agent publish authoring-bundle --api-name My_Bundle --target-org myOrg
sf agent validate authoring-bundle
Validate authoring bundle before publishing.
sf agent validate authoring-bundle --api-name My_Bundle --target-org myOrg
sf agent preview / preview start / preview send / preview end
Interactive agent preview session.
sf agent preview --api-name Resort_Manager --target-org myOrg
sf agent preview start --api-name Resort_Manager --target-org myOrg
sf agent preview send --session-id <session-id> --message "Hello"
sf agent preview end --session-id <session-id>
sf agent test create / list / run / results / resume
Agent testing commands.
sf agent test create --api-name My_Agent --output-file specs/test.yaml
sf agent test run --api-name Resort_Manager --target-org myOrg
sf agent test results --test-run-id <test-run-id> --target-org myOrg