C++17 • Node.js • WebAssembly • MIT License
Run AI-generated code safely.
A statically typed scripting language and lightweight virtual machine for AI agents.
Why Autolang?
Only Registered APIs
Only functions registered by the host are visible to scripts. Nothing else can be accessed.
Bounded Resource Limits
Limit memory usage and terminate infinite loops before they affect the host application.
Fast Startup
~10 ms cold start, ~1–2 ms warm start and under 1 MB native memory consumption.
Example
AI scripts orchestrate capabilities explicitly granted by the host.
@import("mail")
// Send meeting notification via host-registered mail service
mail.send(
"john@example.com",
"Meeting at 3 PM"
)Integrate with Existing Code
Expose your existing C++ or Node.js functions as native Autolang APIs. No code generation, wrappers or rewriting required.
import { ACompiler } from 'autolang-compiler';
const compiler = await ACompiler.create();
compiler.registerBuiltInLibrary("mail", `
@native("send")
fun send(to: String, msg: String): Void
`, { autoImport: true }, {
send: (to, msg) => mailer.send(to, msg)
});
await compiler.compileAndRun("script.atl", `
@import("mail")
mail.send("john@example.com", "Meeting at 3 PM")
`);