Authoritative reference for generating and working with Salesforce Agentforce Agent Script. Use when building,modifying,explaining or doing anything involving Salesforce Agent Script.
This skill provides the authoritative context for an AI agent generating Agent Script code. Use this when creating or updating Agentforce agents using the property-based, whitespace-sensitive Agent Script language.
system:
instructions: "You are a friendly assistant."
messages:
welcome: "Hi! How can I help?"
error: "Something went wrong."
config:
developer_name: "My_Agent"
agent_label: "My Agent"
language:
default_locale: en_US
variables:
user_name: mutable string
verified: mutable boolean = False
topic Order_Management:
description: "Handles orders"
before_reasoning: ->
if @variables.verified == False: transition to @topic.Identity
reasoning:
instructions: |
Greet the user and check their order status.
after_reasoning: ->
if @variables.order_status == "delivered": set @variables.completed = True
start_agent topic_selector:
description: "Route user intent"
reasoning:
instructions: ->
if @variables.verified == False: transition to @topic.Identity
| Select a tool based on user intent.
actions:
go_to_order: @utils.transition to @topic.Orders
available when @variables.verified == True
-> for deterministic logic (runs before LLM) and | for natural language prompts.@variables.name, @actions.name, @topic.name, and @system_variables.user_input.reasoning.instructions)if checks and run commands at the top of the block.run @actions.name with with for inputs and set for outputs.set @variables.name = value for both literals and expressions.transition to @topic.name inside logic blocks for immediate, one-way jumps.reasoning.actions)@utils.setVariables with ... placeholders to let the LLM extract values from conversation.available when <condition> to show/hide tools from the LLM based on state.run @actions.next inside a tool definition to execute a sequence of actions from one tool call.For detailed syntax, variable types, and advanced patterns, see the following references:
Complete, working examples demonstrating key patterns and features:
start_agent block to handle classification and routing.description strings for topics and actions; these are the primary drivers for LLM routing accuracy.if checks at the start of start_agent to enforce authentication or data-gathering flows before allowing general intent processing.system.instructions to change persona or resolve conflicts with global instructions for specific domains.language block is required. The default_locale value MUST be quoted (e.g., default_locale: "en_US").<default-project-folder>/main/default/aiAuthoringBundles/<scriptApiName>/
<scriptApiName>.agent<scriptApiName>.bundle-meta.xml (See bundle-meta.xml)sf agent:validate:authoring-bundle --api-name <scriptApiName>EinsteinServiceAgent types, default_agent_user is required in the config block (e.g., default_agent_user: "EinsteinServiceAgentUser").transition to is supported in logic blocks, using available when on tools in the start_agent block is the most robust way to enforce state-based routing (like authentication) and avoid compiler syntax errors.npx skills add surajp/salesforce-agent-script下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer