Table of Contents

Agent Script DSL

Agent Script DSL is an open-source domain-specific language (DSL) developed by Salesforce that provides a declarative framework for defining agent workflows through state machines expressed in a single configuration file. The language enables organizations to specify which workflow steps require deterministic execution with strict business logic constraints and which steps can leverage probabilistic AI reasoning capabilities, addressing a critical need for enterprise AI system governance and auditability. Agent Script DSL directly addresses the core tension that agents are inherently probabilistic systems while enterprises demand deterministic outcomes, making agent workflows auditable and versionable 1).

Overview and Purpose

Agent Script DSL addresses a fundamental challenge in enterprise AI deployment: the need to combine deterministic business logic with probabilistic AI decision-making while maintaining strict oversight and compliance requirements. The DSL provides a unified mechanism for defining complex agent behaviors that integrate both rule-based and AI-driven components in a single, versionable artifact.

The language's core design principle separates workflow steps into two categories: deterministic steps that enforce explicit business rules and logic flows, and probabilistic steps that allow AI models to reason through decisions and generate responses. This separation enables enterprises to maintain control over critical business operations while enabling AI to contribute to less constrained decision points 2).

Technical Architecture

The DSL uses a flat file structure that eliminates the need for complex serialization or distributed configuration management. This design choice prioritizes simplicity and auditability—all workflow definitions exist in a single, human-readable format that can be version-controlled, reviewed, and audited without specialized tooling.

State machine definitions within Agent Script DSL specify transition logic between workflow states, with each transition annotated to indicate whether execution should follow deterministic paths or invoke probabilistic AI reasoning. This explicit annotation serves multiple purposes: it clarifies intent for code reviewers, enables specialized execution engines to apply appropriate validation and monitoring, and creates clear audit trails showing which decisions were made through fixed logic versus AI reasoning.

The open-source nature of the DSL allows enterprises to inspect, modify, and extend the language for domain-specific requirements while benefiting from community contributions and standardization efforts.

Enterprise Applications

Agent Script DSL particularly addresses use cases in customer service automation, workflow management, and business process automation where enterprises must balance responsiveness with regulatory compliance. Typical implementations combine deterministic steps for policy enforcement, customer verification, and transaction processing with probabilistic steps for reasoning about customer intent, contextual recommendations, and natural language understanding.

Organizations deploying agent systems built with Agent Script DSL gain the ability to maintain comprehensive audit logs distinguishing between rule-based decisions and AI-driven inferences. This distinction proves critical for regulatory compliance in industries requiring decision explainability, such as financial services, healthcare, and regulated customer service operations.

Versionability and Auditability

A primary advantage of expressing agent workflows in a declarative DSL format is the versionability enabled by version control systems. Each modification to workflow logic creates a traceable commit history, allowing teams to understand when and why workflow behaviors changed. The single-file format means no distributed state or hidden configuration, reducing the surface area for unexpected behavior changes.

The auditability dimension addresses enterprise compliance requirements by creating unambiguous records of which workflow decisions executed through deterministic logic and which were delegated to probabilistic AI reasoning. This enables compliance teams, auditors, and regulators to trace agent decisions back to their execution mechanism, supporting investigations, regulatory reviews, and continuous improvement processes.

Integration with Enterprise Systems

Agent Script DSL integrates with Salesforce's broader enterprise platform, enabling agents defined in the DSL to interact with CRM data, trigger business process automations, and connect to external systems through API calls. The language provides abstractions for common enterprise integration patterns while maintaining the clear separation between deterministic and probabilistic execution paths.

Limitations and Considerations

While Agent Script DSL provides significant governance advantages, organizations must still address challenges related to training probabilistic components to make sound decisions, monitoring for drift in AI reasoning behavior, and managing scenarios where deterministic and probabilistic components interact in complex ways. The language provides the structural framework but not solutions to underlying AI robustness and safety challenges inherent in agentic systems.

See Also

References