dylandersen

Agentforce Planner Bundle Builder

0
0
# Install this skill:
npx skills add dylandersen/agentforce-planner-bundle-builder-skill

Or install specific skill: npx add-skill https://github.com/dylandersen/agentforce-planner-bundle-builder-skill

# Description

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.

# SKILL.md


name: Agentforce Planner Bundle Builder
description: 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.


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
1. GenAiFunctions β†’ Define reusable actions (Flows/Apex/standard actions)
2. GenAiPlugins β†’ Define reusable topics (reference functions)
3. GenAiPlannerBundles β†’ Create agents (reference plugins, create local copies)

Deployment Order (CRITICAL):
1. GenAiFunctions (no dependencies)
2. GenAiPlugins (depends on functions)
3. 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

  1. Create GenAiFunction: Define action with invocation target and schemas
  2. Create GenAiPlugin: Define topic with scope, instructions, and function references
  3. 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

  1. Identify agent type (Service vs Employee)
  2. Create required GenAiFunctions
  3. Create GenAiPlugins that reference functions
  4. Create GenAiPlannerBundle that links plugins
  5. Configure surfaces, mappings, and rules
  6. Deploy in correct order

Adding a Topic to Existing Agent

  1. Create GenAiFunction(s) for topic actions
  2. Create GenAiPlugin referencing functions
  3. Add localTopicLinks to bundle
  4. Create localTopics entry (copy plugin, add unique ID)
  5. Create localActions entries (copy functions, add unique IDs)
  6. Link actions to topic via localActionLinks
  7. 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

  1. Topics: Group related actions, clear scope, logical separation
  2. Instructions: Be specific, avoid hardcoding, trust components
  3. Schemas: Mark PII, use user input flags, clear descriptions
  4. Actions: Require confirmation for critical actions, show progress for long operations
  5. Variables: Consistent naming, share data via attribute mappings
  6. 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

# README.md

Agentforce Planner Bundle Builder Skill

A comprehensive skill for building, configuring, and deploying Agentforce GenAiPlannerBundles in Salesforce. This skill provides specialized knowledge, templates, and best practices for creating AI agents using the Agentforce platform.

What This Skill Provides

  • Specialized workflows for building Agentforce agents from scratch
  • Domain expertise on GenAiPlannerBundles, GenAiPlugins, and GenAiFunctions architecture
  • Bundled resources including XML/JSON templates and comprehensive reference guides
  • Best practices for schema design, deployment, and troubleshooting

Installation

Install this skill using the Skills CLI:

npx skills add https://github.com/dylandersen/agentforce-planner-bundle-builder-skill

Or add it directly in Cursor/Claude Code by referencing this repository.

Quick Start

This skill activates when you ask Claude to:
- Create Agentforce agents or GenAiPlannerBundles
- Work with GenAiPlugins or GenAiFunctions
- Understand Agentforce architecture
- Configure topics, actions, or schemas
- Deploy planner bundles
- Troubleshoot bundle deployment issues

Skill Structure

agentforce-planner-bundle-builder-skill/
β”œβ”€β”€ SKILL.md                    # Main skill instructions and quick reference
β”œβ”€β”€ references/
β”‚   └── planner-bundle-guide.md # Comprehensive 1000+ line reference guide
└── assets/
    └── templates/              # Ready-to-use XML and JSON templates
        β”œβ”€β”€ genAiFunction-template.xml
        β”œβ”€β”€ genAiPlugin-template.xml
        β”œβ”€β”€ genAiPlannerBundle-template.xml
        β”œβ”€β”€ schema-input-template.json
        β”œβ”€β”€ schema-output-template.json
        └── knowledge-search-action-template.xml

Key Features

Architecture Understanding

  • Three-tier system: GenAiFunctions β†’ GenAiPlugins β†’ GenAiPlannerBundles
  • Local copy pattern with unique IDs
  • Source attribute traceability

Agent Types

  • Service Agents: Customer-facing (CustomerWebClient surface, SvcCopilotTmpl__ prefix)
  • Employee Agents: Internal-facing (Messaging only, EmployeeCopilot__ prefix)

Deployment Workflow

  1. Deploy GenAiFunctions (no dependencies)
  2. Deploy GenAiPlugins (depends on functions)
  3. Deploy GenAiPlannerBundles (depends on plugins and functions)

Templates Included

  • GenAiFunction metadata templates
  • GenAiPlugin metadata templates
  • Complete GenAiPlannerBundle templates
  • Input/output schema templates
  • Knowledge search action examples

Usage Examples

Creating a new agent:

"Create an Agentforce Service Agent for customer support with case management capabilities"

Adding a topic:

"Add an Account Intelligence topic to my existing Agentforce agent"

Troubleshooting:

"Why is my GenAiPlannerBundle deployment failing?"

Schema design:

"Help me create a schema for a case creation action with PII fields"

Reference Guide

The skill includes a comprehensive reference guide (references/planner-bundle-guide.md) covering:
- Complete component reference (topics, actions, schemas, mappings, rules)
- Common patterns and use cases
- Deployment considerations and troubleshooting
- Agent type determination
- Step-by-step workflow examples

Claude automatically loads this reference when detailed information is needed.

Best Practices

The skill follows these principles:
- Progressive disclosure: Metadata β†’ SKILL.md β†’ References (loaded as needed)
- Concise core: Essential information in SKILL.md, details in references
- Reusable assets: Templates for common patterns
- Clear workflows: Step-by-step guidance for common tasks

Contributing

This skill is designed following the Skill Creator guidelines:
- Concise core instructions
- Detailed references loaded on-demand
- Reusable templates and assets
- Clear triggering mechanisms

License

This skill is provided as-is for use with Claude and Agentforce development.

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.