sf-ai-agentscript

Encodes Salesforce agent decision logic into a deterministic .agent file.

6|Updated Dec 20, 2023
One-click install
npx skills add https://github.com/ronitnuguru/Package-Visualizer --skill sf-ai-agentscript
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sf-ai-agentscript
Source: https://github.com/ronitnuguru/Package-Visualizer/tree/main/.cursor/skills/sf-ai-agentscript
Command: npx skills add https://github.com/ronitnuguru/Package-Visualizer --skill sf-ai-agentscript

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Agent Script enables deterministic agent development by encoding decision logic in a single .agent file, converting prompts into code-enforced behavior to improve reliability, auditing, and reusability.

Core Features & Use Cases

  • Deterministic block-based agent scripting with blocks: config, variables, system, knowledge, language, start_agent, topic
  • Two-level action model: Level 1 action definitions with target/IO, Level 2 invocations via reasoning.actions
  • Lifecycle hooks: before_reasoning and after_reasoning for pre/post processing
  • Deterministic guards: available when, topic transitions, post-action checks
  • Integrations: flow://, apex://, generatePromptResponse://, retriever://, externalService://, standardInvocableAction://
  • Cross-skill integration: works with sf-flow, sf-ai-agentforce-testing, sf-deploy, etc.

Quick Start

Create a minimal agent by scaffolding a single topic with a Flow action and validate/publish it in your Salesforce org.

Frequently Asked Questions about sf-ai-agentscript

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

FAQPage Schema
How do I build deterministic Salesforce agents with reliable decision logic?

You can build deterministic Salesforce agents by encoding decision logic into a single .agent file using an Agent Script DSL. This converts prompts into code-enforced behavior, improving reliability, auditing, and reusability across multi-topic routing and security gates.

What integrations are available for invoking actions in an Agent Script?

Agent Script supports invocations via flow://, apex://, generatePromptResponse://, retriever://, and externalService://. These integrations enable pre/post processing through lifecycle hooks and enforce deterministic guards for topic transitions and post-action checks.

How do I validate and publish an Agent Script in Salesforce?

To validate and publish an Agent Script, you must scaffold topics with complete IO definitions and use Salesforce API v65.0 or higher. A valid Einstein Agent User setup is also required to successfully deploy the deterministic agent to your org.

Can I use Flow and Apex together when defining agent topics?

Yes, Agent Script allows defining Level 1 actions with targets like Flow and Apex, then invoking them via Level 2 reasoning actions. You can apply deterministic guards to control availability and manage transitions between multiple topics.

What prerequisites are needed to start developing with the Agent Script DSL?

You need Salesforce API v65.0 or higher and a valid Einstein Agent User to develop with the Agent Script DSL. Complete input and output definitions for all actions are required before you can validate and publish the agent to your org.

Why does my Agent Script fail to publish in Salesforce?

Agent Script publishing fails if the Salesforce API version is below v65.0, the Einstein Agent User is invalid, or the action IO definitions are incomplete. Ensure all topic blocks, variables, and system configurations meet the deterministic validation requirements.