dylandersen/agentforce-planner-bundle-builder-skill
Overview
This skill is a practical guide for building, configuring, and deploying Agentforce GenAiPlannerBundles that define AI agent capabilities in Salesforce. It consolidates architecture, templates, deployment order, schema patterns, and troubleshooting steps to speed agent creation and reduce deployment errors. Use it when creating Service or Employee agents, adding topics or actions, or resolving bundle deployment issues.
How this skill works
The skill explains the three-tier Agentforce architecture: GenAiFunctions (reusable actions), GenAiPlugins (topics referencing functions), and GenAiPlannerBundles (agents that bundle local copies). It enforces the required deployment order (Functions → Plugins → Bundles) and shows how bundles create local copies with unique IDs while preserving a source link back to originals. It includes schema design rules, attribute mappings, rule expressions, and templates to produce correct metadata artifacts.
When to use it
- Creating a new Agentforce agent (Service or Employee) from scratch
- Adding a new topic or action to an existing planner bundle
- Designing input/output schemas and marking PII or user-input fields
- Configuring attribute mappings, rule expressions, or surfaces
- Troubleshooting deployment errors or invocation target mismatches
Best practices
- Follow the deployment order: deploy GenAiFunctions, then GenAiPlugins, then GenAiPlannerBundles
- Group related actions into coherent topics and give each topic a clear scope and instructions
- Use Lightning schema types and set unevaluatedProperties: false for strict validation
- Mark PII fields and user-input fields explicitly and require confirmations for critical actions
- Use consistent variable naming and document attribute mappings and rule expressions
- Test rule expressions and mappings in representative contexts before deployment
Example use cases
- Build a customer-facing Service Agent with CustomerWebClient surface and SvcCopilotTmpl__ prefix
- Create an internal Employee Agent limited to Messaging surface with EmployeeCopilot__ prefix
- Add a knowledge-search topic: create function, plugin, then add localTopicLinks and localActions to the bundle
- Replace or update an invocation target: fix GenAiFunction to match Flow/Apex parameters and redeploy
- Design strict input schemas for sensitive operations and flag PII for downstream handling
FAQ
Always deploy GenAiFunctions first, then GenAiPlugins, and finally GenAiPlannerBundles to satisfy dependencies.
How do bundles reference original plugins and functions?
Bundles create local copies with unique IDs and use a source attribute to link back to the original plugin or function developerName.
How should I mark sensitive fields in schemas?
Use the lightning:isPII flag on fields and set copilotAction:isUserInput for user-provided values; use unevaluatedProperties: false for strict validation.