AutolangDocs

Get Started with Autolang

Autolang is a capability-based execution runtime and VM built for sandboxed execution of AI-generated code. Wrap your host functions, expose explicit capabilities, and execute AI workflows deterministically.

Quick Start (Node.js & TypeScript)

Install the WebAssembly-powered compiler package from npm and execute your first sandboxed script:

npm install autolang-compiler
import { ACompiler } from 'autolang-compiler'; // 1. Initialize WebAssembly VM compiler const compiler = await ACompiler.create(); // 2. Register native capabilities compiler.registerBuiltInLibrary("pricing", ` @native("calculateDiscount") fun calculateDiscount(amount: Int, rate: Int): Int `, { autoImport: true }, { calculateDiscount: (amount, rate) => Math.round((amount as number) * (1 - (rate as number) / 100)) }); // 3. Compile & run AI script safely await compiler.compileAndRun("main.atl", ` @import("pricing") val total = pricing.calculateDiscount(200, 15) println("Discounted total: " + total) `); console.log(compiler.getOutput()); // Outputs: Discounted total: 170

Supported Embedding Runtimes

Node.js (npm / WASM)Supported via autolang-compiler package
C++ Native CLI / LibSupported via C++ runtime headers
Python BindingsPlanned for future releases

Community

Autolang is an open-source project. Contributions, bug reports, and feedback are welcome on GitHub.