Autolang Docs
Autolang is a statically-typed scripting language and VM built for sandboxed execution of AI-generated code. Wrap your existing functions, expose them as bindings, and let the AI call only what you allow.
Performance
Measured on Windows 11, Intel Core i5 12th Gen, 16GB RAM. Results vary by script complexity and host environment.
Autolang optimizes total time (compile + runtime), not just runtime. For short AI-generated scripts that run frequently, compile speed matters as much as execution speed.
Design Philosophy
AI scripts can't be fully trusted
AI-generated code tends to be short but prone to null accesses, infinite loops, and wrong API calls. Autolang catches these at compile time and terminates runaway scripts via opcode limits — without crashing the host.
Don't rewrite what already works
Autolang doesn't replace Python or JavaScript. You wrap existing functions as native bindings and expose them to the AI. The AI calls only what you register — nothing outside that scope is accessible.
Less freedom, more safety
Static typing, per-library permissions, and mandatory null handling force AI-generated code into a stricter lane than system code. Nullable types must be handled explicitly with ?? — crashing via null pointers is exceedingly difficult.
Resource cost matters at scale
A full Node.js or Python agent typically uses 30–50MB+ RAM per instance. At 10–100 concurrent agents, that gap becomes an economic problem. Autolang is designed to keep each instance small and start fast.
How It Works
1. You register host functions as Autolang bindings
→ define what the AI is allowed to call
2. The AI writes Autolang scripts against those bindings
→ static compiler catches type errors before execution
3. The VM runs the script within your opcode limit
→ runaway scripts are terminated, not tolerated
4. Your underlying JS / C++ functions do the real work
→ no rewriting, just wrapping
Currently supported host environments: Node.js (npm) and C++. Python bindings are planned.
Explore
Philosophy & Vision
Why AI needs a controlled execution layer, not a full runtime.
Integration Guide
Set up Autolang with Node.js and register your first native binding.
Language Guide
Syntax, type system, null safety, classes, generics, and more.
Examples
Real-world patterns for AI agent integration and data binding.
AI Reference
Reference material optimized for LLMs writing Autolang code.
Online Editor
Write and run Autolang directly in your browser.
