Z-Script: Checked Scripts for Private Engine Capabilities
Customer Benefit: Agents can use your private engine capabilities through small checked scripts, never through an open endpoint.
Overview
Opening general-purpose HTTP routes or Python/shell interpreters to autonomous agents creates substantial attack surfaces: credential exfiltration, SSRF, arbitrary code execution, and unconstrained resource consumption.
Z-Script is a purpose-built, pure, deterministic Lisp language designed specifically for agent decision rules, guardrails, argument resolvers, and controlled execution of private engine capabilities.
Key Guarantees
- Zero External I/O: The Z-Script runtime contains no network calls, no disk access, no system clock, and no random number generator. Evaluation of the same script and inputs always yields byte-identical output.
- Resource Bounded: Every script executes within hard fuel and stack depth limits. Infinite loops or recursive overflows are impossible.
- Controlled Host Capabilities: A script cannot call arbitrary code. It interacts with the outside world strictly through a versioned allowlist of host capabilities resolved by the trusted host after evaluation.
- Never an Open Endpoint: Private engine capabilities are never exposed as public HTTP routes or MCP tools. They are invoked only through authenticated, checked Z-Script programs.
- Write Confirmations: Any host capability with write effects requires explicit user confirmation, exactly like an
act tool call.
Example: Argument Resolver & Guard
(defn check-leave-eligibility [employee-tier requested-days]
(let [max-allowed (if (= employee-tier "executive") 30 20)]
{:eligible (<= requested-days max-allowed)
:tier employee-tier
:allowed max-allowed
:status (if (<= requested-days max-allowed)
:approved
:exceeds_allowance)}))
When evaluated, the program produces an immutable structured result that feeds directly into the decision pipeline.
Interactive Editor & Compiler in Studio
Explore and test Z-Script programs in the Studio:
- Studio Route: Navigate to Z-Script Editor.
- Features: Syntax highlighting, real-time expression evaluation, AST tree visualizer, and built-in reference documentation.