Language guide
AEL, the Agent Engineering Language, is a statically typed, compiled language built for agent engineering, so type, ownership and permission mistakes are caught before anything runs. This guide describes the language of AEL 1.0.0, one subject per page.
The pages
Files and roles
One component per file, the file roles, the three root files, headers and extension files.
Syntax basics
Source text, comments, names, keywords, literals, bindings and operators.
Types
Integers,
bool, arrays, structs, enums,Option,Result, bounded text and lists.Functions and visibility
Helper, global and reusable functions, and which file can call which.
Control flow
if,while,matchandreturn.Errors and checked arithmetic
Resulterrors, panics, overflow, division and indexing.Ownership
Moves, borrows, definite initialization and where references may go.
Configuration
Typed configuration files, their precedence and the snapshot each run keeps.
Hooks
Authorization, auditing and cleanup before or after a component, function or statement.
Concurrency
Mailboxes, requests and replies, cancellation, scheduling and supervision.
Effects and capabilities
What code is allowed to do, and how the compiler checks it.
Functions in other languages
Private functions written in other languages, with typed AEL signatures: language files, inline functions, options, building, running and the list of languages.
Limits
The size limit of every source file, and the other limits of the language.
What the language gives you
- Building blocks in their own files. Agents, subagents, nodes (business steps), edges (typed two-way connections), configuration, hooks and skills are first-class building blocks, each in its own named file, so a project's structure reads at a glance.
- Clear sharing rules. Helpers stay private to their component, shared functions are visible by folder, and reusable functions are imported explicitly.
- Functions in other languages. Your application can hold private functions written in other languages, with typed AEL signatures, built and run with your own toolchains, pinned by version.
- Defined results. An overflow or an out-of-range access is reported, never silently ignored.
- Predictable memory. Collections have a fixed capacity, a full collection returns an explicit result, and small devices need no heap.
- Settings that hold still. Typed configuration is locked into a snapshot for each run, so settings cannot change underneath a running agent.
- Hooks that fail closed. Authorization, auditing and cleanup attach before or after any component, function or statement, and a failed authorization stops the work it guards.
- Checked permissions. Compile-time effect and capability checks let code do only what it has been allowed to do.
- Concurrency on microcontrollers. Bounded mailboxes, timers, cooperative scheduling, supervision and restarts keep concurrent work safe on small boards.
- Small, reviewable files. Every source file has a fixed size limit, with private helpers split into extension files.
Related sections
- Agents: nodes, edges, prompts, models and workflows.
- Standard library and core types: the operations on text, collections, time and files.
- Packages: manifests, the lock file and package exports.
- Command-line reference: checking, formatting and building source.