SF-AI-AgentScript for Openclaw

A code-first Domain Specific Language (DSL) for building deterministic, state-based Agentforce agents using the .agent file format.

dsouza-anush
v1.0.0
Apr 9, 2026
0
657
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install sf-ai-agentscript

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install sf-ai-agentscript using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is SF-AI-AgentScript?

Agent Script represents the professional developer's path to building Agentforce agents. By leveraging the .agent file format, developers can move away from UI-based builders and into a source-controlled environment. This entry in the Openclaw Skills library focuses on the deterministic logic required for enterprise-grade AI agents, allowing for precise control over topic routing, finite-state machine (FSM) designs, and variable management.

This skill is essential for developers who need repeatable, predictable agent behavior in Salesforce Service and Employee environments. It prioritizes a code-first approach, enabling better version control and integration with modern DevOps practices. By utilizing Agent Script, teams can ensure their AI agents follow strict logic paths and handle data with high precision.

SF-AI-AgentScript Use Cases

  • Authoring and editing .agent files directly in source control.
  • Building deterministic topic routing, guards, and transitions for Agentforce.
  • Managing Service Agent and Employee Agent configurations via specialized CLI workflows.
  • Implementing complex slot filling and instruction resolution patterns within FSM designs.
  • Automating agent validation and publication within CI/CD pipelines to ensure reliability.

How SF-AI-AgentScript Works

  1. Design: Map agent logic into finite states (topics) and transitions to handle specific user intents.
  2. Author: Create the .agent file structure, establishing the config, variables, and topic blocks.
  3. Validate: Use the Salesforce CLI to run structural and runtime checks against target Salesforce orgs.
  4. Preview: Conduct smoke tests using simulated or live actions to verify routing and instruction resolution.
  5. Publish & Activate: Push the authoring bundle to Salesforce and activate specific agent versions deterministically.

SF-AI-AgentScript Setup

To begin using this skill, ensure you have the Salesforce CLI installed and a valid Agentforce license (API v66.0+). To generate a local authoring bundle for Openclaw Skills development, use:

sf agent generate authoring-bundle --no-spec

To validate your agent against a target org before publishing:

sf agent validate authoring-bundle --api-name MyAgent -o TARGET_ORG --json

SF-AI-AgentScript Data Schema & Taxonomy

The skill organizes its technical structure around the .agent manifest, which serves as the primary data schema. Key blocks include:

Block Description
config Core metadata including developer_name, agent_type, and description.
variables Definitions for agent-scoped variables, including type checks and linked context.
topic Finite State Machine definitions including instructions, transitions, and local actions.
system Global instructions and system-level configurations for the agent.
knowledge Integrated knowledge sources used for grounding the agent's responses.

SF-AI-AgentScript Advanced Features

  • Support for explicit Service Agent and Employee Agent types with specific user permission checks.
  • Deterministic action execution using target-backed topic definitions to bypass LLM hallucinations.
  • Automated validation using a comprehensive rule catalog for structural and runtime safety.
  • Granular control over LLM-facing text using precise variable injection into instructions.
  • Integrated preview loops that support both simulated and live action testing for rapid iteration.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*