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 (
CustomerWebClient surface, SvcCopilotTmpl__ prefix)
- Employee Agents: Internal-facing (
Messaging only, 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
localTopicLinks to bundle
- Create
localTopics entry (copy plugin, add unique ID)
- Create
localActions entries (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: false for 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
source matches plugin/function developerName
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 template
genAiPlugin-template.xml - GenAiPlugin metadata template
genAiPlannerBundle-template.xml - Complete bundle template with all components
schema-input-template.json - Input schema template with common patterns
schema-output-template.json - Output schema template
knowledge-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
1---2name: agentforce-planner-bundle-builder3description: Comprehensive guide for building, configuring, and deploying Legacy Agentforce GenAiPlannerBundles. Use when creating Agentforce agents, working with GenAiPlannerBundles, GenAiPlugins, or GenAiFunctions, understanding Agentforce architecture, configuring topics/actions/schemas, deploying planner bundles, creating Service or Employee agents, or troubleshooting bundle deployment issues.4---56# Agentforce Planner Bundle Builder78This skill provides comprehensive knowledge for building Agentforce Planner Bundles - the core configuration files that define AI agent capabilities, behavior, and structure in Salesforce Agentforce.910## Quick Reference1112**Architecture**: Three-tier system131. **GenAiFunctions** → Define reusable actions (Flows/Apex/standard actions)142. **GenAiPlugins** → Define reusable topics (reference functions)153. **GenAiPlannerBundles** → Create agents (reference plugins, create local copies)1617**Deployment Order** (CRITICAL):181. GenAiFunctions (no dependencies)192. GenAiPlugins (depends on functions)203. GenAiPlannerBundles (depends on plugins and functions)2122**Agent Types**:23- **Service Agents**: Customer-facing (`CustomerWebClient` surface, `SvcCopilotTmpl__` prefix)24- **Employee Agents**: Internal-facing (`Messaging` only, `EmployeeCopilot__` prefix)2526## Core Workflow2728### Building an Agent29301. **Create GenAiFunction**: Define action with invocation target and schemas312. **Create GenAiPlugin**: Define topic with scope, instructions, and function references323. **Create GenAiPlannerBundle**: Link plugins, create local copies with unique IDs, configure surfaces3334### Key Concepts3536- **Local Copies**: Bundles create local copies of plugins/functions with unique IDs37- **Source Attribute**: Links bundle copies back to original plugin/function names38- **Attribute Mappings**: Share data between actions via planner variables39- **Rule Expressions**: Conditionally enable topics/actions based on context40- **Schemas**: Define input/output structure with Lightning types and PII flags4142## Detailed Reference4344For comprehensive information, see:45- **[Planner Bundle Guide](references/planner-bundle-guide.md)**: Complete reference covering architecture, components, patterns, best practices, deployment, and troubleshooting4647## Common Tasks4849### Creating a New Agent50511. Identify agent type (Service vs Employee)522. Create required GenAiFunctions533. Create GenAiPlugins that reference functions544. Create GenAiPlannerBundle that links plugins555. Configure surfaces, mappings, and rules566. Deploy in correct order5758### Adding a Topic to Existing Agent59601. Create GenAiFunction(s) for topic actions612. Create GenAiPlugin referencing functions623. Add `localTopicLinks` to bundle634. Create `localTopics` entry (copy plugin, add unique ID)645. Create `localActions` entries (copy functions, add unique IDs)656. Link actions to topic via `localActionLinks`667. Copy schemas to `localActions/{TopicName}_{ID}/{ActionName}_{ID}/`6768### Schema Design6970- Use Lightning types: `lightning__textType`, `lightning__booleanType`, `lightning__dateType`, `lightning__numberType`71- Mark PII fields: `lightning:isPII: true`72- Mark user input: `copilotAction:isUserInput: true`73- Set `unevaluatedProperties: false` for strict validation7475### Troubleshooting7677Common issues:78- Missing invocation targets → Ensure Flow/Apex exists79- Schema mismatches → Verify schema matches Flow/Apex parameters80- Deployment order errors → Deploy Functions → Plugins → Bundles81- Missing source references → Ensure `source` matches plugin/function `developerName`8283## Best Practices84851. **Topics**: Group related actions, clear scope, logical separation862. **Instructions**: Be specific, avoid hardcoding, trust components873. **Schemas**: Mark PII, use user input flags, clear descriptions884. **Actions**: Require confirmation for critical actions, show progress for long operations895. **Variables**: Consistent naming, share data via attribute mappings906. **Rules**: Keep simple, document purpose, test thoroughly9192## Templates9394Ready-to-use templates are available in `assets/templates/`:95- `genAiFunction-template.xml` - GenAiFunction metadata template96- `genAiPlugin-template.xml` - GenAiPlugin metadata template97- `genAiPlannerBundle-template.xml` - Complete bundle template with all components98- `schema-input-template.json` - Input schema template with common patterns99- `schema-output-template.json` - Output schema template100- `knowledge-search-action-template.xml` - Knowledge search action example101102Use these templates as starting points when creating new components.103104## When to Load Reference Guide105106Load `references/planner-bundle-guide.md` when you need:107- Detailed XML structure examples108- Complete component reference109- Advanced patterns and use cases110- Deployment troubleshooting111- Agent type determination logic112- Complete workflow examples