sf-agentforce-development

Build, test, and deploy Salesforce Agentforce agents from source-tracked SFDX projects.

2|Updated Sep 12, 2026
One-click install
npx skills add https://github.com/grzmol/vibe-force --skill sf-agentforce-development-grzmol
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sf-agentforce-development
Source: https://github.com/grzmol/vibe-force/tree/main/skills/sf-agentforce-development
Command: npx skills add https://github.com/grzmol/vibe-force --skill sf-agentforce-development-grzmol

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Agentforce agents are metadata graphs (Bot, BotVersion, GenAiPlannerBundle, GenAiPlugin, GenAiFunction) that break in non-obvious ways: wrong deploy order, missing agent users, untested action contracts, and planner routing that depends entirely on prose descriptions. This Skill guides the full lifecycle of authoring, previewing, testing, and shipping agents from a DX project without those failures. ## Core Features & Use Cases - Agent authoring from specs: Generate agent specs and Agent Script authoring bundles with the sf agent CLI, create the dedicated agent user, and validate bundles locally before publishing. - Action contract design: Implement invocable Apex, autolaunched Flow, and prompt-template actions with bulkified input/output contracts, USER_MODE security enforcement, idempotence, and GenAiFunction JSON schemas. - Testing and deployment: Create AiEvaluationDefinition test suites, run sf agent test with deterministic sequence-match gates, move the full agent graph between orgs with correct manifests, and activate versions deliberately. - Use Case: A story asks for an agent that answers rep questions about open opportunities. Use this Skill to provision an Agentforce-enabled scratch org, generate the authoring bundle, write a bulkified OpportunityPipelineAction Apex class, preview with live actions and trace analysis, then deploy the whole graph and activate it in the integration org. ## Quick Start Ask the assistant to create an Agentforce agent that answers questions about open opportunities, including the Apex action, tests, and deployment to the integration sandbox.

Frequently Asked Questions about sf-agentforce-development

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

FAQPage Schema
How do I create an Agentforce agent from a Salesforce DX project?

Generate an agent spec with sf agent generate agent-spec, turn it into an authoring bundle with sf agent generate authoring-bundle, then validate and publish with sf agent validate authoring-bundle and sf agent publish authoring-bundle. Create the agent user first with sf org create agent-user, since the Agent Script file references its username.

How do I write a custom agent action in Apex?

Write a public with sharing class containing one static @InvocableMethod that takes a single list parameter and returns a list of the same size and order. Use WITH USER_MODE on queries, return per-item success flags instead of throwing, and reference the class from Agent Script with an apex://ClassName target.

Why does my agent fail after deploying to a new org?

Retrieved agent metadata carries the source org's agent username, which does not exist in the target org. Use string replacement or set the user on a new version, deploy the full agent graph (Bot, BotVersion, GenAiPlannerBundle, AiAuthoringBundle) rather than a single version, and activate the agent explicitly.

Does publishing an authoring bundle deploy the Apex behind actions?

No. sf agent publish authoring-bundle never deploys Apex classes, Flows, or prompt templates. Deploy the action implementations first with sf project deploy start, then publish the bundle, or live preview and runtime calls will use stale code.

How do I test an Agentforce agent in CI?

Create a test with sf agent test create from a generated test spec, then run sf agent test run with --result-format junit. Gate the pipeline on deterministic expectations like topic_sequence_match and action_sequence_match, since scored metrics such as response ratings vary between runs.

When should I use a Flow or Apex instead of an agent?

Use a Flow for deterministic multi-step processes with known branches, and Apex for transactional logic, bulk DML, or callouts. An agent fits only when requests are free-form natural language with an unknown number of steps, because LLM output varies and cannot be asserted for equality.