Language guide
AEL, the Agent Engineering Language, will be a statically typed, compiled language built for agent engineering, so type, ownership and permission mistakes will be caught before anything runs. This guide describes the language that Beta 0.0.1 will provide, one subject per page.
Status
Planned for AEL Beta 0.0.1. AEL is not available yet.
Every example in the guide is preview syntax. The language is planned, and its spelling may change before launch.
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.
-
Limits
The size limit of every source file, and the other limits of the preview.
What the language will give you
- Building blocks in their own files. Agents, nodes, edges, configuration and hooks will each be a first-class component in its own named file, so a project's structure will read at a glance.
- Clear sharing rules. Helpers will stay private to their component, shared functions will be visible by folder, and reusable functions will be imported explicitly.
- Defined results. An overflow or an out-of-range access will be reported, never silently ignored.
- Predictable memory. Collections will have a fixed capacity, a full collection will return an explicit result, and small devices will need no heap.
- Settings that hold still. Typed configuration will be locked into a snapshot for each run, so settings cannot change underneath a running agent.
- Hooks that fail closed. Authorization, auditing and cleanup will attach before or after any component, function or statement, and a failed authorization will stop the work it guards.
- Checked permissions. Compile-time effect and capability checks will let code do only what it has been allowed to do.
- Concurrency on microcontrollers. Bounded mailboxes, timers, cooperative scheduling, supervision and restarts will keep concurrent work safe on small boards.
- Small, reviewable files. Every source file will have 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.