Agentforce Planner Bundle Builder
This skill provides comprehensive knowledge for building Agentforce Planner Bundles - the core configuration files that define AI agent capabilities, behavior, and structure in Salesforce Agentforce.
Quick Reference
Architecture: Three-tier system
- GenAiFunctions → Define reusable actions (Flows/Apex/standard actions)
- GenAiPlugins → Define reusable topics (reference functions)
- GenAiPlannerBundles → Create agents (reference plugins, create local copies)
Deployment Order (CRITICAL):
- GenAiFunctions (no dependencies)
- GenAiPlugins (depends on functions)
- GenAiPlannerBundles (depends on plugins and functions)
Agent Types:
- Service Agents: Customer-facing (
CustomerWebClientsurface,SvcCopilotTmpl__prefix) - Employee Agents: Internal-facing (
Messagingonly,EmployeeCopilot__prefix)
Core Workflow
Building an Agent
- Create GenAiFunction: Define action with invocation target and schemas
- Create GenAiPlugin: Define topic with scope, instructions, and function references
- Create GenAiPlannerBundle: Link plugins, create local copies with unique IDs, configure surfaces
Key Concepts
- Local Copies: Bundles create local copies of plugins/functions with unique IDs
- Source Attribute: Links bundle copies back to original plugin/function names
- Attribute Mappings: Share data between actions via planner variables
- Rule Expressions: Conditionally enable topics/actions based on context
- Schemas: Define input/output structure with Lightning types and PII flags
Detailed Reference
For comprehensive information, see:
- Planner Bundle Guide: Complete reference covering architecture, components, patterns, best practices, deployment, and troubleshooting
Common Tasks
Creating a New Agent
- Identify agent type (Service vs Employee)
- Create required GenAiFunctions
- Create GenAiPlugins that reference functions
- Create GenAiPlannerBundle that links plugins
- Configure surfaces, mappings, and rules
- Deploy in correct order
Adding a Topic to Existing Agent
- Create GenAiFunction(s) for topic actions
- Create GenAiPlugin referencing functions
- Add
localTopicLinksto bundle - Create
localTopicsentry (copy plugin, add unique ID) - Create
localActionsentries (copy functions, add unique IDs) - Link actions to topic via
localActionLinks - Copy schemas to
localActions/{TopicName}_{ID}/{ActionName}_{ID}/
Schema Design
- Use Lightning types:
lightning__textType,lightning__booleanType,lightning__dateType,lightning__numberType - Mark PII fields:
lightning:isPII: true - Mark user input:
copilotAction:isUserInput: true - Set
unevaluatedProperties: falsefor strict validation
Troubleshooting
Common issues:
- Missing invocation targets → Ensure Flow/Apex exists
- Schema mismatches → Verify schema matches Flow/Apex parameters
- Deployment order errors → Deploy Functions → Plugins → Bundles
- Missing source references → Ensure
sourcematches plugin/functiondeveloperName
Best Practices
- Topics: Group related actions, clear scope, logical separation
- Instructions: Be specific, avoid hardcoding, trust components
- Schemas: Mark PII, use user input flags, clear descriptions
- Actions: Require confirmation for critical actions, show progress for long operations
- Variables: Consistent naming, share data via attribute mappings
- Rules: Keep simple, document purpose, test thoroughly
Templates
Ready-to-use templates are available in assets/templates/:
genAiFunction-template.xml- GenAiFunction metadata templategenAiPlugin-template.xml- GenAiPlugin metadata templategenAiPlannerBundle-template.xml- Complete bundle template with all componentsschema-input-template.json- Input schema template with common patternsschema-output-template.json- Output schema templateknowledge-search-action-template.xml- Knowledge search action example
Use these templates as starting points when creating new components.
When to Load Reference Guide
Load references/planner-bundle-guide.md when you need:
- Detailed XML structure examples
- Complete component reference
- Advanced patterns and use cases
- Deployment troubleshooting
- Agent type determination logic
- Complete workflow examples