A safe, embeddable scripting language with Kotlin-like syntax, designed for strict execution boundaries and seamless host integration.
- Why Autolang?
- How it works
- Language at a glance
- Quickstart
- Real-world Workflow
- Why not tool calling?
- When to use (and when not to)
- Security & Resource Governance
- Standard Library
- Documentation
- Roadmap
- Sponsors
- License
- Kotlin-compatible syntax: Familiar language constructs with static typing and compile-time verification.
- Safe execution sandbox: Scripts can only invoke functions and capabilities explicitly exposed by the host.
- Resource protection: Automatically prevents runaway loops and reclaims all memory upon script completion.
- Multi-platform embedding: Embed directly into TypeScript, JavaScript, C++, and Python hosts.
Null safety and expressions:
var result: String? = null
val display = result?.uppercase() ?? "Default Value"
println(display)Pattern matching:
val status = when (code) {
200 -> "Success"
404 -> "Not Found"
else -> "Unknown"
}Collections and closures:
val numbers = arrayOf(1, 2, 3, 4, 5, 6)
val evenSquares = numbers
.filter { n -> n % 2 == 0 }
.map { n -> n * n }
println(evenSquares) // [4, 16, 36]Error handling:
try {
val result = processData()
println(result)
} catch (e) {
println("Error encountered: " + e)
}Via npm (TypeScript / JavaScript):
npm install autolang-compilerVia native C++ build:
cmake -B build -S .
cmake --build build --config ReleaseExpose host functions and execute a script:
import { ACompiler } from "autolang-compiler";
const compiler = await ACompiler.create();
// Register a host capability
compiler.registerBuiltInLibrary("system/notification", `
@native("notify")
fun notify(recipient: String, message: String): Bool
`, {}, {
notify(recipient, message) {
console.log(`Sending notice to ${recipient}: ${message}`);
return true;
}
});
// Run script logic
await compiler.compileAndRun("workflow.atl", `
@import("system/notification")
val success = notify("Operations", "Task finished")
println(success)
`);#include <Autolang.hpp>
int main() {
Autolang::ACompiler compiler;
bool ok = compiler.compileAndRun("script.atl", R"(
val items = arrayOf("A", "B", "C")
items.forEach { item -> println(item) }
)");
return ok ? 0 : 1;
}Autolang includes a focused set of built-in types and utilities:
| Module | Description |
|---|---|
Array<T> |
Ordered collection with filter, map, forEach, sort, find |
Set<T> |
Unique-element collection with membership testing |
Map<K, V> |
Key-value dictionary with iteration support |
String |
Substring, split, replace, trim, casing, and string interpolation |
Math |
Standard arithmetic functions (min, max, round, floor, ceil, sqrt, pow) |
Json |
Serialization and deserialization of structured data |
Regex |
Pattern matching and extraction |
Date / Time |
Timestamp generation, formatting, and duration arithmetic |
Run the test suite to verify the local build:
# Run the complete test suite
./build/autolang tests/testCorrectness.atl
# Run an individual test file
./build/autolang tests/correctness/basic/generics.atlFull documentation and language specifications are available at autolang.vercel.app/docs:
Autolang is sponsored by:
Special thanks to ADA GROUP for supporting project development.
MIT License (c) 2026 Autolang Project