developing-agentforce

Develop and deploy Salesforce Agentforce agents using Agent Script authoring bundles.

803|289|Updated Nov 7, 2025
One-click install
npx skills add https://github.com/forcedotcom/sf-skills --skill developing-agentforce-forcedotcom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: developing-agentforce
Source: https://github.com/forcedotcom/sf-skills/tree/main/skills/developing-agentforce
Command: npx skills add https://github.com/forcedotcom/sf-skills --skill developing-agentforce-forcedotcom

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

It solves the problem of building, modifying, and deploying Salesforce Agentforce agents using Agent Script without getting lost in syntax rules, CLI workflows, validation/preview loops, and publish-time deployment pitfalls.

Core Features & Use Cases

  • Agent Script lifecycle guidance: Create, modify, validate, debug, deploy, publish, activate, and test Agent Script authoring bundles and actions.
  • Router-style task planning: Triggers based on .agent and AiAuthoringBundle metadata changes, then maps intent to the correct reference files for grounding.
  • Reliability guardrails: Enforces validation-before-change, trace-based debugging, and required flags like --json, plus Agent Spec approval gating.
  • Backing logic integration: Covers wiring actions to Apex, Flows, and Prompt Templates, including compilation and environment prerequisites.

Quick Start

Ask the skill to help you create a new Agentforce Agent using Agent Script and walk through the full validate-preview-publish-activate workflow while you keep approving each Agent Spec draft.

Frequently Asked Questions about developing-agentforce

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build and deploy Agentforce agents using Agent Script?

To build and deploy Agentforce agents, you author Agent Script bundles (.agent) and AiAuthoringBundle metadata, wire backing logic via Apex, Flows, or Prompt Templates, then validate, preview, and publish using strict sf agent CLI commands.

Why does my Agent Script authoring bundle fail validation or compilation?

Agent Script compilation issues often stem from incorrect AiAuthoringBundle syntax, missing backing logic wiring, or invalid sf agent CLI flags. You must validate metadata changes, ensure Agent User prerequisites are met, and use trace-grounded debugging to diagnose errors.

What is the best way to debug Agentforce agent behavior during live preview?

Debugging Agentforce behavior requires analyzing live preview traces to identify execution failures. The approach enforces trace-grounded analysis, checking validation outputs and environment prerequisites before modifying Agent Specs or backing logic.

Can I use Apex, Flows, and Prompt Templates as backing logic for Agentforce actions?

Yes, you can wire Apex classes, Flows, and Prompt Templates as backing logic for Agentforce actions. The skill guides integration, handles compilation prerequisites, and ensures environment validation passes before deploying the AiAuthoringBundle.

What prerequisites do I need before creating an Agentforce Agent with Agent Script?

Before creating an Agentforce agent, you need the sf CLI configured with --json output, an environment with Agent User prerequisites satisfied, and an approved Agent Spec. Validation and environment checks are enforced prior to any code generation or deployment.

When should I use Agent Script authoring bundles instead of other Agentforce configuration methods?

Agent Script authoring bundles (.agent) are ideal when you need version-controlled, metadata-driven Agentforce development with end-to-end validation, trace-based debugging, and structured deployment via sf agent CLI commands rather than manual UI configuration.