Reference · Sf ai agentforce
Builder-workflow
Part of Sf ai agentforce. Install the skill and your agent reads this page when it needs the depth.
Agentforce Builder Workflow
This reference expands the Setup UI / Agent Builder workflow for sf-ai-agentforce.
Recommended order
- Confirm this is Builder metadata work, not
.agentauthoring - Identify agent type: Service Agent vs Employee Agent
- For Service Agents, provision the running user (prefer
sf org create agent-user) - For Employee Agents, plan visibility with a Permission Set that contains
<agentAccesses> - Define topics and topic scope
- Prepare supporting actions (Flow, Apex, Prompt Builder template)
- Configure action inputs and outputs
- Configure agent-level instructions and messages
- Validate supporting metadata and template status
- Publish and activate
Builder checklist
Topics
- Topic descriptions must be concrete and routeable
- Scope should say what the topic can and cannot do
- Instructions should be procedural, not vague brand copy
Actions
- Flow actions are the safest default for Builder-based agents
- Apex actions must expose
@InvocableMethod - Prompt Builder templates should be used when the goal is generated content, not deterministic business logic
Prompt Builder templates
- In the UI, users will usually say Prompt Template
- In source metadata, use
GenAiPromptTemplate - Prefer
genAiPromptTemplates/*.genAiPromptTemplate-meta.xml - Flex templates should stay within the 5-input maximum
- Use published template versions before wiring dependent actions
Inputs / Outputs
- Input names must match the target contract exactly
- Output names should be meaningful to the planner
- Displayable outputs should be user-facing and concise
Agent-level settings
- System instructions should be stable and role-defining
- Welcome message should orient the user quickly
- Error message should explain fallback behavior
- Service Agents should use a running user provisioned with
sf org create agent-userwhen possible - Employee Agents need end-user visibility via Permission Sets containing
<agentAccesses>
Publish sequence
- Deploy supporting metadata (
GenAiPromptTemplate,GenAiFunction,GenAiPlugin, Flow, Apex, etc.) - Save / publish the agent in Builder, or deploy the relevant Builder metadata
- Activate the target version
- For Employee Agents, verify visibility via Permission Set
<agentAccesses>
Publishing does not activate the new version automatically.
sf agent publish authoring-bundleis part of the Agent Script workflow and belongs tosf-ai-agentscript, not the default Builder metadata workflow.
Deep references
- CLI lifecycle: cli-commands.md
- Metadata details: metadata-reference.md
- GenAI prompt metadata: genaiprompttemplate.md
- Prompt terminology: prompt-templates.md
- Models API: models-api.md
- Custom Lightning types: custom-lightning-types.md
- Employee Agent visibility: ../../sf-permissions/references/agent-access-guide.md
- Service Agent running user: ../../sf-ai-agentscript/references/agent-user-setup.md