Autolang checks the whole script before it runs.

A language-level sandbox for AI-generated orchestration code. Names, types, and permissions are checked while the program is still static, so a script written wrong stops before any capability is invoked. Lightweight enough to keep thousands of sessions in one host process.

Compile FirstWhole-Program Check
Default DenyZero Ambient Authority
Language LevelIsolation & Capability
BoundedOpcode & Memory Budget
Measured across 4 models and 400 runs per environment — see benchmarks

Core Foundations

Why Autolang at the language layer

Executing generated Python or JavaScript requires general-purpose runtimes with dynamic imports and unbounded access. Autolang enforces safety directly at the language layer.

Pillar 1: Surface Match

Kotlin-Aligned Dialect

Autolang adopts proven syntax conventions from Kotlin (val, when, ?., arrayOf). LLMs already possess extensive pre-training on Kotlin, so a minimal prompt is enough to produce valid orchestration scripts.

Pillar 2: Intentional Scope

Zero Architectural Overhead

Autolang deliberately omits interfaces, reflection, and deep inheritance. Stripping away human-scale architecture eliminates failure modes and keeps the AI focused strictly on workflow orchestration.

Authority Layer

Host-Governed Capabilities

Scripts operate under strict default-deny. Unregistered libraries, network sockets, and filesystem accesses are nonexistent in the grammar. The AI can only invoke capabilities the host explicitly registers.

Resource Governance

Deterministic Bounded Execution

The virtual machine enforces strict opcode instruction budgets and managed memory quotas. Infinite loops or memory allocations exceeding the limit terminate automatically without affecting the host.


Execution Strategy

Why Not Tool Calling?

Tool calling works well for single external queries. When an agent must evaluate collections or execute multi-step logic, Autolang replaces sequential round-trips with local deterministic execution.

Sequential Tool Calling

  • High network latencyEvery branching condition requires a complete round-trip between the LLM and the host application.
  • Compounding token costsIntermediate state must be repeatedly serialized and resent across model context windows.
  • Failure cascadingLong execution chains multiply failure points across sequential network calls.

Autolang Orchestration

  • Single script executionThe model generates the orchestration logic once; the compiler validates it before anything runs.
  • Native loop and condition handlingEvaluates collections, segments records, and aggregates output without repeated LLM inference cycles.
  • Deterministic containmentOpcode budgets and capability allowlists guarantee predictable runtime behavior.

Implementation Pattern

Host Authority in Practice

The host registers explicit capabilities with strict type contracts. Untrusted scripts orchestrate these capabilities without access to underlying systems or credentials.

1. Host Application (Node.js / TypeScript) - Registering Capabilities
import { ACompiler } from 'autolang-compiler'; const compiler = await ACompiler.create(); // Expose business capabilities to the execution boundary compiler.registerBuiltInLibrary( "inventory", ` class Product(inStock: Bool, price: Int) @js_object class InventoryService { @native("getItems") fun getItems(): Array<Product> } `, { autoImport: true }, { getItems: () => warehouseService.fetchCurrentCatalog() } );
2. Untrusted Script - Deterministic Orchestration
// AI orchestrates data transformation and conditional rules var premiumAvailable = 0 InventoryService.getItems() .filter {|item| item.inStock} .forEach {|item| when (item.price) { > 100 -> premiumAvailable += 1 else -> {} } } println("Available premium inventory: " + premiumAvailable)

Evidence

Right is cheap. Wrong never leaves.

A wrong script stops at the compiler, not after touching the business system. The structure, not a number, is what stays true across versions and models.

Fail early
Validated before execution

Names, types, and permissions are checked for the whole program before the first capability is invoked.

Bounded
Opcode & memory budget

A runaway script stops at its own limit instead of consuming the host process.

Lightweight
Thousands of sessions per host

The selling point is weight, not speed. Detailed latency and throughput live with provenance in the benchmarks.

Full measurements and per-model breakdown