Skip to main content
The AgentScript preset is purpose-built for validating LLM-generated orchestration code. It’s the default preset used by enclave-vm and provides the strictest validation for AI-generated code.

Basic Usage

Configuration Options

Option Reference

Use requireCallTool: true to ensure AgentScript code actually interacts with tools rather than just performing local computations.

What AgentScript Blocks

What AgentScript Allows

Default Allowed Globals

The AgentScript preset allows these globals by default:
  • callTool - Tool invocation
  • Math - Mathematical operations
  • JSON - JSON parsing/stringifying
  • Array - Array constructor and methods
  • Object - Object methods
  • String - String methods
  • Number - Number methods
  • Boolean - Boolean conversion
  • Date - Date operations (read-only)
  • console - Logging (rate-limited by enclave)
  • undefined, null, NaN, Infinity - Primitives

Customizing Allowed Globals

Loop Configuration

Control which loop types are allowed:
for-in loops are blocked by default because they iterate over prototype properties, which can lead to unexpected behavior and security issues.

Requiring Tool Calls

Ensure scripts actually use tools: